ILOG CPLEX .NET Reference Manual

Cplex.GetInfeasibility Method (IConstraint)

Returns the infeasibility value for a constraint.

public virtual double GetInfeasibility(
   IConstraint con
);

Parameters

con
The constraint whose infeasibility value is being queried. This constraint must be in the active model, either directly or through an instance of ILPMatrix.

Return Value

The infeasibility value for the constraint. The infeasibility value is 0 (zero) if the constraint is satisfied, nonzero otherwise. More specifically, for a range constraint with finite lower bound and upper bound, if the infeasibility value is negative, that value indicates the amount by which the lower bound of the range must be changed to make the current solution feasible; if the value is positive, it indicates the amount by which the upper bound of the range must be changed. For a more general constraint such as IOr, IAnd, ISOS1, or ISOS2, the infeasibility value returned is the maximal absolute infeasibility value over all range constraints and variables created by the extraction of the queried constraint.

Remarks

UnknownObjectException con is not in the active model ILOG.Concert.Exception If the method fails, an exception of type ILOG.Concert.Exception, or one of its derived classes, is thrown.

See Also

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