IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Adding Integral and Functional Constraints > Define the Problem, Design a Model > Worker's efficiency |
Worker's efficiency |
INDEX
![]() |
We use a granular function in order to model the worker's efficiency. The granularity specified when constructing this IloGranularFunction
is 100, so this is then the default initial value over the definition interval [0, horizon)
. We set the part-time efficiency for Wednesday and Saturday (50%), as well as the break on Sunday (0%), repeatedly over the time horizon using the setValue
member function.
The exceptional days off are also modeled with a zero efficiency.
Note |
We have chosen to express the efficiency with a percentage. Hence, the granularity of the IloGranularFunction is set to 100 at construction time. An alternative method of modeling would be to split the working days into mornings and afternoons, and use a granularity of 2 without loss of precision.
|
We must specify that the worker works at this reduced efficiency for every activity he might be asked to process. Hence we add to the model the following integral constraint.
model.add( IloResourceIntegralConstraint(worker, IloProcessingTimeVariable, efficiency)); |
This constraint binds the processing time of every activity executed on the unary resource worker
to be equal to the sum of the function over its duration interval [start,end]
.
By default, an activity is non-breakable. We use the IloActivity
member function setBreakable
to declare an activity breakable.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |