ilog.cplex
Class IloCplex.IncumbentCallback

java.lang.Object
  |
  +--ilog.cplex.IloCplex.Callback
        |
        +--ilog.cplex.IloCplex.MIPCallback
              |
              +--ilog.cplex.IloCplex.IncumbentCallback

public abstract static class IloCplex.IncumbentCallback
extends IloCplex.MIPCallback

This callback class is called whenever a new potential incumbent is found during branch and cut searches. It allows you to analyze the proposed incumbent and optionally reject it. In this case CPLEX will continue the branch and cut search.

See Also:
IloCplex.MIPCallback

Constructor Summary
protected IloCplex.IncumbentCallback()
           
 
Method Summary
protected  double getObjValue()
          Gets the objective value of the potential incumbent.
protected  double getValue(IloNumExpr expr)
          Gets the value expr takes for the solution of the proposed incumbent solution.
protected  double getValue(IloNumVar var)
          Gets the value of the variable var in the potential incumbent solution.
protected  double[] getValues(IloNumVar[] var)
          Gets the values of variables in the array var of variables in the potential incumbent solution.
protected  double[] getValues(IloNumVar[] var, int start, int num)
          Gets the values of num variables in the array var of variables in the potential incumbent solution.
protected  void reject()
          Rejects the proposed incumbent solution.
 
Methods inherited from class ilog.cplex.IloCplex.MIPCallback
getBestObjValue, getCutoff, getDirection, getIncumbentObjValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getNcliques, getNcovers, getNdisjunctiveCuts, getNflowCovers, getNflowPaths, getNfractionalCuts, getNGUBcovers, getNimpliedBounds, getNiterations, getNMIRs, getNnodes, getNremainingNodes, getPriority, isIntegerFeasible
 
Methods inherited from class ilog.cplex.IloCplex.Callback
abort, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IloCplex.IncumbentCallback

protected IloCplex.IncumbentCallback()
Method Detail

getObjValue

protected double getObjValue()
Gets the objective value of the potential incumbent.
Returns:
The objective value of the potential incumbent.

getValue

protected double getValue(IloNumVar var)
                   throws IloException
Gets the value of the variable var in the potential incumbent solution.
Parameters:
var - The variable whose value is to be returned.
Returns:
The value of var in the potential incumbent solution.

getValues

protected double[] getValues(IloNumVar[] var)
                      throws IloException
Gets the values of variables in the array var of variables in the potential incumbent solution.
Parameters:
var - The array of variables whose values are required.
Returns:
The values of the variables in the array var.

getValues

protected double[] getValues(IloNumVar[] var,
                             int start,
                             int num)
                      throws IloException
Gets the values of num variables in the array var of variables in the potential incumbent solution.
Parameters:
var - The array of variables containing the numvalues are required.
start - The index of the first variable whose value is required in the array var.
num - The number of variables in the array var, starting with start, whose values are required.

getValue

protected double getValue(IloNumExpr expr)
                   throws IloException
Gets the value expr takes for the solution of the proposed incumbent solution.
Parameters:
expr - expression for which to evaluate the solution.
Returns:
the value expr takes for the solution of the proposed incumbent solution.

reject

protected void reject()
Rejects the proposed incumbent solution.