IBM ILOG Scheduler User's Manual > Advanced Concepts > Using Transition Times and Costs > Problem Description > Creating Transition Tables

In this model, a transition table defines the duration of the maintenance operations. This table is used to build both the duration of the maintenance operations as a transition cost and the transition time between two 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 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};

In order to select the successor of an activity on a machine, we define a transition cost, defined as the energy required by the maintenance operation, that is the product between the transition time and the transition capacity.

  /* CREATE THE TRANSITION FUNCTIONS. */
  enrTransParam = IloTransitionParam(env, numberOfTypes, IloFalse);
  IloTransitionParam durTransParam(env, numberOfTypes, IloFalse);
  for(i = 0; i < numberOfTypes; ++i) {
    enrTransParam.setSetup(i, setupDurations[i] * setupCapacities[i]);
    IloInt index = i * numberOfTypes;
    for(j = 0 ; j < numberOfTypes; ++j) {
      durTransParam.setValue(i, j, tableDurations[index]);
      enrTransParam.setValue(i, j,
                       (tableDurations[index] * tableCapacities[index]));
      ++index;
    }
  }