ILOG CPLEX .NET Reference Manual

Cplex.FeasOpt Method (IRange[], Double[], Double[], INumVar[], Double[], Double[])

This method computes a minimum-cost relaxation in order to make the active model feasible by relaxing the bounds of the variables specified in the array vars and by relaxing the bounds of the range constraints specified in the array rngs.

public virtual bool FeasOpt(
   IRange[] rngs,
   double[] rnglb,
   double[] rngub,
   INumVar[] vars,
   double[] varlb,
   double[] varub
);

Parameters

rngs
An array of ranged constraints. Relaxation preference values for these ranges can be specified in arrays rnglb and rngub. This array may be null, in which case no range constraints may be relaxed. Only constraints directly added to the model can be specified.
rnglb
An array of doubles indicating the preference value for relaxing the lower bound of the ranged constraints specified in parameter rngs. Element rnglb[i] specifies the preference value for relaxing the lower bound of constraint rngs[i]. This array may be null, in which case no range lower bounds are allowed to be relaxed.
rngub
An array of doubles indicating the preference value for relaxing the upper bound of the ranged constraints specified in parameter rngs. Element rngub[i] specifies the preference for relaxing the upper bound of constraint rngs[i]. This array may be null, in which case no range upper bounds are allowed to be relaxed.
vars
An array of modeling variables. Relaxation preference values for the variables can be specified in arrays varlb and varub. This array may be null, in which case no variable bounds are allowed to be relaxed.
varlb
An array of doubles indicating the preference value for relaxing the lower bound of the modeling variables specified in parameter vars. Element varlb[i] specifies the preference value for relaxing the lower bound of variable vars[i]. This array may be null, in which case no variable lower bounds are allowed to be relaxed.
varub
An array of doubles indicating the preference value for relaxing the upper bound of the modeling variables specified in parameter vars. Element varub[i] specifies the preference value for relaxing the upper bound of variable vars[i]. This array may be null, in which case no variable upper bounds are allowed to be relaxed.

Return Value

True if a relaxation is found; false otherwise.

Remarks

On successful completion, the method installs a solution vector that is feasible for the minimum-cost relaxation. This solution can be queried with conventional query methods, such as Cplex.GetValue or Cplex.GetInfeasibility.

The method feasOpt provides several different metrics for determining what constitutes a minimum-cost relaxation. The metric is chosen using parameter FeasOptMode. The feasOpt method can also optionally perform a second optimization phase where the original objective is optimized, subject to the constraint that the associated relaxation must have the same cost as the minimum-cost relaxation computed in the first phase. See Cplex.Relaxation for further information.

The user may specify numeric values to express relative preferences for relaxing bounds. A larger preference value indicates a greater willingness to relax the corresponding bound. Internally, feasOpt uses the reciprocal of the preference value to weight the relaxations of the associated bounds in the phase one cost function. A negative or 0 (zero) value indicates that the corresponding bound must not be relaxed. These preference values are entered in the arguments rnglb, rngub, varlb, and varub.

If enough variables or constraints were allowed to be relaxed, the function will return IloTrue; otherwise, it returns IloFalse.

The active model is not changed by this method.

See Also

Cplex Class | ILOG.CPLEX Namespace | Cplex.FeasOpt Overload List