IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Adding Transition Times > Define the Problem, Design a Model > Create Activities

The following code creates the ten activities masonry, carpentry, plumbing, ceiling, roofing, painting, windows, facade, garden, and moving. The argument dur accesses the durationsDesign array. The third argument, the integer 0 through 9, is the transition type. The transition type is used in the next section to define the transition time.


  /* CREATE THE ACTIVITIES. */
  IloActivity masonry(env,   dur[0], 1, "masonry   ");
  IloActivity carpentry(env, dur[1], 2, "carpentry ");
  IloActivity plumbing(env,  dur[2], 3, "plumbing  ");
  IloActivity ceiling(env,   dur[3], 4, "ceiling   ");
  IloActivity roofing(env,   dur[4], 5, "roofing   ");
  IloActivity painting(env,  dur[5], 6, "painting  ");
  IloActivity windows(env,   dur[6], 7, "windows   ");
  IloActivity facade(env,    dur[7], 8, "facade    ");
  IloActivity garden(env,    dur[8], 9, "garden    ");
  IloActivity moving(env,    dur[9], 0, "moving    ");