ILOG CPLEX .NET Reference Manual

Cplex.FeasOpt Method (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.

public virtual bool FeasOpt(
   INumVar[] vars,
   double[] varlb,
   double[] varub
);

Parameters

vars
An array of modeling variables. Relaxation preference values for these 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.

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 specifies that the corresponding bound must not be relaxed. These preference values are input in varlb and varub.

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