• No results found

Reducing Redundant Wait Constraints

3.2 Constraint Model of Dynamic Controllability

3.2.2 Reducing the Size of the Model

3.2.2.3 Reducing Redundant Wait Constraints

Similar to the method to reduce redundant precede constraints, the way to reduce wait constraints classifies nodes into pre-wait, post-wait and unordered-wait subsets, and then removes redundant constraints. But wait constraints are more complex because regressed waits may also influence the bounds, so we will discuss triangular waits in different subsets first, and regressed waits will be discussed after that.

We adopt the classification from Wah and Xin [2004] but slightly modify the reduction rules they use. For each contingent link AC, we classify the nodes in the following way:    {BkUAB ≤ LAC} (pre-wait set) {BkLAB ≥LAC} (post-wait set) otherwise (unordered-wait set).

(3.13)

In the pre-wait set, it is redundant to formulate triangular wait constraints and wait regression constraints starting from the nodes. If we use shortest path constraint

§3.2 Constraint Model of Dynamic Controllability 37

Algorithm 2: The algorithm formulating precede constraints of dynamic controllability

Algorithm: addPrecedeConstrs(N,A,C,M)

Input: An STPUN=hX,E=R∪Ci, a contingent link ACand the constraint modelM.

Output:The updated STPU N, the updated constraint modelM. Return True if new links are added, otherwise return False.

1 update=False;

2 class= []; // the classification of nodes

3 forx∈Vdo

4 ifLxC≥0then

5 class[x] =prec; // precede set

6 else ifUxC<0then

7 class[x] =post; // post set

8 else

9 class[x] =unorder; // unorder set

10 endif 11 end 12 forx∈Vdo 13 v[x] =False; 14 end 15 v[A] =True; 16 GuardDFS(C,v,class,E); 17 forx∈Vdo

/* add new links */

18 ifclass[x] ==guard||class[x] ==unorderthen

19 if Ax∈/Ethen 20 update=True; 21 N.add(Ax); 22 endif 23 ifxC∈/Ethen 24 update=True; 25 N.add(xC); 26 endif 27 endif

/* add new constraints */

28 ifclass[x] ==guardthen

29 M.addLPrecede(AC,x); // Equation (3.2)

30 else ifclass[x] ==unorderthen

31 M.addDlPrecede(AC,x); // Equation (3.3)

32 endif

33 end

34 returnupdate;

uAB+lBC ≥lAC, it can be deducted that lBC≥ 0, which makes Bin precede case for contingent link AC. Thus, precede constraints will be considered that are more strict than wait constraints. Therefore, triangular waits are redundant for nodes in the pre-wait set. Furthermore, the regressed waits for contingent link AC will be no larger than the lower bound of AC, which means if the wait is positive, constraint

A C B1 B2 B3 [5, 10] wt AB1C =9 [ 100, 1] [−100, 1] wr AB 2C = 8 [−100, 1] [6, 100 ]wrAB3C =7

Figure 3.5: Reduce redundant triangular wait constraints I

A C B1 B2 B3 [5, 10] wt AB1C =9 [ 100, 1] [−100, 1] wr AB2 C = 8 [1, 5] [6, 100 ]wrAB3 C= 7

Figure 3.6: Reduce redundant triangular wait constraints II

lAB ≥ wAB holds. Therefore, the wait regressions from a wait in the pre-wait set can be replaced by precede constraints if it regresses through a contingent link, or shortest path constraints if it regresses through a requirement link.

The unordered-wait set is where the waits may tighten the bounds. Triangular waits and wait bounds are necessary.

In the post-wait set, wait bound constraints are redundant. Because among re- gression waits and triangular wait, only the largest one matters. The largest wait on AB is no less than its triangular waitwABC ≥uAC−uBC, plus shortest path constraint

uAC−uBC ≥ lAB infers thatwABC ≥lAB ≥lAC. In conclusion, waits in the post-wait set cannot tighten the bounds. Therefore, we only need to consider their regression waits.

Some nodes in the post-wait set do not have triangular waits that can regress. If UBC < 0, which means the time to schedule B will always be after the observation of C, this triangle is in the follow-case that does not have a wait. For the nodes in the post-wait set that are not in the follow case, redundant triangular waits still exist. For instance, in Figure 3.5, B1, B2 and B3 are all in the post-wait set, the

regression waits ofwAB1C through requirement links will never tighten their bounds.

Additionally, the regressions can be replaced by triangular wait in triangle AB3C

and shortest path constraints of triangleB3B2CandB2B1C. However, if B3 → B2 is a

contingent link in Figure 3.6, the regression fromwAB2CtowAB3Cis necessary because

it cannot be replaced by other constraints (althoughB3B2Ais in precede case, wAB2C

has not influenced lAB2, which cannot pass to AB3). Therefore, in the post-wait set,

we formulate triangular waits for nodes D and B thatUBC ≥0 and DBa contingent link.

§3.2 Constraint Model of Dynamic Controllability 39

Regression waits describe the constraints of global dynamic controllability. A wait regression consists of a source wait, a regressed wait and the link between the end nodes of the links where the two waits constrain. The source waits of regression waits are from the nodes in the unordered-wait and post-wait sets because regres- sion waits from the nodes the pre-wait set can be replaced by precede and shortest path constraints. Furthermore, the waits regressing through two requirement links continuously can be replaced by one regression and a shortest path constraint, so the source waits are from the start nodes of contingent links. The regressed waits fall in any sets. The regressed waits in the post-wait set cannot tighten their lower bounds, thus only regressed waits that may regress again will be considered in the post-wait set, which are the regressed waits to the end of contingent links in the post-wait set. The regressed waits in the pre-wait and unordered-wait sets cannot be reduced because they can influence their lower bounds. Based on the reduction rules, waits regress through contingent links or requirement links with positive upper bounds, if the waits are greater than the lower bounds of the contingent links they wait. Wait regressions through contingent links are formulated if the end nodes of the contin- gent links have triangular or regressed waits. Wait regression through requirement links are formulated in the following cases.

• Wait regressions from nodes in the post-wait or unordered-wait set have to come from start nodes of contingent links, if they regress through requirement links. Otherwise, the wait is regressed via two connected requirement links, which can be replaced by a wait regression and a shortest path constraint. • Wait regressions to nodes in the post-wait set regress to the end nodes of con-

tingent links because the regressed waits will be regressed again through a contingent link. Otherwise, the regressions can be implied, too.

• Wait regressions to the nodes in the unordered-wait and pre-wait sets can regress to any nodes, since the regressed waits may tighten the lower bounds if they are smaller than the lower bound of the contingent link they wait for. But only waits of the start nodes of contingent links in the unordered-wait set can be regressed again.

• Only guard nodes in the pre-wait set will be considered to formulate wait regressions.

Wait bounds will be added to waits of nodes in both pre-wait and unordered-wait sets.

The summary of how to add wait constraints are shown in Algorithms 3 and 4. First, the initial classification of all nodes are given from Line 3 to 13. Then the algorithm finds the guard nodes in the pre-wait set with Line 15–19. The method GuardDFSused here is the same as the one for finding the guard nodes when adding precede constraints. After dividing all the nodes, Line 20 to 32 of Algorithm 3 add triangular waits and new links for (1) the guard nodes in the pre-wait set, (2) all the nodes in the unordered-wait set and (3) the end nodes of contingent links in the

post-wait set. The last line of algorithm 3 will raise a function call of algorithm 4 which adds regression waits and wait bounds.

In Algorithm 4, regression waits via contingent links are introduced for contin- gent links first (Line 3). Since regression waits cannot be through two consecutive requirement links, regressed waits via requirement links are added from the waits just regressed from contingent links (Line 6). Line 11 to the end of the algorithm add wait bounds constraints.