IBM ILOG Scheduler User's Manual > Advanced Concepts > More Advanced Problem Modeling with Concert Technology > Describing the Problem |
Describing the Problem |
INDEX
![]() |
The activities of the problem are the same as those presented in Chapter 12, but now we have three workers. Each activity will be performed by a member of the set of {joe jack jim}
. The following table provides the duration and the possible workers of each activity.
The data is provided in the form of a matrix and three arrays.
ActivityNames
, containing the names of the ten activities,
ProcessingTimes
, containing the processing times of the ten activities,
WorkerNames
, containing the names of the three workers.
For each activity and each worker, the matrix PossibleAssignments
specifies whether or not the worker is able to perform the activity. For the sake of clean software-engineering, only the main
function refers to these global variables. When we pass the value of a global variable as an argument to another function, we derive the name of the argument from the name of the global variable, but we do not capitalize the first character of the argument name.
IloInt NumberOfActivities = 10; IloInt NumberOfWorkers = 3; const char* ActivityNames [] = {"masonry ", "carpentry ", "plumbing ", "ceiling ", "roofing ", "painting ", "windows ", "facade ", "garden ", "moving "}; const char* WorkerNames [] = {"joe", "jack", "jim"}; IloNum ProcessingTimes [] = {7, 3, 8, 3, 1, 2, 1, 2, 1, 1}; const char* PossibleAssignments [] = {"joe", "jack", 0, "joe", 0, "jim", 0, "jack", 0, "joe", 0, "jim", "joe", 0, "jim", 0, "jack", "jim", "joe", 0, "jim", "joe", "jack", 0, "joe", "jack", "jim", "joe", 0, "jim"};
As you can see from the matrix, either joe
or jack
can do masonry, but jim
cannot. Only jack
can do plumbing, but any of the three can work in the garden, and so forth.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |