| IBM ILOG Solver User's Manual > Extending the Library > Writing a Goal: Car Sequencing > Writing your own goal > Using ILOCPGOALWRAPPER to wrap the goals |
Using ILOCPGOALWRAPPER to wrap the goals |
INDEX
PREVIOUS
NEXT
|
There are several situations in which you might need to wrap a goal in an instance of IloGoal:
IloSolver::solve.
IloSolver::startNewSearch.
In such situations, use the macro ILOCPGOALWRAPPERn to wrap your goal.
For example, you can wrap the PrintAll goal in an instance of IloGoal in this way:
ILOCPGOALWRAPPER0(IloPrintAll, solver){ return PrintAll(solver); } |
To create an instance of this goal you write:
IloPrintAll(env); |
The IloGoal object returned can then be passed as a parameter of the IloSolver::solve and IloSolver:startNewSearch functions.
| © Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |