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

We have four workers, which allows several activities to be performed at the same time, so it is difficult to calculate a horizon for this problem.

One worker performs all the masonry, which must be completed before any other activities can be performed on a house. We could calculate the maximum possible time requirement for the masonry worker (79) and add the maximum possible time requirements for the remaining activities on house 5 (25) to get a potential horizon of 104 days.

We could also 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 21 days) to get a potential horizon of 137. We set the horizon at 150 to allow for activities, like moving, that must be performed after he completes his work.

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