sasoptpy.actions.restore¶
-
restore
(*args)[source]¶ Restores dropped constraint and constraint groups
- Parameters
- args
sasoptpy.Constraint
,sasoptpy.ConstraintGroup
Constraints to be restored
- args
See also
Examples
>>> with so.Workspace('w') as w: >>> x = so.Variable(name='x', lb=-1) >>> set_objective(x**3, name='xcube', sense=so.minimize) >>> c = so.Constraint(x >= 1, name='xbound') >>> solve() >>> drop(c) >>> solve() >>> restore(c) >>> solve() >>> print(so.to_optmodel(w)) proc optmodel; var x >= -1; MIN xcube = (x) ^ (3); con xbound : x >= 1; solve; drop xbound; solve; restore xbound; solve; quit;