Overview | Group | Tree | Graph | Index | Concepts |
An instance of the class IloCplex::SolveCallbackI
can be
used to solve node relaxations during branch & cut search. It allows
setting a starting point for the solve or selecting the algorithm on a
per-node basis.
The methods of this class are protected for use in deriving a
user-written callback class and in implementing the main
method there.
If an attempt is made to access information not available to an instance of this class, an exception is thrown.
See Also:
IloCplex, IloCplex::Callback, IloCplex::CallbackI, IloCplex::ControlCallbackI, ILOSOLVECALLBACK0
Constructor Summary | |
---|---|
protected | SolveCallbackI() |
Method Summary | |
---|---|
protected IloCplex::CplexStatus | getCplexStatus() |
protected IloAlgorithm::Status | getStatus() |
protected IloBool | isDualFeasible() |
protected IloBool | isPrimalFeasible() |
protected void | setVectors(const IloNumArray, const IloIntVarArray, const IloNumArray, const IloRangeArray) |
protected void | setVectors(const IloNumArray, const IloNumVarArray, const IloNumArray, const IloRangeArray) |
protected IloBool | solve(IloCplex::Algorithm) |
protected void | useSolution() |
Inherited Methods from CallbackI |
---|
abort, duplicateCallback, getEnv, getModel, getNcols, getNQCs, getNrows, main |
Constructor Detail |
---|
This constructor creates a callback for use in an application for solving the node LPs during branch & cut searches.
Method Detail |
---|
This method returns the ILOG CPLEX status of the instance of
IloCplex
at the current node (that is, the state of the
optimizer at the node) during the last call to SolveCallbackI::solve
(which may have been called directly in the callback
or by IloCplex
when processing the node).
The enumeration IloCplex::CplexStatus
lists the possible status values.
This method returns the status of the solution found by the
instance of IloCplex
at the current node during the last call
to SolveCallbackI::solve
(which may have been called
directly in the callback or by IloCplex
when processing the
node).
The enumeration IloAlgorithm::Status
lists the possible
status values.
This method returns IloTrue
if the solution provided
by the last solve
call is dual feasible. Note that an
IloFalse
return value does not necessarily mean that the
solution is not dual feasible. It simply means that the relevant
algorithm was not able to conclude it was dual feasible when it
terminated.
This method returns IloTrue
if the solution provided
by the last solve
call is primal feasible. Note that an
IloFalse
return value does not necessarily mean that the
solution is not primal feasible. It simply means that the relevant
algorithm was not able to conclude it was primal feasible when it
terminated.
This method allows a user to specify a starting point
for the following
invocation of the solve
method in a solve callback.
Zero can be passed for any of the parameters. However, if x
is not zero, then var
must not be zero either.
Similarly, if pi
is not zero, then
rng
must not be zero either.
For all variables in var
, x[i]
specifies
the starting value for the variable var[i]
. Similarly,
for all ranged constraints specified in
rng
, pi[i]
specifies
the starting dual value for rng[i]
.
This information is exploited at the next call to solve
,
to construct a starting point for the algorithm.
This method allows a user to specify
a starting point for the following
invocation of the solve
method in a solve callback.
Zero can be passed for any of the parameters. However, if x
is not zero, then var
must not be zero either.
Similarly, if pi
is not zero, then
rng
must not be zero either.
For all variables in var
, x[i]
specifies
the starting value for the variable var[i]
. Similarly,
for all ranged constraints specified in
rng
, pi[i]
specifies
the starting dual value for rng[i]
.
This information is exploited at the next call to solve
,
to construct a starting point for the algorithm.
This method uses the algorithm alg
to solve the
current node LP. See IloCplex::Algorithm
for a choice of algorithms to use.
A call to this method instructs IloCplex
to use the
solution generated with this callback.
If useSolution
is not called, IloCplex
uses
the algorithm selected with the parameters IloCplex::RootAlg
for the solution of the root, or IloCplex::NodeAlg
to solve
the node.