Information and Computation

A Simple Temporal Network with Uncertainty (STNU) is a data structure for reasoning about time constraints on actions that may have uncertain durations. An STNU is dispatchable if it can be executed in real-time with minimal computation 1) satisfying all constraints no matter how the uncertain durations play out and 2) retaining maximum ﬂexibility. The fastest known algorithm for converting STNUs into dispatchable form runs in O ( n 3 ) time, where n is the number of timepoints. This paper presents a faster algorithm that runs in O ( mn + kn 2 + n 2 log n ) time, where m is the number of edges and k is the number of uncertain durations. This performance is particularly meaningful in ﬁelds like Business Process Management, where sparse STNUs can represent temporal processes or plans. For sparse STNUs, our algorithm generates dispatchable forms in time O ( n 2 log n ) , a signiﬁcant improvement over the O ( n 3 ) -time previous fastest algorithm. © 2023 Elsevier Inc. All rights reserved.


Introduction
In many sectors of real-world industry, it is necessary to plan and schedule tasks allocated to multiple agents participating in complex processes.Temporal planning aims to determine the order of task execution while respecting temporal constraints such as, for example, release times, maximum durations, and deadlines [13].To build feasible plans, a temporal planner must be able to do quantitative temporal reasoning.The literature includes many formalisms of temporal reasoning that differ in their expressiveness and computational complexity [13,2].
Over the past twenty-five years, several major application developers have highlighted the need for (1) the explicit representation of actions with uncertain durations; (2) efficient algorithms for determining whether plans involving such actions are controllable; and (3) efficient algorithms for converting such plans into a form that enables them to be executed in real-time with minimal computation, while preserving maximum flexibility.For example, researchers working on NASA's Deep Space One and Remote Agent projects stressed that, during the real-time execution of a plan, "The latency issue affects the form of updates that are propagated through the network, and reinforces the need for an efficient executive component.This motivates the use of limited propagation, which in turn introduces the need to augment the network with implied links . . .which are also useful for supporting stronger forms of propagation that are required to handle scheduling with uncontrollable events [e.g., actions with uncertain durations]" [28].More recently, the need to address these kinds of issues has been raised in a variety of domains involving A plan fragment for an autonomous spacecraft [28] and two equivalent representations of its temporal aspects as an STNU.
Over the past two decades, numerous researchers have made significant theoretical and practical progress in all of these areas, as follows: (1) providing the theoretical foundations for Simple Temporal Networks with Uncertainty (STNUs) which can be used to explicitly represent actions with uncertain durations [26,17]; (2) providing polynomial-time algorithms for determining whether any given STNU is dynamically controllable (DC) [27,38,23,24,30,5]; and (3) providing polynomial-time algorithms for converting an STNU into so-called dispatchable form [29,39,36,24,25].
For a simple illustration, Fig. 1a shows a sample plan fragment for an autonomous spacecraft that consists of two timelines: one for the engine, and one for its attitude, where the timing of the thrust, point and idle actions are assumed to be under the full control of the execution module, whereas the warm_up and turn actions are assumed to have uncontrollable, but bounded durations.In other words, the execution module controls when instances of these actions start, but only observes their completion in real time, as they occur.The temporal aspects of this plan can be represented by an STNU, shown in Fig. 1b, where timepoints such as A, B, and C represent the starting or ending times of actions, arrows labeled by intervals represent temporal constraints to be satisfied, and double arrows labeled by intervals represent so-called contingent links.For each contingent duration, the execution module is presumed to control the starting time of the action, but not its duration.However, it may react to observations of contingent executions in real-time.Fig. 1c shows an alternative, equivalent representation of that STNU.
For any STNU, it is important to determine whether it is dynamically controllable (i.e., whether it is possible, in realtime, to schedule all of its non-contingent timepoints such that all constraints will necessarily be satisfied no matter what durations turn out for the contingent links).Several polynomial-time algorithms are available to solve this so-called DCchecking problem [27,23,24,5].However, once an STNU is known to admit a dynamic scheduler, it is also important to be able to compute one efficiently.For maximum flexibility and minimal space and time requirements, a dynamic scheduler for an STNU is typically computed incrementally, in real-time, so that it can react to observations of contingent executions as they occur.An efficient dynamic scheduler can be realized by first transforming an STNU into a dispatchable form [29,39].Then, to execute the dispatchable STNU, it suffices to maintain time-windows for each timepoint and, as each timepoint X is executed, only updating time-windows for neighbors of X in the graph.Dispatchable STNUs are very important in applications that demand quick responses to observations of contingent events.Furthermore, applications that involve frequent replanning require efficient algorithms for converting STNUs into dispatchable forms.
Previously, in the literature, the fastest algorithm for computing the dispatchable form of a dynamically controllable STNU is Morris' 2014 algorithm, which runs in O (n 3 ) time, where n is the number of timepoints [24].This paper presents a faster, O (mn + kn 2 + n 2 log n)-time algorithm for converting dynamically controllable STNUs into dispatchable form, where m is the number of temporal constraints, and k is the number of contingent links.Such an improvement in time complexity is significant for practical applications (e.g., modeling business processes) where the networks are typically sparse.For example, if m = O (n log n) and k = O (log n), then our algorithm runs in O (n 2 log n) O (n 3 ) time.Similarly, if m = O (n 1.5 ) and k = O ( √ n), then our algorithm runs in O (n 2.5 ) O (n 3 ) time.Furthermore, our algorithm achieves an order-of-magnitude speed-up in practice because it typically inserts an order of magnitude fewer new edges into the network than does Morris' algorithm.The paper includes a proof of correctness for our algorithm and an empirical evaluation that demonstrates its better performance over existing public benchmarks.

Background
A Simple Temporal Network (STN) is a data structure for representing and reasoning about time constraints on actions, where each action is represented as a pair of instantaneous events called timepoints, representing the starting and ending times of the action.Formally, an STN is a pair (T , C), where T is a set of real-valued variables (timepoints), and C is a set of binary difference constraints of the form, Y − X ≤ δ, where X, Y ∈ T and δ ∈ R [9].The graph of an STN is a pair In this paper, the constraints and edges associated with an STN are called ordinary constraints and edges. 1 For convenience, ordinary edges may be notated as (X, δ, Y ).An STN is consistent (i.e., has a solution) if and only if its graph has no negative cycles [9].Finally, two STNs over the same set of timepoints are called equivalent if they admit the same set of solutions.
A Simple Temporal Network with Uncertainty augments an STN to accommodate actions with uncertain durations [26].
An STNU is a triple (T , C, L), where (T , C) is an STN, and L is a set of contingent links, each having the form (A, x, y, C ), where 0 < x < y < ∞, and A, C ∈ T .Each (A, x, y, C ) represents an uncertain duration where x ≤ C − A ≤ y.A is called the activation timepoint; C , the contingent timepoint; and C = y − x, the uncertainty in the link's duration.Although distinct contingent links may share an activation timepoint, they must have distinct contingent timepoints.We let T C denote the set of contingent timepoints, and T X = T \T C the set of executable timepoints.
The graph for an STNU (T , C, L) is a pair, (T , , where (T , E o ) is the graph for the STN (T , C), and the contingent links in L correspond to edges in E ∪ E u .Specifically, for each (A, x, y, C ) ∈ L, there are two edges: a lower-case (LC) edge, and a upper-case (UC) edge.The lower-case (LC) edge A c:x C in E represents the uncontrollable possibility that the duration C − A may be as low as x.The upper-case (UC) edge C C :−y A in E u represents the uncontrollable possibility that the duration C − A may be as high as y.
Such edges may be notated as (A, c:x, C ) and (C, C :−y, A), respectively.2Fig. 1c shows the STNU graph corresponding to the plan fragment from Fig. 1a.It contains three contingent links, where W , A and C are the activation timepoints, and T , B, and D are the contingent timepoints.
Following the literature, we let n = |T |, m = |C|, and k = |L|; If L is empty (i.e., no contingent links), then the STNU S = (T , C, ∅) reduces to the STN (T , C).In addition, for any STNU, the corresponding LO-graph and OU-graph may be viewed as STNs by ignoring the alphabetic labels on their edges.

Dynamic controllability
Although the durations of contingent links are typically not known in advance, a dynamic strategy can be used to govern the execution of the executable timepoints (i.e., those in T X ).Unlike fixed solutions for STNs, a dynamic strategy for an STNU may react in real-time to observe executions of contingent timepoints (i.e., those in T C ), but its decisions about when to execute timepoints in T X cannot depend on advance knowledge of future events.If there exists a dynamic strategy for executing the timepoints in T X that guarantees that all ordinary constraints will be satisfied no matter how the durations of the as-yet-unexecuted contingent links turn out, then the STNU is said to be dynamically controllable (DC) [26,17].Given its practical importance, researchers have recently presented several efficient DC-checking algorithms, all of which use (sound) rules for generating new edges that effectively bypass certain kinds of problematic edges in the STNU graph.For each algorithm, if the generation of bypass edges does not yield a certain kind of negative cycle, then the STNU is necessarily DC.The algorithms differ in the kinds of edges they view as problematic, the edge-generation rules they use, the direction of propagation (forward or backward), whether they need to compute and update a potential function, and, if so, the edges from which the potential function is derived.The two fastest DC-checking algorithms, the O (n 3 )-time algorithm due to Morris [24] and the O (mn + k 2 n + kn log n)-time algorithm due to Cairo et al. [5], will be most relevant for this paper.Their high-level features are compared in Table 1.

The Morris 2014 DC-checking algorithm
Morris [24] introduced an O (n 3 )-time DC-checking algorithm that uses the edge-generation rules shown in Table 2.
(The edges generated by the rules are shown as dashed.)The algorithm views negative edges (i.e., edges having a negative weight) as problematic.It propagates backward from so-called negative nodes (i.e., nodes having one or more incoming negative edges) along paths in the LO-graph, aiming to generate non-negative edges to effectively bypass the negative edges.
Fig. 2 shows sample propagations by the Morris 2014 algorithm.Each starts from the source node of a negative edge (shown as red and thick) and proceeds backward along non-negative LO-edges.Since all edges (other than the first one) 1 In the literature, STNs and their graphs are sometimes defined using an interval notation, where a constraint Y − X ∈ [a, b], sometimes called a requirement link, is equivalent to the pair of ordinary constraints, Y − X ≤ b and X − Y ≤ −a; and the link X [a, b] Y is equivalent to the pair of ordinary edges, X b −a Y .The interval notation is not used in this paper because it frequently requires the use of ∞ and −∞ to represent "no constraint".In addition, each interval-based constraint has two representations (e.g.,

Table 2
Edge-generation rules used by Morris 2014 [24].are non-negative, Dijkstra's algorithm [8] can be used to guide the traversal of shortest paths without needing a potential function.

Graphical representation Conditions
In Fig. 2a If all negative nodes can be fully processed without encountering such a cycle, then the network is guaranteed to be DC.
Since there are at most O (n) negative nodes, and the processing of each negative node can be done in O ( m + n log n) time, where m = O (n 2 ) is the number of edges in the graph at the end of the algorithm, the overall complexity is O (n 3 ).

The RUL − DC-checking algorithm
Cairo et al. [5] introduced a DC-checking algorithm, called RUL − , that views UC edges as problematic.From each UC edge E, it propagates backward along LO-edges, using the rules from Table 3, aiming to generate ordinary edges that bypass E.
Because LO-edges can be negative, the algorithm computes and updates a solution for the LO-graph, viewed as an STN.As in Johnson's algorithm [8], it uses this solution as a potential function to enable Dijkstra-like traversals of shortest paths.
The potential function is initialized by an O (mn)-time call to Bellman-Ford [8], and periodically updated by an incremental algorithm similar to the one of Ramalingam et al. [34].Since there are k UC edges, and it adds at most kn edges, the overall complexity reduces to O (mn + k 2 n + kn log n), a significant improvement over O (n 3 ), especially for sparse graphs.3 to generate ordinary edges terminating at C (shown as dotted edges).The applicability conditions of the R and L rules ensure that this phase stops when an edge with length at least C = 20 − 8 = 12 has been generated: here, with the edge (T , 14, C ).Then, for each newly generated (dotted) edge Ê, the second phase combines Ê with E using either the U nlp or U lp rule to generate bypass edges (shown as dashed or dash-dotted).(U is for Upper; nlp is for non-length-preserving; and lp is for length-preserving.)The applicability conditions for these rules ensure that every bypass edge will have length −x = −8 (shown in brown, dashed), except the last one (shown in blue, dash-dotted), which has length 14 − 20 = −6.
In general, the back-propagation in the first phase is guided by a Dijkstra-like traversal of LO-paths, which is made possible by using the above-mentioned potential function to reweight the edges in the LO-graph.If, as is typical, the bypass edges inserted into the graph during the second phase introduce new shortest paths into the LO-graph, then the potential function for the LO-graph must be incrementally updated, as previously mentioned, in preparation for processing the next UC edge.
The RUL − algorithm's processing of one UC edge can be interrupted by another, as shown in Fig. 4, where the firstphase back-propagation from C is interrupted by the UC edge (C , C :−9, A ). Processing this UC edge generates the (blue, dashed) bypass edge (T , 9, A ), after which the first-phase processing of (C, C :−20, A) continues, generating the (dotted) edge (T , 14, C ) and, in the second phase, the bypass edge (T , −6, A).Similar to the Morris 2014 algorithm, a cycle of such interruptions would imply that the STNU was not DC, but if all UC edges can be fully processed without encountering such a cycle, then the network must be DC.

Dispatchability
Although the DC property for STNUs is important, knowing that a dynamic strategy exists is not the same as being able to efficiently compute one.For one thing, a dynamic strategy for an STNU may have exponentially many branches, and so it may not be practical to compute it in advance.Instead, such strategies are typically computed incrementally, in realtime, which enables execution decisions to react to observations of contingent executions as they occur.Such considerations led researchers to define the dispatchability of temporal networks, and to develop algorithms for converting STNUs into a dispatchable form.Dispatchable STNUs are very important in applications that demand quick responses to observations of contingent events.The rest of this section summarizes relevant results from the literature on dispatchability-for STNs and STNUs.

STN dispatchability
Although solutions for consistent STNs can be efficiently computed in advance, it is often desirable to compute solutions incrementally, in real-time, to preserve as much flexibility as possible during execution.Toward that end, Tsamardinos et al. [39] defined a real-time dispatching (RTD) algorithm that incrementally attempts to compute a solution for an STN in realtime, using only local propagation.For each timepoint, the RTD algorithm maintains a time-window that contains possible values for it.The algorithm iteratively selects a timepoint X to be executed next and a time v at which to execute it.It then updates the time-windows for neighbors of X (i.e., timepoints that are connected to X by a single edge-hence, local).For example, if X is executed at time 10, then an outgoing non-negative edge (X, 5, Y ) generates an upper bound of 10 + 5 = 15 for Y , and an incoming negative edge (W , −3, X) generates a lower bound of 10 + 3 = 13 for W .In addition, once X has been executed at time v, all remaining unexecuted timepoints must be executed at or after v. (No going backward in time.)It follows that a timepoint is enabled for execution only if all of its outgoing negative edges terminate at already-executed timepoints.Because it performs only one update per edge, the RTD algorithm runs in O (m) time, making it very practical.
Tsamardinos et al. [39] then defined an STN graph G to be dispatchable if every run of the RTD algorithm on G is guaranteed to generate a solution for G-no matter how the choices of X and v are made, as long as the time-window bounds and enablement requirements are observed.Muscettola et al. [29] then gave an O (mn + n 2 log n)-time algorithm, called fastDispatchMin (FDM), that converts any consistent STN into minimal dispatchable form (i.e., an equivalent dispatchable STN having the fewest edges).More recently, Morris [25] provided a graphical characterization of STN dispatchability in terms of vee-paths.A vee-path is any path that consists of zero or more negative edges, followed by zero or more non-negative edges.An STN is vee-path-complete (VPC) if, whenever there is a path from any X to any Y , there is a shortest path from X to Y that is a vee-path.

Theorem 1 (Morris [25]). A consistent STN is dispatchable if and only if it is vee-path-complete.
The intuition behind this result is illustrated in Fig. 5. Given that the RTD algorithm only executes a timepoint if it has no negative outgoing edges to unexecuted timepoints, RTD will execute U before V , and V before W .But then local propagation ensures that V − W ≤ −4 and U − V ≤ −1 will necessarily hold.Next, if RTD executes X before U , then X ≤ U < U + 2 ensures that X − U ≤ 2 will hold.But if RTD executes U before X , then local propagation ensures that X − U ≤ 2 will hold.Similar remarks apply to the constraint Y − X ≤ 6.Since the RTD algorithm necessarily satisfies each edge constraint along the path from W to Y , it necessarily satisfies the path constraint Y − W ≤ 3.

eSTNU dispatchability
Morris [24] generalized the notion of dispatchability from STNs to extended STNUs (eSTNUs), which are STNUs along with any generated UC edges (e.g., the dotted UC edges in Fig. 2b).Recall that a generated UC edge such as (W , C :−5, A) represents a conditional constraint, called a wait: as long as C remains unexecuted, W must wait until 5 after A. His main result builds on the notion of a projection for an eSTNU, which is an STN that results from choosing fixed durations for the contingent links.
) be any eSTNU graph where E u contains the original UC edges, and E u g the generated UC edges (i.e., waits).A situation for G is any function, ω : T C → R, that specifies fixed durations for the contingent links.In particular, for each , where for each (A, x, y, C ) ∈ L: The edges in E ω and E ω u fix each contingent duration C − A to the value ω c .The edges in E ω u g depend on the relationship between the wait times and ω c .For example, Fig. 6 shows a projection where ω c = 5 for the contingent link (A, 1, 10, C ).
The waits for V and W expire when C executes at 5, and thus appear as unconditional lower bounds of 5 in the projection, while the wait for Y expires at 4, before C executes, and thus appears as an unconditional lower bound of 4 in the projection.
The following theorem, due to Morris [24], characterizes the dispatchability of an eSTNU in terms of its STN projections.Theorem 2 ([24]).An eSTNU is dispatchable if and only if all of its STN projections are dispatchable (as STNs). 3orris augmented his 2014 DC-checking algorithm to not only compute all intermediate (dotted) edges, both ordinary and upper-case, but also insert them into the graph.He then proved that, for DC inputs, the algorithm, which still runs in O (n 3 ) time, necessarily outputs an equivalent dispatchable eSTNU.In contrast, the RUL − DC-checking algorithm offers no such guarantee.Therefore, Morris' O (n 3 ) algorithm is the fastest so far for transforming an STNU into dispatchable form.(Recall that the RUL − DC-checking algorithm has no guarantee of returning a dispatchable network.It typically does not return a dispatchable network.)

A faster dispatchability algorithm for STNUs
This section presents a novel algorithm, called FD STNU , where FD stands for Fast Dispatch.Like Morris' 2014 algorithm, our FD STNU algorithm first checks the dynamic controllability of the input STNU and then, for DC instances, converts it into an equivalent dispatchable eSTNU.Its worst-case time complexity is O (mn where k is the number of contingent links and m is the number of ordinary edges.This complexity is better than the O (n 3 )-time complexity of the Morris 2014 algorithm, especially for sparse graphs (e.g., when k n and m n 2 ).Since the Morris 2014 algorithm is the only other algorithm with a dispatchability guarantee for DC STNUs, FD STNU is now the fastest such algorithm.The rest of this section describes the FD STNU algorithm in detail and then proves its correctness.
The FD STNU algorithm has three phases, as follows.
(1) It runs a variant of the RUL − algorithm, augmented to generate and insert new UC edges that correspond to wait constraints.
(2) It processes each LC edge, propagating forward along LO-edges, looking for opportunities to generate ordinary bypass edges.
(3) It runs the FDM algorithm [29] on the subgraph of ordinary edges, which is an STN, to convert it into a dispatchable STN subgraph.
To motivate the different phases of the FD STNU algorithm, consider the sample STNU shown in Fig. 7a, which happens to be dynamically controllable.Fig. 7b shows the same STNU together with the edges generated by the original version of the RUL − algorithm.In particular, the brown, dashed edges are obtained by applying the U nlp rule, and the cyan, dotted edge is obtained by applying the R rule.Even with these new edges, the STNU is not dispatchable, as demonstrated, for example, in Fig. 7c, which shows the STN projection in the situation where ω c = 4. Notice that this projection has paths from A to W , and from C to Y , but no corresponding vee-paths.Hence, for example, an STN dispatcher could inadvertently execute A, C , and Y at times 10, 14, and 16, respectively, before discovering (too late) that no value for X could satisfy Similarly, it could execute A and Y at 0 and 1, respectively, before discovering that C could not satisfy 4 In contrast, Fig. 7d shows how FD STNU processes the same DC STNU.The first phase applies the RUL − algorithm, propagating backward from the original UC edge (C, C :−10, A); but, instead of using the U nlp rule to generate the edges (Y , −1, A) and (X, −1, A), it uses the UC rule (from Table 2) to generate the (brown, dashed) wait edges (Y , C :−9, A) and (X, C :−11, A).Next, the second phase propagates forward from the LC edge (A, c:1, C ), using the LC rule (from Table 2) to generate the (teal, dash-dotted) edge (A, −6, W ). Finally, the third phase runs the FDM algorithm on the ordinary STN subgraph, inserting the (red, dotted) edges (C, 1, Y ) and (Y , −6, W ). Fig. 7e shows the STN projection for the situation where ω c = 4.It is easy to check that this projection is vee-path-complete and, hence, by Theorem 1, dispatchable.It can similarly be shown that every STN projection of the eSTNU in Fig. 7d is dispatchable (as an STN), and hence that the eSTNU output by the FD STNU algorithm is dispatchable (as an eSTNU).
The next paragraphs provide more detail about the three phases of the new FD STNU algorithm.

L. Hunsberger and R. Posenato
Information and Computation 293 (2023  This phase involves running a slightly modified version of the RUL − algorithm.(If the input STNU is not DC, then Phase 1 will return ⊥.) Hunsberger and Posenato [18] recently showed that for DC checking, it is not necessary to insert the (dotted) intermediate edges generated by the R and L rules into the STNU graph (cf.Fig. 3); it suffices to merely keep track of the associated distances.They also showed that the U nlp rule, and all of the edges it would generate, can be completely avoided in exchange for doing a limited amount of forward propagation from LC edges in certain (rare) circumstances, discussed in a moment.By dramatically reducing the number of edges that the algorithm inserts into the graph, the many instances of Dijkstra-like propagation run much faster.They showed that their algorithm, called RUL2021, runs up to an order of magnitude faster on a variety of STNU benchmarks, although it has the same worst-case complexity.Fig. 8 illustrates how Phase 1 exploits the distance information associated with the (dotted) intermediate edges to generate and insert new UC edges that correspond to wait constraints, shown as brown and dashed, with red labels.In particular, for each dotted edge, which Phase 1 computes but does not insert into the graph, the UC rule (from Table 2) is applied to combine that edge with the original (thick red) UC edge to generate, and insert, a new UC edge.For example, in Fig. 8, the UC rule applied to the dotted edge (C 2 , 4, C ) and the original UC edge (C, C :−20, A) generates the new UC edge (C 2 , C :−16, A).Along with the new UC edges, Phase 1 also inserts ordinary bypass edges, such as the blue dash-dotted edge in Fig. 8, which RUL2021, like RUL − , computes using the U lp rule.
As mentioned earlier, in exchange for not inserting the intermediate (dotted) edges during backpropagation, RUL2021 does a limited amount of forward propagation.(This forward propagation is only included for the purpose of DC checking; it does not generate any new edges.)The forward propagation is triggered in the (rare) cases where back-propagation from a UC edge (C, C :−y, A) encounters a cycle, from C back to C , whose length is less than C = y − x.Such a cycle has less flexibility than the contingent link; therefore, if any of its timepoints are constrained to occur before C , the network cannot be DC.To check this, RUL2021 propagates forward from C along LO-edges, keeping track of the shortest pathlengths it encounters.(In addition, it only visits timepoints that belong to the triggering cycle.)Fig. 9 shows two similarlooking, but critically different examples where this kind of forward propagation has been triggered because the preceding  A to Y to C to A, in the OU-graph.)In the righthand graph, no negative-length path emanating from C in the LO-graph is encountered.As a result, RUL2021 can resume its processing of UC edges, picking up wherever it had left off. 4inally, to greatly simplify the proof of correctness for the new algorithm, Phase 1 uses a slightly relaxed version of the R rule from Table 3 in which the constraint Q ∈ T X is removed (i.e., Phase 1 allows the middle timepoint in the R rule to be any timepoint).This relaxed version of the R rule is still sound, since it is a version of the sound NC rule from Table 2 with stricter applicability conditions.
Phase 1 can be done in O (mn + k 2 n + kn log n), the worst case complexity of RUL2021 algorithm, where m is the number of edges, n the number of nodes, and k < n the number of contingent links.
Phase 2: Forward propagation.Because Phase 1 processes UC edges by propagating backward along LO-edges, the edges it generates to bypass UC edges may also inadvertently bypass some LC edges.For example, the LC edge (A 2 , c 2 :2, C 2 ) is bypassed in Fig. 8 by the wait edge (A 2 , C :−14, A).However, because such back-propagation only starts from UC edges, it is not guaranteed to generate all possible bypass edges for LC edges.For example, for the STNU from Fig. 7a, neither RUL − nor RUL2021 would generate the edge (A, −6, W ), which bypasses the LC edge (A, c:1, C ).
Since, as illustrated in Fig. 7d-e, these kinds of bypass edges are needed to ensure dispatchability, Phase 2 of FD STNU carries out forward propagations from each of the k LC edges, along paths in the LO-graph, looking for opportunities to generate ordinary edges that bypass the LC edges.When processing an LC edge (A, c:x, C ), FD STNU propagates forward from the contingent timepoint C , keeping track of the lengths of the shortest paths emanating from C in the LO-graph.Whenever the forward propagation reveals a negative-length path emanating from C , the LC rule (from Table 2) is used to generate an ordinary bypass edge (e.g., the edge (A, −6, W ) in Fig. 7d).Although similar to the limited forward propagation done during Phase 1, the goal here is not to check for negative cycles in the OU-graph-that has already been done by Phase 1-but instead to generate bypass edges that will contribute to making the output of FD STNU a dispatchable eSTNU. 5ig.10 illustrates the forward propagation during Phase 2. In the figure, forward propagation from the contingent timepoint C continues until the first time the length of the path turns negative-in this case, when the path of length −3 from C to Y is encountered.Morris [23] called such paths extension sub-paths.Because the extension sub-paths explored during Phase 2 contain only LO-edges, Morris' analysis ensures that the rules from Table 2 can always be applied to generate the corresponding bypass edges.In addition, the bypass edges generated by Phase 2 will invariably be ordinary edges.For example, in Fig. 10, several applications of the rules from Since Phase 1 ends with an updated potential function based on the LO-edges, Phase 2 can use that potential function to guide its forward propagations in the LO-graph.Furthermore, because the rules that it uses to generate bypass edges are length preserving, and the paths it explores do not involve any UC edges, inserting those new ordinary edges into the network cannot disturb the potential function.As a result, Phase 2 never needs to update the potential function.In addition, for efficiency, all bypass edges generated during Phase 2 are not actually inserted into the graph until the very end of the phase.Therefore, since Phase 1 ends with at most m * = m + kn edges, and each of the k runs of Dijkstra can be done in Phase 3: FDM.The pre-existing fastDispatchMin (FDM) algorithm takes an STN as input and generates as output an equivalent minimal dispatchable STN.It ensures that, whenever there is a path from any X to any Y , there is necessarily a shortest path from X to Y that is also a vee-path.Phase 3 of FD STNU applies the FDM algorithm to the STN subgraph of the eSTNU that comprises only the ordinary edges, transforming it into a dispatchable STN subgraph.In the process, some new ordinary edges may be inserted into the graph (e.g., the red edges in Fig. 7c), while others may be removed.For example, if the edge (X, −1, C ) had been in the ordinary subgraph of Fig. 7c, then FDM would have removed it, given the alternative vee-path from X to Y to C of length −1.
Since Phases 1 and 2 each insert at most kn new edges, Phase 3 runs in O ((m Complexity of FD STNU .The overall complexity of the FD STNU algorithm derives from the complexities of its three phases, as follows: Phase 1 + Phase 2 + Phase 3 Let G be any DC STNU.Then the eSTNU obtained by running the FD STNU algorithm on G is necessarily a dispatchable eSTNU.
Proof.The following is a sketch of the proof.A much more detailed proof is given in the Technical Appendix.
Let G * be the eSTNU output by FD STNU .By Theorem 2, G * is dispatchable if and only if all of its STN projections are dispatchable (as STNs).By Theorem 1, each STN projection is dispatchable if and only if it is vee-path-complete.Therefore, let ω be any situation, G ω the corresponding STN projection of G * , and P ω xy any path in G ω from some X to some Y .It suffices to prove that there is a shortest path from X to Y in G ω that is also a vee-path.With no loss of generality, assume P ω xy is a shortest path in G ω .Let P * xy be a path in G * that projects onto P ω xy in the situation ω.The rest of the proof has three parts.First, process the upper-case edges in P * xy from left to right, showing that each can be bypassed (by a path in G * ) either by an ordinary edge or a path consisting of zero or more negative ordinary edges followed by a UC edge (a so-called nU-subpath).After processing all of the UC edges, the result is a path P xy from X to Y in G * that consists of zero or more nU-subpaths, followed by zero or more LO-edges.Crucially, all of the edges in the prefix consisting of the nU-subpaths are negative, and hence project onto a path with only negative edges.
The second part involves processing the LC edges in the LO remainder of P xy from right to left, showing that, for each, either (1) it can be bypassed by an ordinary edge (in G * ), or (2) the subpath of ordinary edges following it can be replaced by all non-negative ordinary edges (in G * ).An LC edge followed by zero or more non-negative ordinary edges is henceforth called an Lnn-subpath.Crucially, all of the edges in an Lnn-subpath are non-negative, and hence project onto a path that comprises only non-negative edges.After processing all of the LC edges, the result is a path P xy from X to Y in G * that is the concatenation of (1) zero or more nU-subpaths, (2) an ordinary path (i.e., a path consisting of only ordinary edges), and (3) zero or more Lnn-subpaths.
The third part notes that since Phase 3 of FD STNU ensures that the subgraph of ordinary edges is STN-dispatchable, the middle portion of P xy can be replaced, if necessary, by an ordinary vee-path (in G * ).This ensures that the resulting path, P † xy , projects onto a vee-path in G ω .Finally, the Technical Appendix confirms that the length of the projection of P † xy is no more than the length of the original path P ω xy .

Theorem 4.
If the input G is DC, then the FD STNU algorithm necessarily outputs an equivalent eSTNU.
Proof.All rules used by FD STNU have been proven to be sound by the researchers that introduced them [27,23,5].As a result, all edges generated during Phases 1 and 2 must be respected by any dynamic execution strategy for the eSTNU.Finally, Phase 3 replaces the ordinary subgraph (an STN) with an equivalent ordinary subgraph (another STN).Therefore, all of the edges in the eSTNU output by FD STNU must be satisfied by any dynamic strategy for the input STNU, and viceversa.

Pseudocode
This section presents pseudocode for the new procedures used by the FD STNU algorithm.Pseudocode for RUL2021 and fastDispatchMin is available elsewhere [18,29].
// Phase 3: makes ordinary subgraph STN-dispatchable The FD STNU algorithm.Algorithm 1 gives the high-level structure of the FD STNU algorithm.If the input STNU G is DC, FD STNU returns an equivalent, dispatchable eSTNU; otherwise, it returns ⊥.
Phase 1 of FD STNU is realized in two steps.In the first step, at Line 1, FD STNU calls the RUL2021 algorithm to check whether G is dynamically controllable (DC).If it is, RUL2021 outputs the STNU G 1 = (T , E 1 ), where E 1 contains all the edges of E, together with ordinary edges that bypass UC edges.We modified RUL2021 to also return (1) f , a solution/potential function for the LO-graph; and (2) distToC, a map that provides, for each contingent node C , an array of the minimum distances from each node X to C in the LO-graph.These are minor modifications since these data are already computed by RUL2021.In cases where G is not DC, then f is empty and the check in Line 2 makes FD STNU halt, returning ⊥.
The second step of Phase 1, at Lines 3 to 6, involves calling genWaitEdges (Algorithm 2, discussed below), once for each contingent link, to compute and insert the wait constraints derived from the distances stored in distToC (cf. the brown dashed edges in Fig. 8).The resulting eSTNU is called G 1b .Phase 2 of FD STNU is realized in Lines 7 to 10.For each LC edge e, FD STNU calls fwdProp (Algorithm 3, discussed below), which propagates forward from e to generate ordinary edges that bypass e.It uses the potential function f to enable a Dijkstra-like propagation along LO-edges.G 2 is the eSTNU graph obtained by inserting the ordinary bypass edges into G 1b .Finally, Phase 3, at Line 11, calls fastDispatchMin on G 2 .(We modified fastDispatchMin to take the eSTNU G 2 as input, but it only operates on the ordinary STN subgraph.)The eSTNU G 3 is obtained by replacing the ordinary edges in G 2 by the equivalent ordinary subgraph computed by fastDispatchMin.G 3 is the dispatchable eSTNU output by FD STNU .
The genWaitEdges algorithm.Algorithm 2 gives pseudocode of the algorithm genWaitEdges.Given a DC STNU G, and a contingent link (A, x, y, C ), genWaitEdges returns the set of wait edges (e.g., the brown dashed edges with red values shown in Fig. 8) that result from applying the UC rule to the UC edge (C, C :− y, A) and each of the intermediate edges (e.g., the dotted edges in Fig. 8) that are computed, but not inserted, by RUL2021.To speed up genWaitEdges, the distance from each X to C in the LO-graph, computed by RUL2021, is provided in the vector dist = [d 1 , . . ., For each X i , δ xc (at Line 5) holds the distance from X to C in the LO-graph.If δ xc ≥ C , then RUL2021 would have used the U lp rule to generate an ordinary bypass edge (e.g., the blue, dashed edge in Fig. 8).Otherwise, δ xc < C and genWaitEdges generates the UC edge, (X i , C :δ xc − y, A) (Lines 6 to 7).The set of UC edges is returned at Line 8.  (A, c:x, C ).It uses the potential function f to re-weight edges in the LO-graph to be non-negative, thereby enabling a Dijkstra-like traversal of paths.The key for each X in the priority queue is d(C , X) − f (X), where d(C , X) is the distance from C to X in the LO-graph.Whenever some d(C , X) < 0 (Line 7), a bypass edge is generated.Otherwise, forward propagation along edges emanating from X continues (Lines 10 to 16).
Output: A set of ordinary edges that bypass the LC edge (A, c:x, C ).

Experimental evaluation
We evaluated the performance of the FD STNU algorithm against two pre-existing algorithms: Morris 2014, the previous state-of-the-art for computing dispatchable eSTNUs; and RUL2021, which only does DC checking, to see how much the move from DC checking to computing dispatchable network costs.All algorithms were implemented in Java and run on a JVM 17 with 8 GB of heap memory on a Mac OS X box with an Intel(R) Quad-Core Intel Core i7@2.6GHz.Our implementations are available in the CSTNU Tool [33].Summaries of our tests and results are given below.
We used two of the STNU benchmarks published by Posenato [32] and already used for a previous work [18].
For each n ∈ {500, 1000, 1500, 2000, 2500}, the first benchmark (called Test 1) contains 200 randomly generated DC STNUs, each having n nodes, n/10 contingent links, and around 6 incident edges for each node (for a total of m ≈ 3n edges).deviation values are around 2% of average execution times.These results confirm that FD STNU outperforms the previous state-of-the-art, Morris 2014, for computing dispatchable eSTNUs.In addition, it highlights that computing a dispatchable network is roughly an order of magnitude more expensive than DC checking by RUL2021.Fig. 12 plots the number of edges inserted by each algorithm as a multiple of the number of edges in the input graph, using a log scale.It shows that FD STNU generates a dispatchable network adding, on average, fewer than 1.8m new edges, while Morris 2014 averages around 20m new edges.
The second benchmark was obtained from the first by reducing the number of contingent links, k, from n/10 to √ n .("Extra" contingent links were converted into ordinary constraints.)Fig. 13 displays the average execution times, each point representing the average execution time for an algorithm on 100 instances of the given size.The error bars, which show 95% confidence intervals, are not visible because standard deviation values are around 2% of average added edges.These results confirm that the FD STNU algorithm performs better on instances where k = √ n , with a smaller execution-time grow-rate, as compared to its performance on Test 1, with k = n/10.In addition, although the Morris 2014 algorithm also performs better on instances where k = √ n , as compared to its performance on instances where k = n/10, its execution-time growrate appears to be the same across the two benchmarks.

Conclusion
This paper introduced a new algorithm, FD STNU , that converts DC STNUs into dispatchable form.Its complexity is O (mn + kn 2 + n 2 log n), which is significantly better than the previous best, Morris' O (n 3 ) algorithm, when networks are sparse.For example, if m = O (n log n) and k = O (log n), then FD STNU algorithm runs in O (n 2 log n) O (n 3 ) time.The paper proved the algorithm's correctness and presented an empirical evaluation demonstrating its better performance on existing STNU benchmarks.
path P in G, let Pr ω (P) denote the path obtained by replacing each edge in P by its projection, and let P ω = |Pr ω (P)| denote the length of the projected path.
Lemma 1.For any (LC, UC or ord) edge F in an eSTNU graph G, and any situation ω, |F | ≤ F ω and, hence, for any path P in G, For the second claim, first suppose that |F | ≥ 0. Then 0 ≤ |F | ≤ F ω implies that F ω ≥ 0. On the other hand, if |F | < 0, then one of the following must hold: (1) F is an ord edge, in which case, F ω = |F | < 0; (2) F is an original UC edge, whence F ω = −ω c < 0; or (3) F is a generated UC edge, whence F ω = max{−ω, −v} < 0. (Generated UC edges necessarily satisfy −v < 0 given the applicability conditions for the U lp rule.)

A.2. Main result
Theorem 3. Let G be any DC STNU.Then the eSTNU obtained by running the FD STNU algorithm on G is necessarily a dispatchable eSTNU that is equivalent to G.
Proof.Let G be any DC STNU.Distinguish the changes made to G by FD STNU , as follows.Let G 1 be the eSTNU that results from running Phase 1 (i.e., modified RUL2021) on G. Thus, G 1 includes all edges from G together with the ord and UC bypass edges generated by Phase 1. Next, let G 2 be the eSTNU that results from running Phase 2 (i.e., forward propagation from LC edges) on G 1 .Thus, G 2 includes all edges from G 1 together with any ord bypass edges generated by Phase 2. Next, let G 3 be the eSTNU that results from running Phase 3 on G 2 (i.e., running the FDM algorithm on the ord edges in G 2 ).Thus, G 3 includes all of the LC and UC edges from G 2 together with an equivalent, but typically very different, set of ord edges.By construction, G 3 is the output eSTNU generated by running the RUL2021 algorithm on G.In addition, for any situation ω, the STN projection of G 3 in that situation is denoted by G ω .
Path notation.In this proof, a term such as P i uv will be used to denote a path from U to V in the graph G i .Different paths with the same endpoints and in the same graph are distinguished by alphabetic indices, primes or asterisks in the superscript.For example, P 2 uv , P 2a uv and P 2 uv might denote three different paths from U to V in G 2 ; and P ω xy and P ω * xy might denote different paths from X to Y in the projection G ω .Given Theorem 2, it suffices to prove that every STN projection of the output eSTNU G 3 is dispatchable.Toward that end, let ω be any situation and G ω the projection of G 3 in that situation.Next, given Theorem 1, it suffices to show that G ω is vee-path-complete.Toward that end, let P ω xy be any shortest path in G ω from some X to some Y .It then suffices to show that there must exist a vee-path Next, note that because Phase 3 replaces the set of ord edges in G 2 with an STN-equivalent set of ord edges in G 3 , it follows that each ordinary edge in G 3 derives from either the same edge in G 2 or an equivalent ordinary path in G 2 .Thus, there must exist a path P 2  xy in G 2 obtained by replacing each ordinary edge in P 3 xy by an equivalent ord edge-or-path in G 2 .For example, in When Phase 1 processed the original UC edge (C, C :− y, A), it did so by back-tracking from C along shortest LO-paths in G 1 , continuing as long as the path-length was less than C . 6For each ) Furthermore, by the choice of T , for each T j strictly between T and U in P   xy .In the figure, the LC edge e is highlighted in pink, and the extension sub-path P 1 ĉw is highlighted in purple.In this case, the bypass edge from Â to W would not only bypass the LC edge, it would also bypass T .
Since the forward propagation of Phase 2 stops when a negative subpath is found, every proper prefix of the extension sub-path P 1 ĉw , including the subpath P 1 ĉt from Ĉ to T , must have non-negative length, and every suffix of P 1 ĉw , including the subpath P 1 t w from T to W , must have negative length.As a result, the UC edge E u has effectively been removed from P 3 xy , without having increased the length of the projection.(This concludes Case a.1.)Case a.2:For each T i , the shortest LO-path P 1 t i c satisfies |P 1 t i c | < C .In this case, let T be the leftmost time-point T i in P 1  xy such that the LO-subpath P 1 tu from T to U is non-negative.(If all such sub-paths are negative, then choose T = U .) Fig. A.17 shows a sample scenario for this case, where C = 12; P 1 xt , the LO-subpath of P 1 from X to T is shaded green; and P 1 ta , the subpath from T to A, is shaded brown.In the figure, note that the path from T to U has the non-negative length 3, while the paths from C to U , and from X to U , have the negative lengths −1 and −2, respectively.Now, since each T i is reachable by back-propagation from C , and the length of each P 1 xy since the prefix from Ĉ to T would have to be non-negative, implying that the subpath from Ĉ to U must be non-negative, contradicting the choice of T .As a result, T must belong to P 2 xy and, hence, also to P 3 xy .
Therefore, the projected length of E t = (T , C :−t, A) satisfies: Phases 2 and 3 are length preserving where, in the last two steps, P 3 tu is the subpath of P 3 xy from T to U , and P 3 ta is the subpath of P 3 xy from T to A. In short, the projected length of E t is no more than the projected length of the corresponding subpath from T to A in P 3 xy .
Next, consider the subpath P 1 xt from X to T .Now, by the choice of T , every suffix of P Phases 2 and 3 are length preserving ≤ |P xy by a sequence of zero or more negative ordinary edges, followed by a UC bypass edge.Hereinafter, such paths may be called nU-subpaths (for "negative, then upper-case").As a result, the next leftmost UC edge can now be addressed-whether by Case a.1 or a.2-but only considering the portion of P 3 xy from A onward.Continuing in this way, all of the UC edges in P 3 xy can eventually be processed, with Cases a.1 and a.2 appearing in any combination, resulting in a modified path P 3u xy which either (1) has no UC edges-which only happens if all UC edges were handled by Case a.1-or (2) has all of its UC edges in a prefix that is the concatenation of one or more nU-subpaths.These two possibilities may be concisely described as P 3u xy having all of its (zero or more) UC edges within a prefix that is the concatenation of zero or more nU-subpaths.

Analyzing the LC edges in P 3u
xy .Let P 3u xq denote the prefix of P 3u xy described above that contains all of the (zero or more) UC edges from P 3u xy and consists of a sequence of zero or more nU-subpaths, terminating at some time-point Q .Since nU-subpaths only contain ordinary and UC edges, it follows that any LC edges remaining in P 3u xy necessarily belong to the suffix P 3u qy from Q to Y .Furthermore, this suffix is identical to the suffix P 3 qy of P 3 xy .Therefore, the following analysis shall begin with P 3 qy , and the corresponding suffix P 2 qy of P 2 xy .
The analysis of LC edges in P 3 qy is in many ways the mirror image of the analysis of UC edges described earlier.Instead of processing UC edges from left to right, the LC edges are processed from right to left.In addition, the propagation goes forward from LC edges; and the roles of negative and non-negative edges are swapped.However, the analysis of LC edges is vastly simpler, mainly because UC edges play no role and Phase 2 only generates ordinary edges, never additional LC edges.
Let e = (A, c:x, C ) be the rightmost LC edge in P 3  qy , and let P 3 cy be the suffix of

Case b.2:
The first edge in P 3 cy is non-negative.Since P 3 cy is vee-path, it follows that the path P 3 ay from A to Y consists solely of non-negative edges: in particular, e, followed by non-negative ordinary edges.This kind of path is hereinafter called an Lnn-subpath (for "lower-case followed by non-negative edges").Therefore, in this case, we can let qy that precedes A. After processing all of the LC edges in this way, using whatever combination of Cases b.1 and b.2 are needed, the path from Q to Y will have a suffix from some R to Y that contains all of the remaining LC edges (if any) and is the concatenation of zero or more Lnn-subpaths.Furthermore, since Cases b.1 and b.2 both preserve the length of the overall path, but may remove some LC edges, it follows that the projected length of the overall path from X to Y cannot be longer than the original P 3 xy ω .

Concluding the proof.
After processing all of the UC and LC edges from P 3  xy , the modified path, shown as P 3u xy in Fig. A.21, will have a prefix from X to Q that is the concatenation of zero or more nU-subpaths that together contain all of the UC edges (if any), and a suffix from R to Y that is the concatenation of zero or more Lnn-subpaths that together contain all of the LC edges (if any).In between, there will be a path from Q to R consisting of zero or more ordinary edges which, given the STN-dispatchability of G 3 , can be assumed to be a vee-path.Furthermore, all of the path modifications used in processing/bypassing the UC and LC edges have been shown to result in a projection in G ω that is no longer than the original projection P 3  xy ω = |P ω xy |.
Since every edge in an nU-subpath is negative, and every edge in an Lnn-subpath is non-negative, it follows that the projected path, called P ω * xy in Fig. A.21, is a vee-path that is no longer than the original path P ω xy .
Fig. 1.A plan fragment for an autonomous spacecraft[28] and two equivalent representations of its temporal aspects as an STNU.

Fig. 2 .
Fig. 2. Sample Propagations by the Morris 2014 Algorithm.(For interpretation of the colors in the figure(s), the reader is referred to the web version of this article.)

Fig. 3
Fig. 3 illustrates the two-phase processing of a UC edge E = (C, C :−20, A) by the RUL − algorithm.The first phase propagates backward from C along LO-edges, using the R (Relax) and L (Lower) rules from Table3to generate ordinary edges terminating at C (shown as dotted edges).The applicability conditions of the R and L rules ensure that this phase stops

Fig. 8 .
Fig. 8. Edges generated by Phase 1 of FD STNU .Phase 1: Modified RUL − .This phase involves running a slightly modified version of the RUL − algorithm.(If the input

Fig. 10 .
Fig. 10.Sample forward propagation during Phase 2 of the FD STNU algorithm.back-propagation from (C, C :−10, A) encountered a cycle (C , X, Y , C ) of length 3 < C .In the lefthand graph, forward propagation from C to X to Y reveals a negative-length path from C to Y which, for illustration, is represented in the figure by the dotted edge (C, −3, Y ).At this point, RUL2021 immediately stops because the STNU cannot be DC.(To see why, note that the LC rule could then generate the dashed bypass edge (A, −2, Y ), which would create a negative cycle, from

Algorithm 2 :
The genWaitEdges algorithm.Input: G, a DC STNU graph; (A, x, y, C ), a contingent link; dist = [d 1 , . . ., d n ], where for each i, d i is the minimum distance from X i to C in the LO-graph G o .Output: The set of UC edges/waits obtained by applying the UC rule to the (dotted) edges corresponding to distances in dist and the UC edge (A, C :−y, C ). 1 newWaits := {} // For accumulating generated UC/wait edges
by the definition of the projection G ω , each edge in P ω xy necessarily derives from a corresponding (LC, UC or ord) edge in G 3 .Therefore, as illustrated in Fig. A.14, there must exist a path P 3 xy in G 3 whose edges project onto the corresponding edges in P ω xy in the situation ω.Hence, Pr ω (P 3 xy ) = P ω xy .
Fig. A.14, (X, 10, B) appears in both P 3 xy and P 2 xy , whereas (K , −1, U ) in P 3 xy corresponds to the equivalent two-edge path (K , 2, A , −3, U ) in P 2 xy .Now some of the ordinary edges in P 2 xy may be bypass edges generated during Phase 2, each of which derives from an LO-path in G 1 comprising an LC edge e, followed by a negative-length LO-path P e .(The path P e is called an extension subpath (ESP) for the LC edge e [23].)Therefore, there must exist a path P 1 xy in G 1 obtained by replacing each ordinary bypass edge in P 2 xy by a corresponding LO-path from G 1 .For example, in Fig. A.14, the ordinary edge (A , −3, U ) in P 2 xy is replaced by the two-edge LO-path (A , c :3, C , −6, U ) in P 1 xy .By construction, the UC edges in P 3 xy also appear in P 2 xy and P 1 xy ; and no other UC edges appear in any of these paths.As a result, these UC edges partition P 3 xy , P 2 xy and P 1 xy in the same way.Similarly, the LC edges in P 3 xy also appear in P 2 xy and P 1 xy .However, P 1 xy may also contain additional LC edges (e.g., (A , c :3, C ) in Fig. A.14).In addition, since Phases 1, 2 and 3 are all length-preserving, |P 1 xy | = |P 2 xy | = |P 3 xy | and, by Lemma 1, |P 3 xy | ≤ P 3 xy ω = |P ω xy |.The rest of the proof has three sections.The first analyzes the UC edges; the second, the LC edges; and the third, the ord edges.Based on these analyses, P 3 xy is transformed into a path P 3 xy whose projection is a vee-path whose length is at most |P ω xy |.In particular, P 3xy has a prefix consisting of negative OU-edges, a suffix consisting of non-negative LO-edges, and a middle section that is a vee-path of ordinary edges.Analyzing UC edges in P 3 .Let E u = (U , C :−u, A) be the leftmost (i.e., first occurrence of a) UC edge in P 3 xy , and let (A, x, y, C ) be the corresponding contingent link.For example, in Fig. A.14, E u = (U , C :−8, A).Since E u is the leftmost UC edge in P 3 xy , it follows that the subpath P 3 xu from X to U comprises only LO-edges.It also follows that the corresponding subpaths from X to U in P 2 xy and P 1 xy also comprise only LO-edges, as illustrated in Fig. A.14. Finally, let X = T 0 , T 1 , . . ., T f = U be the time-points preceding U in P 1 xy .In Fig. A.14, this sequence of time-points would be X, B, K , A , C , U .

1 Fig. A. 15 .
Fig. A.15. Paths relevant to Case a.1 in the proof of Theorem 3.

Fig. A. 16 .
Fig. A.16. Paths relevant to Case a.1 of proof of Theorem 3. The case where E u is a generated UC edge (U , C :−u, A) is illustrated in Fig. A.15a, where P 1 tu is the LO-sub-path of P 1 xy from T to U , P 1 uc is any shortest LO-path from U to C in G 1 , and the ordinary edge E t is blue and dashed.(Note that P 1 ucis not a sub-path of P 1 xy .)Since P 1 tc is a shortest LO-path from T to C in G 1 , it follows that |P 1 tc | ≤ |P 1 tu | + |P 1 uc |.As a result, −t = |E t | = |P 1 tc | − y ≤ |P 1 tu | + |P 1 uc | − y = |P 1 tu | + |E u | = |P1 tu | − u.Therefore, letting P 1 xy be the path in G 1 obtained from P 1 xy by replacing the subpath from T to A by the ordinary edge E t yields |P 1 xy | ≤ |P 1 xy |.The (simpler) case where E u is the original UC edge (C, C :− y, A) (i.e., where U = C ) is illustrated in Fig. A.15b, where P 1 tc is a shortest path from T to C in G 1 , and P 1a tc is the LO-sub-path of P 1

Fig. A. 17 .
Fig. A.17.An example of Case a.2 of proof of Theorem 3.

Fig. A. 18 .
Fig. A.18.General scenario for Case a.2 of proof of Theorem 3.
t i c is less than C , it follows that Phase 1 must have generated, for each T i , a UC bypass edge (T i , C :−t i , A) which, by definition, must belong to G 1 .In particular, the UC bypass edge (T , C :−t, A), shown as a blue, dashed edge, must belong to G 1 .(Fig. A.18 shows a more general scenario, albeit assuming that E u = (U , C :−u, A) is a generated UC edge.The case where E u is the original UC edge (C, C :− y, A) is simpler.)In addition, as in Case a.1, T cannot be the interior time-point in the extension sub-path for any LC edge ê = ( Â, ĉ:x, Ĉ) preceding T in P 1

P 3 qy 2 cw , it follows that all proper prefixes of P 2 cwFig. A. 21 .
Fig. A.21. Final paths from X to Y in proof of Theorem 3.

P 3 qy = P 3
qy , and the recursive processing of the next rightmost LC edge can be carried out, but restricting attention to the portion of P 3 qy that precedes A. Recursively analyzing the remaining LC edges in P 3 qy .If the LC edge e was bypassed by an ordinary edge as in Case b.1 above, then the next rightmost LC edge in P 3 qy can be recursively processed in the context of the entire path P 3 qy .On the other hand, if the LC edge remains in P 3 qy as part of an Lnn-subpath from A to Y , then the next rightmost LC edge can be recursively processed in the context of the portion of P 3

Table 1
A high-level comparison of the two fastest DC-checking algorithms for STNUs.(mn + k 2 n + kn log n) O(T , E o ), where for each , the NC (No Case) and LC (Lower Case) rules (shown in parentheses) are used to generate the non-negative
Table2can be used to generate the (red, dotted) edge (C, −3, Y ); and then the LC rule (also from Table2) can be used to generate the ordinary (blue, dashed) bypass edge (A, −2, Y ).Crucially, because the rules are length preserving, and always generate ordinary edges, there is no need for Phase 2 to actually apply the rules.Instead, Phase 2 need only compute the lengths of shortest paths emanating from C in the LO-graph and, whenever it encounters a negative-length path, immediately generate the ordinary bypass edge.Once a bypass edge such as (A, −2, Y ) is generated, no further propagation past Y is carried out.
an STNU graph.Output: A dispatchable eSTNU graph, if G is DC; ⊥, otherwise.//Phase1: checks DC and, if successful, generates a solution, f , for the LO-graph and distToC, a map C → [d 1 , ..., d n ], where for each Xi ∈ T , d i is the minimum distance from X i to C in the LO-graph.1 (G 1 = (T , E 1 ), f , distToC) := RUL2021(G) 2 if f == {} then return ⊥ // Below,insert all waits accumulated by modified RUL2021 3 accum := {} 4 foreach contingent link (A, x, y, C ) ∈ E 1 do Signal to generate a bypass edge 8 accum := accum ∪ (A, x + d(C , X), X) foreach (X, δ XY , Y ) ∈ E o ∪ E do 11 if Y ≡ C and Y ≡ A then // I.e., Y is distinct from A and C 12 paths need not be sub-paths of P 1 Case a.1:For some T i , the shortest LO-path P 1t i c satisfies |P 1 t i c | ≥ C .In case there might be multiple such time-points, let T be the rightmost such T i in P1xy , and let P 1 tc denote a shortest LO-path from T to C in G 1 .Since |P 1 tc | ≥ C , it follows that T cannot be U (i.e., T must precede U in P 1 xy ).(If E u is a generated UC edge, then the shortest LO-path P 1 1 tu | − u.Therefore, letting P 1 xy be the path in G 1 obtained from P 1 xy by replacing the subpath from T to A by the ordinary edge E t yields |P 1 xy | ≤ |P 1 xy |.The (simpler) case where E u is the original UC edge (C, C :− y, A) (i.e., where U = C ) is illustrated in Fig. A.15b, where P 1 tc is a shortest path from T to C in G 1 , and P 1a tc is the LO-sub-path of P 1 Next, we must show that the time-point T necessarily belongs to P 2 xy .Suppose not.The only way that could happen, as illustrated in the top of Fig. A.16, is if, for some LC edge e = ( Â, ĉ:x, Ĉ), T is an interior time-point in an extension subpath P 1 ĉw in P 1 xy , where Phase 2 used e and P 1 ĉw to generate an ordinary bypass edge from Â to W in P 2 7Next, since C ≤ |P 1 tc |, andP 1 tc is a shortest LO-path in G 1 , it follows that C ≤ |P 1 tc | ≤ |P 1 t w | + |P 1 wc | < |P 1 wc |, since |P 1 t w | < 0. But then C < |P1 wc |, which contradicts the choice of T .Therefore, T must appear in P 2 xy ; and the path P 2 xy , illustrated at the bottom of Fig. A.16, obtained by replacing the subpath from T to A in P 2 xy by the ordinary edge E t necessarily belongs to G 2 .Furthermore, a similar argument confirms that every LC edge preceding T in P 1 xy that does not belong to P 2 xy , also contains the UC edge E u , as well as any LC edges bypassed by E t .Therefore, it follows that P 3 xy ω ≤ P 3 xy ω = |P ω xy |. (Projections preserve the lengths of ordinary edges/paths, but if F is an LC or UC edge, |F | ≤ F ω , by Lemma 1.) 1xt must be negative.Therefore, for each LC edge in P1xt , if any, Phase 2 generates an ordinary bypass edge, such as the dashed brown edge (X, −4, T ) in Fig. A.17.Therefore, let P 2 xt be the ordinary path in G 2 obtained from P 1 Paths relevant to Case a.2.2 of proof of Theorem 3. In this case, let P 3 xy be the path in G 3 that is the concatenation of P 3In short, P 3 xy has effectively replaced the portion of P 3xy from X to A by a path consisting of zero or more negative ordinary edges, followed by the UC bypass edge E t , without increasing the length of its projection.xtconsists of zero or more negative edges followed by one or more non-negative edges.In this case, let M be the time-point dividing the negative edges of P 3 xt from the non-negative edges, as illustrated in Fig. A.19, and let P 3 xm and P 3 mt be the subpaths from X to M, and from M to T that comprise all of the negative and non-negative edges of P 3 xt , respectively.Given that Phase 3 may replace one ordinary path with a different, but equivalent ord path, it may be that M does not belong to P 2 xt .However, each ordinary edge in P 3 xt is equivalent to some ordinary path in G 2 ; hence, as shown in Fig. A.19, there is some path P 2axt in G 2 that can be obtained by replacing each ordinary edge in P 3 1a xt in G 1 that can be obtained by replacing each ordinary edge in P 2a xt that was generated during Phase 2 by the corresponding LO-subpath that generated it.Under this that contains only LO-edges, as in Case a.1.(A similar analysis as that done in Case a.1 ensures that the projection of the corresponding path P 3 xy will be no greater than |P ω xy |.) Otherwise, all suffixes of P 1a mt must have been explored by Phase 1, with associated shortest LO-paths to C of length less than C , generating corresponding UC bypass edges, including a UC edge, E m = (M, C :−m, A), from M to A that bypasses both P 1a mt and E t .In this case, let P 1 2a xm from X to M, (2) the UC bypass edge E m , and (3) the suffix of P 2 xy from A onward.Finally, let P 3 xt by bypassing each of its LC edges with ordinary edges generated during Phase 2; and let P3xt be the equivalent ordinary vee-path from X to T guaranteed to exist in G 3 as a result of Phase 3. (Note that P 2 xt and P 3 xt need not be sub-paths of P 2 xy and P 3 xy , respectively.)Then,sinceP 3 xt has only ordinary edges, whereas the subpath P 3 * xt of P 3xy from X to T may have had some LC edges, Lemma 1 ensures that:P 3 xt ω ≤ P 3 * xt ω ( †)xt by an equivalent ord-edge-or-path in G 2 .Under this construction, P 2a xt necessarily contains M. Let P 2a xm and P 2a mt be the sub-paths from X to M, and from M to T , respectively.Similarly, there must be some path P construction, P 1a xt necessarily contains the time-point M. Thus, let P 1a xm and P 1a mt be the sub-paths from X to M, and from M to T , respectively.Note that P 1a xt need not be a sub-path of P 1 vc , the shortest LO-path fromV to C in G 1 , satisfied |P 1 vc | ≥ C ,leading to the generation of an ordinary edge (V , −v, A) that bypasses both E t and E. If so, let P 1 xy be the concatenation of: (1) the prefix P 1a xv of P 1a xt from X to V ; (2) the ordinary bypass edge (V , −v, A); and (3) the suffix of P 1 xy from A onward.In this way, P 1 xy has a prefix from X to A xy be the concatenation of: (1) the LO-subpath P 1a xm from X to M; (2) the UC bypass edge E m = (M, C :−m, A); and (3) the suffix of P 1 xy from A onward.Similarly, let P 2 xy be the concatenation of: (1) the ordinary subpath P xy ω , as follows.First, E m ω satisfies: In short, P3xy has effectively replaced the portion of P 3xy from X to A by a path consisting of zero or more negative ordinary edges, followed by the UC bypass edge E m , without increasing the length of its projection.This concludes Case a.2.Recursively analyzing the remainingUC edges in P 3 xy .If the leftmost UC edge E u in P 3 xy is handled by Case a.1, then P 3 xy effectively bypasses E u , thereby enabling the next leftmost UC edge to be addressed-whether by Case a.1 or a.2.On the other hand, if E u is handled by Case a.2, then the prefix P 3 xa of P 3 xy from X to A has been replaced in P 3