Overview | Group | Tree | Graph | Index | Concepts |
Goals are the building blocks of search algorithms in Solver. Goals
depend on two classes: IlcGoal
and IlcGoalI
. The class IlcGoal
is the handle
class. An instance of the class IlcGoal
contains a data member
(the handle pointer) that points to an instance of the class IlcGoalI
(the implementation object) allocated on the Solver
heap. If you define a new class of goals, you must define the
implementation class together with the corresponding virtual member
function, execute
, and a member function that returns an
instance of the handle class IlcGoal
.
For more information, see the concept Goal.
See Also:
IlcAnd, ILCGOAL0, IlcGoalI, IlcOr, IloGoalFail, operator<<
Constructor Summary | |
---|---|
public | IlcGoal() |
public | IlcGoal(IlcGoalI * impl) |
public | IlcGoal(const IlcGoal & goal) |
Method Summary | |
---|---|
public IlcGoalI * | getImpl() const |
public const char * | getName() const |
public IlcAny | getObject() const |
public IloSolver | getSolver() const |
public IloSolverI * | getSolverI() const |
public void | operator=(const IlcGoal & h) |
public void | setName(const char * name) const |
public void | setObject(IlcAny object) const |
Constructor Detail |
---|
This constructor creates a goal which is empty, that is, one whose handle pointer is null. This object must then be assigned before it can be used, exactly as when you declare a pointer.
This constructor creates a handle object (an instance of the class IlcGoal
)
from a pointer to an implementation object (an instance of the implementation class IlcGoalI
).
This member function returns a pointer to the implementation object of the invoking handle, a goal.
This member function returns the solver (a handle, an instance of IloSolver
)
associated with the invoking goal.
This assignment operator copies goal
into the invoking goal by assigning an address to
the handle pointer of the invoking object. That address is the location of the implementation object of
the argument goal
.
This copy constructor creates a reference to a goal. That goal and goal
both point to
the same implementation object.
Method Detail |
---|
This member function returns an instance of IloSolver
associated with the invoking object.
This member function returns a pointer to the implementation object of the solver where the invoking object was extracted.