FRAMES NO FRAMES

Macro IlcTransitionTime

Definition file: ilsched/schedule.h
IlcTransitionTime(fct)

This macro defines a function that returns an instance of the class IlcTransitionTimeObject. Such an object can be passed to constructors of the classes IlcUnaryResource and IlcStateResource. In that case, the object defines which transition time function will be used for the resource being constructed.

Example

The call IlcTransitionTime(functionName) defines the following function:

 IlcTransitionTimeObject functionNameObject(IloSolver s0);

The argument functionName should be a pointer to a function that takes two instances of the class IlcResourceConstraint as its arguments and returns an integer.

Here is an example of such a function:

 IlcInt myTransTimeFct(const IlcResourceConstraint rct1,
 		      const IlcResourceConstraint rct2)
 {
   return (rct1.getActivity().getDurationMin() +
 	  rct2.getActivity().getDurationMin());
 }

Now using that function and the call IlcTransitionTime(myTransTimeFct), you can define the following function:

 IlcTransitionTimeObject myTransTimeFctObject(IloSolver s0);

This last function can be used to define the transition time of a resource, like this:

 IlcUnaryResource resource(schedule, myTransTimeFctObject(solver));
 

See Also: