FRAMES NO FRAMES

IloApplyMetaHeuristic

public IlcGoal IloApplyMetaHeuristic(IloSolver solver, IloSolution solution, IloMetaHeuristic mh, IlcGoal nhoodScanGoal)
public IloGoal IloApplyMetaHeuristic(IloEnv env, IloSolution solution, IloMetaHeuristic mh, IloGoal nhoodScanGoal)
Definition file: ilsolver/iimls.h
Include file: <ilsolver/iimls.h>

This function applies a metaheuristic filter mh to the nodes of a goal nhoodScanGoal which is used for exploring possible moves for a local search procedure (for example, IloScanNHood or IloScanDeltas). The function returns a new goal with the metaheuristic filter applied.

Implementation

IloApplyMetaHeuristic can be implemented like this:

 IlcGoal IloApplyMetaHeuristic(IloSolver solver,
                               IloSolution solution,
                               IloMetaHeuristic mh,
                               IlcGoal nhoodScanGoal) {
   return IlcAnd(IloStart(solver, mh, solution),
                 nhoodScanGoal,
                 IloTest(solver, mh));
 }

or this:

 IloGoal IloApplyMetaHeuristic(IloEnv env,
                               IloSolution solution,
                               IloMetaHeuristic mh,
                               IloGoal nhoodScanGoal) {
   return IloStart(env, mh, solution) && nhoodScanGoal
                                      && IloTest(env, mh);
 }

See Also: