IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Using the Trace Facilities > Define the Problem, Design a Model > Deciding which Objects to Trace

We will describe here a method that relies on information stored in the model itself: for each object that may be traced, we will use the method setObject(IloAny) (defined on the class IloExtractable) to "mark" the object as being traced.

To trace all the plumbing activities, we use:

  plumbing.setObject((IloAny)1);

This line of code is in the MakeHouse function that builds all the activities corresponding to one house. In this way the three plumbing activities are marked.

To trace all the activities that require the fourth worker, we mark this resource the same way, in the function DefineModel.

  workers[3].setObject((IloAny)1);

Of course, tracing all the activities in the model does not require any mark.