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

The activities each require a unary resource and are of a specified type. The transition times and costs are based on the type of each activity.

/* CREATION OF A TASK */
IloActivity
MakeTask(IloModel model,
         IloUnaryResource machine,
         IloInt type,
         IloInt procTime,
         IloInt setupTime,
         const char* name) {
  IloActivity task(model.getEnv(), procTime, type, name);
  task.setStartMin(setupTime);
  model.add(task.requires(machine));
  return task;
}