IloConstraint
forall
declaration.
The undefined
value is returned instead.
You can nevertheless modify the bounds.dvar float x in 5..20; dvar float y in 0..20; maximize x+y; subject to { ct1:2*x+y<=10; ct2:x<=7; } execute { writeln( ct1.name," ",ct1.UB," ",ct1.LB," ",ct1.dual," ",ct1.slack); writeln( ct2.name," ",ct2.UB," ",ct2.LB," ",ct2.dual," ",ct2.slack); }
ct1 10 -Infinity 1 0 ct2 7 -Infinity 0 2
Field Attributes | Field Name and Description |
---|---|
postprocessing flow control |
Dual value in a solution. |
postprocessing flow control (write only) |
Lower bound. |
postprocessing flow control |
Name of the constraint. |
postprocessing flow control |
Slack value in a solution. |
postprocessing flow control (write only) |
Upper bound. |
Method Attributes | Method Name and Description |
---|---|
all |
setBounds(lb, ub)
Sets |
all |
setCoef(dvar, coef)
Changes the coefficient of a decision variable in the invoking constraint. |
Dual value in a solution. Exists only for linear problems with CPLEX.
Lower bound.
Name of the constraint.
Slack value in a solution.
Exists only for CPLEX linear mixed integer problems.
Upper bound.
Sets lb
as the lower bound and
ub
as the upper bound of the invoking numeric variable.
setBounds
notifies Concert Technology
algorithms about the change of bounds in the numeric variable.Changes the coefficient of a decision variable in the invoking constraint.
This method is limited to constraints that use simple real linear expressions with no
aggregation. In other cases, use the method from the IloCplex
class.