Let's reconsider the problem presented in More Advanced Problem Modeling with Concert Technology of assigning the activities of the house construction to three equivalent workers. Let's assume that we used a discrete resource of capacity three to calculate a schedule. The start times that are found and the processing times of the activities are given in the following table. We already know that at any time t
there are at most three activities executing. In this case, the algorithm we are going to develop is guaranteed to find a solution to the assignment problem under consideration.
Table 19.1 Activity, Start Time, Processing Time
Activity |
Start Time |
Processing Time |
masonry |
0 |
7 |
carpentry |
7 |
3 |
plumbing |
7 |
8 |
ceiling |
7 |
3 |
roofing |
10 |
1 |
painting |
10 |
2 |
windows |
11 |
1 |
facade |
15 |
2 |
garden |
15 |
1 |
moving |
17 |
1 |
It is assumed that the data is provided in the form of four arrays.
-
ActivityNames
, containing the names of the ten activities.
-
WorkerNames
, containing the names of the three workers.
-
StartTimes
, containing the start times of the ten activities.
-
Processing Times
, containing the durations of the ten activities.
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"};
IloInt StartTimes [] = { 0, 7, 7, 7, 10, 10, 11, 15, 15, 17 };
IloInt ProcessingTimes [] = { 7, 3, 8, 3, 1, 2, 1, 2, 1, 1 };