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

The class IloTransitionParam lets you build transition times and costs to apply to a resource. An instance of this class is a table of non-negative numbers, indexed by the transition type of the activities.

The IloTrue parameter indicates that the table is symmetric--that is, that the transition time is the same whether Act1 precedes Act2 or Act2 precedes Act1. The transition time is then passed to the resource with an instance of the class IloTranstionTime (in the next code section).

const IloInt numberOfTypes = 10;

  /* CREATE THE TRANSITION TABLE */

  IloTransitionParam ttParam(env, numberOfTypes, IloTrue);
  IloInt i, j;
  for(i = 0; i < numberOfTypes; ++i) {
    for(j = 0; j <= i; ++j) {
      ttParam.setValue(i, j, GetTransitionTime(i, j));
    }
  }