IBM ILOG Scheduler User's Manual > Local Search in Scheduler > Tabu Search for the Jobshop Problem with Alternatives > Solving the Problem > Creating an IloSchedulerSolution

The IloSchedulerSolution is created in the same way as it was created in the previous chapter, with one difference. Since we have two types of decision variables--the next resource constraint and the selected resource of each resource constraint--we need to restore both. To do this we set the restorable status of the resource constraints in the solution to a value that specifies that both the next and the resource selection should be restored.

  for (IloIterator <IloResourceConstraint> iter(env); iter.ok(); ++iter)
    lsSolution.setRestorable(*iter, 
                             IloRestoreRCNext | IloRestoreRCSelected);

We do not add the resource constraint to the solution because it was already added to the solution during the model definition.