IBM ILOG Scheduler User's Manual > Advanced Concepts > Scheduling with Unary Resources: the Bridge Problem > Defining the Problem, Designing a Model > Schedule |
Schedule |
INDEX
![]() |
No time origin nor horizon is specified in the problem. Since the problem statement refers to no absolute date, the time origin can arbitrarily be set to 0.
For the time horizon, the most general strategy would consist of determining an upper bound for the overall project duration. As this computation is complex in the case under consideration, we adopt another possibility: we arbitrarily fix the horizon to a number that is obviously high for this problem.
However, it may prove inefficient to adopt a horizon that is too long as it increases the domains of many constrained variables and consequently enlarges the search. In a complete application, we should start from a reasonable value for the horizon, and then increase that value if no solution can be found with it.
Here, to keep the example simple, we'll assume that 365 days (a year) is a value given by the user--and that we can stick to it.
IloModel DefineModel(IloEnv env, IloNumVar& makespan) { IloModel model(env); IloSchedulerEnv schedEnv(env); schedEnv.getResourceParam().setCapacityEnforcement(IloMediumHigh); IloInt horizon = 365; schedEnv.setHorizon(horizon);
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |