Description Usage Arguments Value Examples
The bounds of a given optimization problem (OP)
can be accessed or mutated via the method 'bounds'
.
1 2 3 4 5 6 |
x |
an object of type |
value |
an object derived from |
the extracted bounds object on get and the altered 'OP'
object on set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
lp_obj <- L_objective(c(1, 2))
lp_con <- L_constraint(c(1, 1), dir="==", rhs=2)
lp_bound <- V_bound(ui=1:2, ub=c(3, 3))
lp <- OP(objective=lp_obj, constraints=lp_con, bounds=lp_bound, maximum=FALSE)
bounds(lp)
x <- ROI_solve(lp)
x$objval
x$solution
bounds(lp) <- V_bound(ui=1:2, ub=c(1, 1))
y <- ROI_solve(lp)
y$objval
y$solution
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.