IBM ILOG Scheduler User's Manual > Advanced Concepts > Scheduling with Unary Resources: the Bridge Problem > Solving the Problem |
Solving the Problem |
INDEX
![]() |
The most basic kind of decision that can be made in the process of disjunctive scheduling is the ordering of two activities, to arbitrate a potential resource conflict. The scheduling process could consequently consist of a very simple loop:
The main advantage of that algorithm is that the ordering decisions are made one by one. After each decision, the added precedence constraint is propagated, and at the next iteration the results of the propagation can be used to select the next two activities to order and the "most promising" order for these activities.
The main disadvantage of this algorithm is the number of decisions to make. If n activities require a given resource R, the number of decisions to make to order these activities is potentially n(n-1)/2. Depending on the appropriateness--in the context of a given application--of the heuristics available to select the "most promising" order, it may prove more efficient to make more global decisions, such as deciding which activity to execute first among n unordered activities that require a given resource. The following algorithm is based on making such "more global" decisions. Its main advantage is that the number of decisions to make to order n activities does not exceed (n-1). It works like this:
The algorithm we describe here is implemented by the predefined Scheduler goal IloRankForward
. At each iteration, a resource is chosen and the activities which require the chosen resource are put in order. For this ordering at each iteration, a resource constraint (linking an activity to the resource under consideration) is chosen. Two possibilities are considered:
Allowing the resources to be closed (i.e., not using the member function IloResource::keepOpen
) is advantageous in this situation. Since the resources are closed, when only one activity is not constrained not to execute first, it is immediately selected to execute first. This choice could not be made if the resource were not closed, as it would always be possible to introduce a brand new activity and execute it before all the activities unscheduled as yet. Furthermore, when the decision is made that an activity will not be executed first, the earliest start time of that activity can be updated to become the minimal earliest end time of the not yet ordered activities. This also would be impossible if the resource were not closed, as we cannot determine this minimal earliest end time if not all activities are known.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |