ILOG CPLEX .NET Reference Manual

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

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

public virtual bool FeasOpt(
   IRange[] rngs,
   double[] rnglb,
   double[] rngub
);

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 bounds are allowed to 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 value 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.

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.

The method feasOpt provides several different metrics for determining what constitutes a minimum-cost relaxation. The metric is specified by the parameter FeasOptMode. The method feasOpt 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 and rngub.

If enough 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