Overview | Group | Tree | Graph | Index | Concepts |
Goals can be used to control the branch & cut search in
IloCplex
. Goals are implemented
in the class
IloCplex::GoalI
.
This is the handle class for CPLEX goals.
Goal objects are reference-counted. This means every instance of
IloCplex::GoalI
keeps track about how many
handle objects refer to it. If this number drops to 0 the IloCplex::GoalI
object is automatically deleted. As a
consequence, whenever you deal with a goal, you must keep a handle object
around rather than only a pointer to the implementation object. Otherwise,
you risk ending up with a pointer to an implementation object that has
already been deleted.
See Goals among the Concepts in this manual. See also goals in the ILOG CPLEX User's Manual.
Constructor and Destructor Summary | |
---|---|
public | Goal(IloCplex::GoalBaseI *) |
public | Goal(const Goal &) |
public | Goal() |
public | Goal(IloConstraint) |
public | Goal(IloConstraintArray) |
Method Summary | |
---|---|
public Goal | operator=(const Goal &) |
Constructor and Destructor Detail |
---|
Creates a new goal from a pointer to the implementation object.
This is the copy constructor of the goal.
Creates a 0 goal handle, that is, a goal with a 0 implementation object pointer. This is also referred to as an empty goal.
Creates a new goal that will add the constraint cut
as a local cut to the node where the goal is executed. As a local cut,
the
constraint will be active only in the subtree rooted at the node
where the
goal was executed. The lifetime of the constraint passed to a goal
is tied
to the lifetime of the Goal. That is, the constraint's method
end
is called when the goal's implementation object is
deleted. As a consequence, the method end
must not be called
for constraints passed to this constructor explicitly.
Creates a new goal that adds the constraints given in the array
cut
as local cuts to the node where the goal is executed. As
local cuts, the constraints will be active only in the subtree rooted at
the node where the goal was executed. The lifetime of the constraints
and the array passed to a goal is tied to the lifetime of the Goal.
That is, the constraint's method end
is called when the
goal's implementation object is deleted. As a consequence, method
end
must not be called for the constraints and the array
passed to this constructor explicitly.
Method Detail |
---|
This is the assignment operator. It increases the reference count of
the implementation object of goal
. If the invoking handle
referred to an implementation object before the assignment operation,
its reference count is decreased. If thereby the reference count
becomes 0, the implementation object is deleted.