Changes the upper and lower bounds of variable var
.
var
to be changed. var
to be changed.For the variable var
, this method sets its upper bound to the corresponding value ub
and its lower bound to the value lb
. Setting bounds has no effect beyond the scope of the current invocation of the callback.
Use this method only when presolve is turned off. Otherwise, you risk attempting to change the bounds of a variable that has been removed during the presolve. To check whether presolve is off, consider the parameter Cplex.BooleanParam.PreInd
. Alternatively, you can check whether a particular variable has been removed by presolve by checking the status of the variable. To do so, call IloControlCallback.GetFeasibilities
. A variable that has been removed by presolve will have the status ImpliedFeasible
.
Cplex.HeuristicCallback Class | ILOG.CPLEX Namespace | Cplex.HeuristicCallback.SetBounds Overload List