IBM ILOG Scheduler User's Manual > Integrated Applications > Handling an Overconstrained Problem: Adding Due Dates to the Bridge Problem > Solving the Problem

The solution search is done with a call to the member function IloSolver::solve.

    IloEnv env;
    IloNumVar makespan;
    IloModel model = DefineModel(env, 
                                 DueDates,
                                 makespan,
                                 NumberOfActivities);
  
    IloSolver solver(model);
    IloGoal goal = IloRankForward(env, makespan);
    IlcScheduler scheduler(solver);
 
    /* FIRST TRY: TARGETED DUE DATES */
    solver.out() << endl << "----------------------------------------" << endl;
    solver.out() << "First try: targeted due dates" << endl;
 
    if (solver.solve(goal)) {
      solver.out() << "current value of makespan: " 
                   << solver.getMin(makespan) << endl;
      PrintSolution(solver);
    }
    else 
      solver.out() << "No solution! " << endl;
 

However, no solution to the problem is found because some targeted due dates are too strong to be satisfied. We can relax the problem by removing selected constraints and this should lead to a solvable problem. For instance, we could apply the following procedure:

  1. Remove the first targeted due date and search for a solution.
  2. If there is no solution, remove the second targeted due date and search again for a solution.
  3. Continue the process with the third targeted due date, then the fourth, etc., until a solution is found.

This way of proceeding is too simple and appears to be inefficient because we have no guarantee that we remove the strongest due date constraints.