constraints (Set/Get) | R Documentation |
The constraints of a given optimization problem (OP)
can be accessed or mutated via the method 'constraints'
.
constraints(x)
## S3 method for class 'OP'
constraints(x)
constraints(x) <- value
x |
an object used to select the method. |
value |
an R object. |
the extracted constraints object.
Stefan Theussl
## minimize: x + 2 y
## subject to: x + y >= 1
## x, y >= 0
x <- OP(1:2)
constraints(x) <- L_constraint(c(1, 1), ">=", 1)
constraints(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.