IBM ILOG Scheduler User's Manual > Integrated Applications > Representing Time-Varying Resource Capacity > Describing the Problem

The problem consists of 10 activities to perform over a period of 20 days. For each activity, the following table specifies the duration of the activity and the number of people it requires.

Activity 
Duration 
Required
Capacity 
A0 
A1 
A2 
A3 
A4 
A5 
A6 
A7 
A8 
A9 

The corresponding data are represented in the arrays Durations and RequiredCapacities. In addition, the array AvailableCapacities defines the number of people available each day, that is, from day 0 to day 19.


IloInt NumberOfActivities = 10;
IloInt NumberOfDays = 20;
IloNum AvailableCapacities[] = {2, 5, 5, 5, 3, 3, 2, 1, 0, 5,
                                2, 4, 5, 3, 2, 1, 4, 2, 1, 3};
IloNum Durations[] = {2, 4, 5, 6, 8, 2, 1, 3, 4, 6};
IloNum RequiredCapacities[] = {1, 1, 1, 1, 1, 2, 2, 1, 2, 1};

Figure 35.1 displays a graph of the evolution of the resource capacity over time.

timeVaryingResCapacitycj.gif

Figure 35.1 Resource Capacity Varies Over Time.

Only the main function refers to the global variables just defined. When we pass the value of a global variable as an argument to another function, we derive the name of the argument from the global variable, but do not capitalize the first character of the argument name.