IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Scheduler Building Blocks > Resource Constraints > Maximal and Minimal Capacity Constraints

We distinguish three main families of scheduling problems, depending on the degrees of freedom that exist for positioning resource supply and resource demand intervals over time. In pure sequencing problems (for example, job-shop machine scheduling), the maximal capacity of each resource is defined, and the problem consists of positioning resource-demanding activities over time, without ever exceeding the available capacity. In pure resource allocation problems (for example, allocation of personnel to planes or trains), the demand for each resource is defined, and the problem consists of allocating resources in time to guarantee that the supply always equals or exceeds the demand. In joint problems, degrees of freedom exist for deciding both which activities to perform and when, and which resources to make available for these activities.

In Scheduler, there are two ways to handle these needs. When the resource has a maximal capacity that cannot be exceeded, one can use the member functions setCapacityMax (with IloDiscreteResource), setEnergyMax (with IloDiscreteEnergy) or setLevelMax (with IloReservoir and IloContinuousReservoir). When the problem is defined in terms of capacity that must be available over certain time intervals, one can use the member functions setCapacityMin (with IloDiscreteResource), setEnergyMin (with IloDiscreteEnergy) or setLevelMin (with IloReservoir and IloContinuousReservoir).

In general (but this rule allows exceptions), on the resources of a pure sequencing problem only maximal capacity constraints are defined. For example, in a manufacturing environment the activities require machines, the capacity of which is known to be bounded over time. Conversely, on the resources of a pure resource allocation problem only minimal capacity constraints are defined. For example, work shifts in a hospital require that the activities representing the presence of nurses are scheduled in such a way that minimal capacity levels are met. Examples follow.

Example--Maximal Capacity Constraints

To illustrate the use of maximal capacity constraints, let's take as an example a machine shop where groups of machines have to be serviced or maintained regularly, and consequently each machine is not available for production during its maintenance period.

The following function creates a group of n machines, m of which are not available over the interval [maintenanceStart maintenanceEnd).

IloDiscreteResource MakeMachineGroup(IloEnv env,
IloNum n,
IloNum m,
IloNum maintenanceStart,
IloNum maintenanceEnd) {
IloDiscreteResource group(env, n);
group.setCapacityMax(maintenanceStart, maintenanceEnd, n - m);
return group;
}

Example--Minimal Capacity Constraints

To illustrate the use of minimal capacity constraints, let's consider the problem of scheduling nurses for surgical operations.

The following function creates a group of n nurses, m of which must be present over the interval [operationStart operationEnd).

IloDiscreteResource MakeNurseGroup(IloEnv env, 
IloNum n,
IloNum m,
IloNum operationStart,
IloNum operationEnd) {
IloDiscreteResource group(env, n);
group.setCapacityMin(operationStart, operationEnd, m);
return group;
}

In this example, a certain number of nurses are needed during an operation, so the schedule has to provide that minimal capacity throughout the interval.