IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Adding Transition Times > Define the Problem, Design a Model > Define a Function for Building the Houses

The function MakeHouse describes the problem of building a house.

void MakeHouse(IloModel model,
               const IloNum* dur, 
               const IloNum startMin,
               const IloNum endMax,
               const IloUnaryResource worker,
               const IloNumVar makespan)
{

The following lines of code define the three houses to be built. Each house design uses a different array to define the durations of the activities (a different durationsDesign). The earliest start and latest end dates for the first and third houses are the origin and horizon of the schedule, but the second house has an earliest start date of 5 and a latest end date of 80.

  /* CREATE THE ACTIVITIES AND CONSTRAINTS FOR THE HOUSES. */
  MakeHouse(model, durationsDesign1, 0, horizon, worker, makespan);
  MakeHouse(model, durationsDesign2, 5, 80, worker, makespan);
  MakeHouse(model, durationsDesign3, 0, horizon, worker, makespan);