ilog.cplex
Class IloCplex.ContinuousCallback

java.lang.Object
  |
  +--ilog.cplex.IloCplex.Callback
        |
        +--ilog.cplex.IloCplex.ContinuousCallback
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
IloCplex.BarrierCallback, IloCplex.SimplexCallback
Enclosing class:
IloCplex

public abstract static class IloCplex.ContinuousCallback
extends IloCplex.Callback

The callback base class for user-written continuous callbacks.

Continuous callbacks are executed at every iteration of the simplex algorithm or the barrier algorithm during the solution of a continuous model. Algorithm-specific callbacks are also available via the extensions IloCplex.SimplexCallback and IloCplex.BarrierCallback. Note that by setting a continuous callback with the method IloCplex.use, you set the same callback for both the simplex and the barrier callback, thus potentially overriding other callbacks of these types previously installed.

The constructor and methods of this class are protected to make sure that they are used only to derive a user-written callback class or to implement the main method in it.

See Also:
IloCplex.Callback, IloCplex.SimplexCallback, IloCplex.BarrierCallback

Constructor Summary
protected IloCplex.ContinuousCallback()
          The user-written callback constructor.
 
Method Summary
protected  double getDualInfeasibility()
          Returns a measure for the dual infeasibility of the current solution.
protected  double getInfeasibility()
          Returns a measure for the primal infeasibility of the current solution.
protected  int getNiterations()
          Returns the number of iterations performed so far.
protected  double getObjValue()
          Returns the current objective value.
protected  boolean isDualFeasible()
          Returns a Boolean value indicating whether the current solution is dual feasible.
protected  boolean isFeasible()
          Returns a Boolean value indicating whether the current solution is primal feasible.
 
Methods inherited from class ilog.cplex.IloCplex.Callback
abort, getModel, getNcols, getNQCs, getNrows, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IloCplex.ContinuousCallback

protected IloCplex.ContinuousCallback()
The user-written callback constructor. This constructor can be called only to construct objects of derived user-written callback classes, not to construct IloCplex.ContinuousCallback objects directly.

Method Detail

getObjValue

protected double getObjValue()
                      throws IloException
Returns 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 reflect 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.
IloException

getInfeasibility

protected double getInfeasibility()
                           throws IloException
Returns a measure for the primal infeasibility of the current solution. If the current solution is primal feasible, a value of 0 will be returned. Otherwise a positive value will be returned.

Returns:
A measure for the primal infeasibility of the current solution.
IloException

getDualInfeasibility

protected double getDualInfeasibility()
                               throws IloException
Returns a measure for the dual infeasibility of the current solution. If the current solution is dual feasible, a value of 0 will be returned. Otherwise a positive value will be returned.

Returns:
A measure for the dual infeasibility of the current solution.
IloException

isFeasible

protected boolean isFeasible()
                      throws IloException
Returns a Boolean value indicating whether the current solution is primal feasible.

Returns:
A Boolean value indicating whether the current solution is primal feasible.
IloException

isDualFeasible

protected boolean isDualFeasible()
                          throws IloException
Returns a Boolean value indicating whether the current solution is dual feasible.

Returns:
A Boolean value indicating whether the current solution is dual feasible.
IloException

getNiterations

protected int getNiterations()
                      throws IloException
Returns the number of iterations performed so far.

Returns:
The number of iterations performed so far.
IloException