IBM ILOG Dispatcher User's Manual > Transportation Industry Solutions > Adding Early and Late Costs > Review Exercises

For answers, see "Suggested Answers".

  1. What is a soft deadline?
  2. What function is used in this example to model a soft deadline?
  3. Are additional functions used to model early costs?
  4. The solving and goals portion of the code is shown below. How would this section of code change if there were no early costs?
    void RoutingSolver::solve() {
      IloDispatcher dispatcher(_solver);
      IloEnv env = _solver.getEnv();
      // Subgoals
      IloGoal instantiateCost = IloDichotomize(env,
                                               dispatcher.getCostVar(),
                                               IloFalse);
    
      IloGoal subGoal = IloSetVisitCumuls(env,
                                          IloDimension2::Find(env, "Time"),
                                          1e-6)
                     && instantiateCost;
    
      IloGoal restoreSolution = IloRestoreSolution(env, _solution) && subGoal;
      IloGoal goal = IloSavingsGenerate(env) && subGoal;
    
      // Solving
      if (findFirstSolution(goal)) {
        improve(subGoal);
        _solver.solve(restoreSolution);
      }
    }