IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Adding Alternative Resources > Define the Problem, Design a Model > Calculate the Horizon

As in Adding Breaks, it is difficult to calculate a horizon for this problem.

However, we can calculate the maximum possible time requirement for the worker who performs the carpentry, ceiling, roofing, facade, and windows tasks (including a maximum delayed start of 15 days) to get a potential horizon of 85. We set the horizon at 91 to allow for activities, like moving, that must be performed after he completes his work.

  /* CREATE THE MAKESPAN VARIABLE */
  IloNum horizon = 91;
  makespan = IloNumVar(env, 0, horizon, IloNumVar::Int);