FRAMES NO FRAMES

IloTestDelta

public IlcGoal IloTestDelta(IloSolver solver, IloSolution solution, IloSolution delta)
public IloGoal IloTestDelta(IloEnv env, IloSolution solution, IloSolution delta)
Definition file: ilsolver/iimls.h
Include file: <ilsolver/iimls.h>

These functions take a solution solution and a delta delta, and return a goal that:

  1. Restores delta.
  2. Restores the part of solution that does not appear in delta.

The goal can fail at 1) or 2) if any constraints are violated, that is, the goal fails if the proposed change to the solution is illegal. If changes made are to be recorded back into solution, then this process must be performed afterwards, for example, using solution.store(solver). Alternatively, you can use IloCommitDelta.

Implementation

The execute method for a goal that behaves in this way can be implemented as follows:

 IlcGoal IloTestDelta::execute() {
   delta.restore(solver);
   solution.restore(solver, delta);
   return 0;
 }

For more information, see IloSolution in the IBM ILOG Concert Technology Reference Manual.

See Also: