![]() |
|
Typically, the implementation of method execute()
will perform the following steps:
IloCplex
provides a selection of special goals that can be used to specify how to proceed:
IloCplex::GoalI::OrGoal()
(IloCplex.or()
) returns a goal that creates subnodes of the current node. This function takes at least 2 and up to 6 goals as parameters. For each of its parameters, the Or
goal will create a subnode in such a way that when processing that subnode, the corresponding goal will be executed. Once the goal has been executed, the current node is immediately deactivated.
IloCplex::GoalI::AndGoal()
(IloCplex.and()
) also takes goals as parameters. It returns a goal that will cause IloCplex
to execute the goals passed as parameters in the order of the parameters.
IloCplex::GoalI::FailGoal()
(IloCplex.failGoal()
) creates a goal that causes IloCplex
to prune the current node. In other words, it discontinues the search at the node where the goal is executed. IloCplex
will continue with another active node from the tree, if available.
IloCplex::Goal
has constructors that take an IloRange
object or an IloRangeArray
(IloRange[]
)object as parameters. When one of these constructors is used, a local cut goal is created. Local cut goals add local cuts to the node where they are executed. To create local cut goals with the Java API, use method IloCplex.constraintGoal()
or if more convenient, one of the methods IloCplex.leGoal()
, IloCplex.geGoal()
or IloCplex.eqGoal()
.
null
) goal, or empty goal, that is, an IloCplex::Goal
handle object with 0 implementation pointer can also be returned by method IloCplex::GoalI::execute().
In most cases this will instruct IloCplex
to take over control of the branch & cut search with its built-in strategies.
instead. This macro defines two things, class MyBranchGoalI
and function
The goal is then used for solving the extracted node by calling: