|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ilog.cplex.IloCplex.Callback | +--ilog.cplex.IloCplex.MIPCallback | +--ilog.cplex.IloCplex.ControlCallback
The control callback class is a base class for other callback classes. It is the base class for the following callback classes that allow you to query or take control over the branch and cut search conducted by the CPLEX MIP optimizer:
ControlCallback
is not a callback for implementing user
functionality
itself, but rather provides the common interface for the above listed
callback classes. These callbacks share the property that they are
called for at each node of the branch and cut search tree, and allow you
to access node-related data. For each branch and cut, node these callbacks
are called in the following order:
IloCplex.SolveCallback
: This callback is called
whenever an LP
needs to be solved at a node. Note that this can happen more
than once if cuts are added to the LP either by
IloCplex
itself
or from a UserCutCallback
or
LazyConstraintCallback
.
IloCplex.UserCutCallback
: Once the node LP has
been solved, and
IloCplex
has added all its cuts, the user cut
callback is
called. In case new cuts are added to the problem, the LP is
solved again. This is iterated until no more cuts are added to
the problem.
IloCplex.LazyConstraintCallback
: Once the node LP
has been
solved, and IloCplex
has added all its cuts, the
user cut
callback is called. In case new cuts are added to the problem,
the LP is solved again. This is iterated until no more cuts
are added to the problem.
IloCplex.HeuristicCallback
: Once the node has
been fully
solved (that is including all the cuts that might have been
added), the heuristic callback is called in an attempt to
generate an integer feasible solution from the current LP
solution at that node.
IloCplex.BranchCallback
: Finally, if the LP
solution at the
current node is either integer infeasible or rejected by a user
IloCplex.IncumbentCallback
, the problem is split into
subproblems. At that point the
IloCplex.BranchCallback
can
be used to control how to create the subproblems.
IloCplex.Callback
,
IloCplex.BranchCallback
,
IloCplex.UserCutCallback
,
IloCplex.LazyConstraintCallback
,
IloCplex.HeuristicCallback
,
IloCplex.SolveCallback
Constructor Summary | |
IloCplex.ControlCallback()
|
Method Summary | |
protected double |
getDownPseudoCost(IloNumVar var)
Gets the pseudo cost for branching down on variable var . |
protected IloCplex.IntegerFeasibilityStatus[] |
getFeasibilities(IloNumVar[] var)
Indicates whether the variables in the IloNumVar array
var are integer feasible, integer infeasible, or implied
integer feasible in the current node solution. |
protected IloCplex.IntegerFeasibilityStatus[] |
getFeasibilities(IloNumVar[] var,
int start,
int num)
Indicates whether the variables in the IloNumVar array
var are integer feasible, integer infeasible, or implied
integer feasible in the current node solution. |
protected IloCplex.IntegerFeasibilityStatus |
getFeasibility(IloNumVar var)
Indicates whether the variable var is integer feasible,
integer infeasible, or implied integer feasible in the current node
solution. |
protected double |
getLB(IloNumVar var)
Gets the current lower bound for a var . |
protected double[] |
getLBs(IloNumVar[] var)
Gets the current lower bounds for an array of variables. |
protected double[] |
getLBs(IloNumVar[] var,
int start,
int num)
Gets the current lower bounds for a set of variables. |
protected double |
getObjCoef(IloNumVar var)
Gets the linear objective function coefficient for variable var in the model being solved. |
protected double[] |
getObjCoefs(IloNumVar[] vars)
Gets the linear objective function coefficients for an array of variables. |
protected double[] |
getObjCoefs(IloNumVar[] vars,
int start,
int num)
Gets the linear objective function coefficients for a set of variables. |
protected double |
getObjValue()
Gets the objective function of the solution of the current node LP. |
protected double |
getSlack(IloRange rng)
Gets the slack value of a constraint in the solution of the current node LP. |
protected double[] |
getSlacks(IloRange[] rng)
Gets the slack values for an array of constraints in the solution of the current node LP. |
protected double[] |
getSlacks(IloRange[] rng,
int start,
int num)
Gets the slack values for a set of constraints in the solution of the current node LP. |
protected IloCplex.IntegerFeasibilityStatus |
getSOSFeasibility(IloSOS1 sos)
Indicates whether the special ordered set type 1 is integer feasible, integer infeasible, or implied integer feasible in the current node solution. |
protected IloCplex.IntegerFeasibilityStatus |
getSOSFeasibility(IloSOS2 sos)
Indicates whether the special ordered set type 2 is integer feasible, integer infeasible, or implied integer feasible in the current node solution. |
protected double |
getUB(IloNumVar var)
Gets the upper bound for variable var at the current node. |
protected double[] |
getUBs(IloNumVar[] var)
Gets the current upper bounds for an array of variables. |
protected double[] |
getUBs(IloNumVar[] var,
int start,
int num)
Gets the current upper bounds for a set of variables. |
protected double |
getUpPseudoCost(IloNumVar var)
Gets the pseudo cost for branching up on variable var . |
protected double |
getValue(IloNumExpr expr)
Gets the value expr takes for the solution of the current
node LP. |
protected double |
getValue(IloNumVar var)
Gets the value of a variable in the solution of the current node LP. |
protected double[] |
getValues(IloNumVar[] var)
Gets the values of an array of variables in the solution of the current node LP. |
protected double[] |
getValues(IloNumVar[] var,
int start,
int num)
Gets the values of a set of variables in the solution of the current node LP. |
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 |
public IloCplex.ControlCallback()
Method Detail |
protected double getLB(IloNumVar var)
var
.var
- The variable for which to query the current lower
bound.var
in the LP at the
current node.protected double[] getLBs(IloNumVar[] var)
var
- An array of variables for which to query the current
lower bound.lb
, lb[j] contains the
lower bound of variable var[j]
in the LP
of the current node.protected double[] getLBs(IloNumVar[] var, int start, int num)
var
- An array containing the variables for which to query
the current lower bound.start
- The index of the first variable in var for which to query
the current lower bound.num
- The number of variables in var for which to query
the current lower bound.lb
, lb[j]
contains the lower bound of
variable var[j+start]
in the LP of the
current node, for j = 0, ..., num-1
.protected double getUB(IloNumVar var)
var
at the current node.var
- The variable for which to query the current upper
bound.var
in the LP at the
current node.protected double[] getUBs(IloNumVar[] var)
var
- An array of variables for which to query the current
upper bound.lb
, lb[j] contains the
upper bound of
variable var[j]
in the LP of the current node.protected double[] getUBs(IloNumVar[] var, int start, int num)
var
- An array containing the variables for which to query
the current upper bound.start
- The index of the first variable in var for which to query
the current upper bound.num
- The number of variables in var for which to query
the current upper bound.lb
, lb[j]
contains the upper bound of variable
var[j+start]
in the LP of the current
node, for j = 0, ..., num-1
.protected double getObjValue()
protected double getValue(IloNumVar var)
var
- The variable for which to query the current solution
value.var
in the solution of
the current node LP.protected double[] getValues(IloNumVar[] var)
var
- An array of variables for which to query the current
solution values.x
,
x[j]
contains the current solution value
for variable var[j]
.protected double[] getValues(IloNumVar[] var, int start, int num)
var
- An array containing the variables for which to query the
current solution values.start
- The index of the first variable in var for which to query
the current solution values.num
- The number of variables in var for which to query
the current solution values.x
,
x[j]
contains the current solution value
for variable var[j]
.protected double getSlack(IloRange rng)
rng
- The constraint for which to query the current slack
value.protected double[] getSlacks(IloRange[] rng)
rng
- An array of constraints for which to query the current
slack values.x
, x[j]
contains the current
slack value for constraints rng[j]
.protected double[] getSlacks(IloRange[] rng, int start, int num)
rng
- An array containing the constraints for which to query
the current slack values.start
- The index of the first variable in var for which to query
the current slack values.num
- The number of variables in var for which to query
the current slack values.x
,
x[j]
contains the current slack value for
constraints rng[j]
.protected double getValue(IloNumExpr expr) throws IloException
expr
takes for the solution of the current
node LP.expr
- The expression for which to evaluate the solution.expr
takes for the solution of the
current node LP.protected double getObjCoef(IloNumVar var)
var
in the model being solved.var
- The variable for which to query the linear objective
coefficient.var
in the model
being solved.protected double[] getObjCoefs(IloNumVar[] vars)
var
- An array of variables for which to query the linear
objective function coefficients.obj
, obj[j]
contains the linear
objective function coefficient for variable
var[j]
.protected double[] getObjCoefs(IloNumVar[] vars, int start, int num)
var
- An array containing variables for which to query the
linear objective function coefficients.start
- The index of the first variable in var for which to query
the linear objective function coefficients.num
- The number of variables in var for which to query
the linear objective function coefficients.obj
, obj[j]
contains the linear
objective function coefficient for variable
var[j+start]
,
for j = 0, ..., num-1
.protected double getDownPseudoCost(IloNumVar var)
var
.var
- The variable for which to query the down pseudo cost.var
.protected double getUpPseudoCost(IloNumVar var)
var
.var
- The variable for which to query the up pseudo cost.var
.protected IloCplex.IntegerFeasibilityStatus getFeasibility(IloNumVar var)
var
is integer feasible,
integer infeasible, or implied integer feasible in the current node
solution.var
- The variable for which the integer feasibility status is to
be queried.protected IloCplex.IntegerFeasibilityStatus[] getFeasibilities(IloNumVar[] var)
IloNumVar
array
var
are integer feasible, integer infeasible, or implied
integer feasible in the current node solution.var
- The array of variables for which the integer feasibility
status is queried.protected IloCplex.IntegerFeasibilityStatus[] getFeasibilities(IloNumVar[] var, int start, int num)
IloNumVar
array
var
are integer feasible, integer infeasible, or implied
integer feasible in the current node solution.var
- An array containing variables for which the integer
feasibility status is to be queried.start
- The index of the first variable in the array
var
for which the integer feasibility status is to be
queried.num
- The number of variables in the array var
,
starting with start
, for which the integer infeasibility
status is to be queried.protected IloCplex.IntegerFeasibilityStatus getSOSFeasibility(IloSOS1 sos)
sos
- The SOS1
for which integer feasibility is to
be queried.protected IloCplex.IntegerFeasibilityStatus getSOSFeasibility(IloSOS2 sos)
sos
- The SOS2
for which integer feasibility is to
be queried.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |