addConstraint
add additional constraints to optimization problem.
addConstraint(p, ...)
p | optimization problem to add constraints. |
---|---|
... | additional constraints. |
the optimization problem with the additional constraints.
# NOT RUN { convex_setup() x <- Variable(4) b <- J(c(1:4)) p <- minimize(sum((x - b) ^ 2)) p <- addConstraint(p, x >= 0, x <= 3) # }