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

The four workers in this example are created as an array of an instance of IloUnaryResource.

  /* CREATE THE RESOURCES. */
  IloInt nbOfWorkers = 4;
  IloUnaryResourceArray workers(env,nbOfWorkers);
  for (IloInt k = 0; k < nbOfWorkers; k++)
    workers[k] = IloUnaryResource(env);