IBM ILOG Solver User's Manual > Local Search > Basic Local Search > Example: Using metaheuristics > Creating the first solution

Now, we create the first solution (11):

  IloSolver solver(mdl);
  IloGoal store = IloStoreSolution(env, soln);
  IloGoal firstSol = IloAddConstraint(a[0] == 1)
                  && IloAddConstraint(a[1] == 1)
                  && store;
  solver.solve(firstSol);