ilog.cplex
Class IloCplex.LPCallback
java.lang.Object
|
+--ilog.cplex.IloCplex.Callback
|
+--ilog.cplex.IloCplex.LPCallback
- Direct Known Subclasses:
- IloCplex.BarrierCallback, IloCplex.DualSimplexCallback, IloCplex.PrimalSimplexCallback
- public abstract static class IloCplex.LPCallback
- extends IloCplex.Callback
The LP callback class for user-written callbacks.
LP callbacks are executed at every iteration during the solution of an
LP with the dual simplex algorith, the primal simplex algorithm or the
barrier algorithm. Callbacks that are only effective with a specific
algorithm are also available as classes
IloCplex.DualSimplexCallback
,
IloCplex.PrimalSimplexCallback
, and
IloCplex.BarrierCallback
.
- See Also:
IloCplex.Callback
,
IloCplex.DualSimplexCallback
,
IloCplex.PrimalSimplexCallback
,
IloCplex.BarrierCallback
Method Summary |
protected double |
getDualInfeasibility()
Gets a measure for the dual infeasibility of the current
solution. |
protected double |
getInfeasibility()
Gets a measure for the primal infeasibility of the current
solution. |
protected int |
getNiterations()
Gets the number of iterations performed so far. |
protected double |
getObjValue()
Gets the current objective value. |
protected boolean |
isDualFeasible()
Gets a boolean indicating whether the current solution is dual
feasible. |
protected boolean |
isFeasible()
Gets a boolean indicating whether the current solution is primal
feasible. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IloCplex.LPCallback
protected IloCplex.LPCallback(int type)
IloCplex.LPCallback
protected IloCplex.LPCallback()
- The user-written callback constructor.
This constructor can be called only for constructing objects of derived
user-written callback classes, not to construct
IloCplex.LPCallback
objects directly.
getObjValue
protected double getObjValue()
- Gets the current objective value.
The current objective value is the objective value at the point when
the callback is called. In the simplex method, this objective
value may not apply to the objective function defined for the
model being solved, but an artificial phase 1 objective function used
to achieve primal or dual feasibility. In the barrier method, where
the objective functions can be computed using dual or primal vectors
and both definitions are not equivalent (unless optimality is
achieved), the primal objective function is returned.
- Returns:
- The current objective value.
getInfeasibility
protected double getInfeasibility()
- Gets a measure for the primal infeasibility of the current
solution.
If the current solution is feasible
0
will be returned.
Otherwise a positive value will be returned.
- Returns:
- A measure for the primal infeasibility of the current
solution.
getDualInfeasibility
protected double getDualInfeasibility()
- Gets a measure for the dual infeasibility of the current
solution. If the current solution is feasible
0
will be
returned. Otherwise a positive value will be returned.
- Returns:
- A measure for the dual infeasibility of the current solution.
isFeasible
protected boolean isFeasible()
- Gets a boolean indicating whether the current solution is primal
feasible.
- Returns:
- A boolean indicating whether the current solution is primal
feasible.
isDualFeasible
protected boolean isDualFeasible()
- Gets a boolean indicating whether the current solution is dual
feasible.
- Returns:
- A boolean indicating whether the current solution is dual
feasible.
getNiterations
protected int getNiterations()
- Gets the number of iterations performed so far.
- Returns:
- The number of iterations performed so far.