View source: R/257_zzz_R_specific_exports.R
| constraints | R Documentation |
Returns a copy of the problem's constraint list.
constraints(x)
x |
A Problem object. |
Problem objects are immutable: constraints cannot be modified after
construction. To change constraints, create a new Problem().
This matches CVXPY's design where problems are immutable except
through Parameter value changes.
A list of constraint objects.
Problem(), objective()
x <- Variable(2)
prob <- Problem(Minimize(sum_entries(x)), list(x >= 1))
length(constraints(prob)) # 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.