IBM ILOG Scheduler User's Manual > Integrated Applications > Extending Transition Cost Usage > Describing the Problem > Creating Transition Tables

The team of workers is modeled as a discrete resource. After each activity and before the first activity on a machine, a maintenance operation (called the setup operation when it is performed before the first activity on a machine) that requires the workers is executed according to the sequence on the machines.

Several tables are needed in the model. The first one defines the duration of the maintenance operations. This table is used to build both the maintenance operations as a transition cost and the transition time between a pair of activities on a machine. An array of integers is given for the duration of the setup operation on each machine.

IloInt TableDurations [] = { 0, 16, 14, 19,
                             12, 0, 8, 15,
                             15, 10, 0, 14,
                             16, 15, 17, 0};

IloInt SetupDurations [] = { 7, 0, 6, 7};

A transition cost table and a setup cost array are also defined for the number of workers that are required for a maintenance or setup operation. We call this the transition capacity.

IloInt TableCapacities [] = { 0, 2, 3, 1,
                              2, 0, 4, 2,
                              3, 3, 0, 2,
                              1, 2, 3, 0};

IloInt SetupCapacities [] = { 2, 1, 1, 1};

As a heuristic tie breaker for selecting the successor of an activity on a machine, we use a cost corresponding to the energy required by the maintenance activity: the product between the transition time and the transition capacity (see Solving the Problem). The transition parameters are initialized as follows:

  enerTParam = IloTransitionParam(env, numberOfTypes);
  IloTransitionParam durTParam(env, numberOfTypes);
  IloTransitionParam capTParam(env, numberOfTypes);
  for (i = 0; i < numberOfTypes; ++i) {
    durTParam.setSetup(i, setupDurations[i]);
    capTParam.setSetup(i, setupCapacities[i]);
    enerTParam.setSetup(i, setupDurations[i] * setupCapacities[i]);
    IloInt index = i * numberOfTypes;
    for(j = 0 ; j < numberOfTypes; ++j) {
      durTParam.setValue(i, j, tableDurations[index]);
      capTParam.setValue(i, j, tableCapacities[index]);
      enerTParam.setValue(i, j, tableDurations[index] *
                          tableCapacities[index]);
      ++index;
    }
  }