IBM ILOG Scheduler User's Manual > Advanced Concepts > More Advanced Problem Modeling with Concert Technology > Describing the Problem

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.

Table 13.1 House Construction Activity Assignments
Activity  
Duration  
Possible Workers 
masonry 
joe or jack 
carpentry 
joe or jim 
plumbing 
jack 
ceiling 
joe or jim 
roofing 
joe or jim 
painting 
jack or jim 
windows 
joe or jim 
facade 
joe or jack 
garden 
joe or jack or jim 
moving 
joe or jim 

The data is provided in the form of a matrix and three arrays.

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.