IBM ILOG Solver User's Manual > More on Modeling > Using Set Variables: Crew Scheduling > Suggested answers > Exercise 4 |
Exercise 4 |
INDEX
![]() |
Using the original crews example as a starting point, extend the example by adding five more flights with the crew requirements as shown in Table 7.3.
The code that has changed from crews.cpp
follows. You can view the complete program online in the file YourSolverHome/examples/src/crews_ex4.cpp
.
You change the number of crews:
const IloInt nCrews = 15; |
You specify the crew size of the additional flights:
IloNumArray crewSize(env, nCrews, 4, 5, 5, 6, 7, 4, 5, 6, 6, 7, 4, 4, 7, 4, 5); |
You specify specific crew requirements for the additional flights:
You should get the following results, though the information displayed by IloSolver::printInformation
will vary depending on platform, machine, configuration, and so on.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |