Changes the upper and lower bounds of variables in the array var
.
var[j]
will be set to lb[j]
. var[j]
will be set to ub[j]
.For each variable in the array var
, this method sets its upper bound to the corresponding value in the array ub
and its lower bound to the corresponding value in the array 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