Constraint handling
Ctr1:= 2*x + y <= 10 ! Named constraints Ctr2:= x is_integer 2*x + y <= 10 ! Anonymous constraints y >= 5
- Named constraints can be
-
- accessed:
-
val:= getact(Ctr) getvars(Ctr, vars)
- hidden:
-
sethidden(Ctr, true)
- redefined:
-
Ctr:= x+y <= 10 Ctr:= 2*x+5*y >= 5
- modified:
-
Ctr += 2*x settype(Ctr, CT_UNB)
- deleted (reset):
-
Ctr:= 0
Anonymous constraints are constraints that are specified without assigning them to a linctr variable. Bounds are (to Mosel) just simple constraints without a name. Anonymous constraints are applied in the optimization problem just like ordinary constraints. The only difference is that it is not possible to refer to them again, either to modify them, or to examine their solution value.