ILOG CPLEX .NET Reference Manual

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

This method computes a minimum-cost relaxation in order to make the active model feasible by relaxing the constraints specified in cts.

public virtual bool FeasOpt(
   IConstraint[] cts,
   double[] prefs
);

Parameters

cts
An array of constraints that can be relaxed. Only constraints directly added to the model can be specified in this array. Groups of constraints can be combined and specified by and constraints. Relaxation preference values can be specified in the array prefs.
prefs
An array of doubles indicating the preference value for relaxing the constraints specified in cts. The element prefs[i] specifies the preference value for relaxing the constraint cts[i].

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. If a preference is specified for a ranged constraint, that preference is used for both, its upper and lower bound.

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