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

The following lines create the worker as an object of the IloUnaryResource class. The transition time object is bound to the resource to ensure that the transition times are taken into consideration. The enforcement level IloMediumHigh means that Scheduler will spend more effort at enforcing the constraint than it would by default.

  /* CREATE THE RESOURCE. */
  IloUnaryResource worker(env);
  IloTransitionTime tt(worker, ttParam);
  worker.setCapacityEnforcement(IloMediumHigh);