A Better Algorithm for Converting an STNU into Minimal Dispatchable Form
Abstract
A Simple Temporal Network with Uncertainty (STNU) is a data structure for representing and reasoning about temporal constraints on activities, including those with uncertain durations. An STNU is dispatchable if it can be flexibly and efficiently executed in real time while guaranteeing that all relevant constraints are satisfied. Typically, dispatchability requires inserting conditional wait constraints, thereby forming an Extended STNU (ESTNU). The number of edges in an ESTNU affects the computational work that must be done during real-time execution. The MinDispESTNU problem is that of finding an equivalent dispatchable ESTNU having a minimal number of edges. Recent work presented an -time algorithm for solving the MinDispESTNU problem, where is the number of timepoints and is the number of actions with uncertain durations. A subsequent paper presented a faster -time algorithm, but it has been shown to be incomplete. This paper presents a new -time algorithm for solving the MinDispESTNU problem, where is the number of constraints in the network. The correctness of the algorithm is based on a novel theory of the canonical form of nested diamond structures. An empirical evaluation demonstrates the order-of-magnitude improvement in performance.
Keywords and phrases:
Temporal constraint networks, dispatchable networksCopyright and License:
2012 ACM Subject Classification:
Computing methodologies Temporal reasoning ; Theory of computation Dynamic graph algorithmsEditors:
Thierry Vidal and Przemysław Andrzej WałęgaSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Background
Temporal constraint networks facilitate representing and reasoning about temporal constraints on activities. Simple Temporal Networks with Uncertainty (STNUs) allow the explicit representation of actions with uncertain durations [13]. An STNU is dispatchable if it can be executed by a flexible and efficient real-time execution algorithm while guaranteeing that all of its constraints will be satisfied. This paper modifies an existing algorithm for converting a dispatchable network into an equivalent dispatchable network having a minimal number of edges, making it an order of magnitude faster, as demonstrated by an empirical evaluation.
Simple Temporal Networks.
A Simple Temporal Network (STN) is a pair where is a set of real-valued variables called timepoints; and is a set of ordinary constraints, each of the form for and [3]. An STN is consistent if it has a solution as a constraint satisfaction problem (CSP). Each STN has a corresponding graph where the timepoints serve as nodes and the constraints correspond to labeled, directed edges. In particular, each constraint corresponds to an edge in the graph. Such edges may be notated as or, if context permits, simply . A path from to may be notated by listing its timepoints (e.g., ) or, if the context permits, just .
A flexible and efficient real-time execution (RTE) algorithm has been defined for STNs that maintains a time window for each timepoint and, as each is executed, propagates constraints only locally, to ’s neighbors in the graph [19, 15]. An STN is dispatchable if that RTE algorithm is guaranteed to satisfy all of the STN’s constraints no matter how the flexibility afforded by the algorithm is exploited during execution. A consistent STN is dispatchable if and only if each pair of timepoints connected by a path in the graph are connected by a shortest vee-path (i.e., a shortest path comprising zero or more negative edges followed by zero or more non-negative edges) [12]. Efficient algorithms for generating equivalent dispatchable STNs having a minimal number of edges have been presented [19, 15]. Having fewer edges is important since it lessens real-time computations done during execution.
Simple Temporal Networks with Uncertainty.
A Simple Temporal Network with Uncertainty (STNU) augments an STN to include contingent links that represent actions with uncertain, but bounded durations [13]. An STNU is a triple where is an STN, and is a set of contingent links, each of the form , where and . The semantics of STNU execution ensures that regardless of when the activation timepoint is executed, the contingent timepoint will occur such that . Each STNU has a corresponding graph , where is the graph for the STN , and and are sets of labeled edges corresponding to the contingent durations in . In particular, each contingent link in has a lower-case (LC) edge in that represents the uncontrollable possibility that the duration might take on its minimum value ; and an upper-case (UC) edge in that represents the possibility that it might take on its maximum value . For convenience, edges such as and may be notated as and , respectively.
An STNU is dynamically controllable (DC) if there exists a dynamic, real-time execution strategy that guarantees that all constraints in will be satisfied no matter how the contingent durations turn out [13, 4]. A dynamic strategy is one whose execution decisions can react to observations of contingent executions, but without advance knowledge of future events. Many polynomial-time DC-checking algorithms have been presented [11, 1, 5], the fastest having a worst-case time-complexity of , where and are the numbers of timepoints, ordinary constraints, and contingent links. Many DC-checking algorithms generate a kind of conditional constraint called a wait [14, 10, 5]. Although not necessary for DC-checking [1], wait constraints are needed for STNU dispatchability, as follows.
An STNU augmented with a set of waits, , is called an Extended STNU (ESTNU) [11]. A real-time execution algorithm for ESTNUs, called RTE∗, has been defined that provides maximum flexibility while requiring minimal real-time computation [11, 7]. An ESTNU is dispatchable if every run of the RTE∗ algorithm is guaranteed to satisfy all of its constraints no matter how the contingent durations turn out. Equivalently, an ESTNU is dispatchable if and only if all of its STN projections are dispatchable (as STNs) [11]. (A projection of an ESTNU is the STN that results from fixing the durations of its contingent links.) The fastest algorithm for generating equivalent dispatchable ESTNUs is the -time FDSTNU algorithm [6], but it provides no guarantee about the number of edges in its output.
The MinDispESTNU problem.
This paper.
Section 2 summarizes the minDispESTNU and fastMinDispESTNU algorithms. Section 3 then presents a new algorithm, betterMinDispESTNU, that solves the MinDispESTNU problem in time. It employs a novel approach to generating so-called stand-in edges. The correctness of the algorithm is based on a new theory of the canonical form of nested diamond structures, which is detailed in Hunsberger and Posenato [9]. Section 4 presents an empirical evaluation that demonstrates that betterMinDispESTNU achieves an order-of-magnitude speedup over minDispESTNU in practice.
2 Overview of Existing Algorithms
The minDispESTNU algorithm [7] takes a dispatchable ESTNU as its only input and generates as its output an equivalent dispatchable ESTNU having a minimal number of edges. It has four steps: (1) compute the set of so-called stand-in edges (i.e., ordinary edges that are entailed by various combinations of ESTNU edges) and insert them into the graph; (2) apply an STN-dispatchability algorithm to the resulting set of ordinary edges, thereby generating a dispatchable STN subgraph; (3) remove any remaining stand-in edges; and (4) remove any wait edges that are not needed for dispatchability. The worst-case time complexity of the minDispESTNU algorithm is dominated by Step 1. Therefore, our new, faster algorithm modifies only that step, achieving an order-of-magnitude reduction in the overall worst-case time complexity. The following paragraphs summarize Step 1 of the minDispESTNU algorithm, as implemented by its genStandIns helper algorithm.
Generating Stand-in Edges
Following Morris [11], an ESTNU is dispatchable if all of its STN projections are dispatchable (as STNs). Equivalently, in each STN projection, each pair of timepoints and that are connected by a path must be connected by a shortest vee-path (SVP) (i.e., a shortest path comprising zero or more negative edges followed by zero or more non-negative edges) [12]. A key insight behind the minDispESTNU algorithm is that in different projections, the shortest vee-paths from to may take different routes, employ different labeled edges, and have different lengths. The longest SVP from to across all projections determines an ordinary constraint, represented by a stand-in edge, that must be satisfied by every valid execution strategy. The minDispESTNU algorithm generates stand-in edges in two phases: (1) those entailed by individual labeled edges; and (2) those entailed by diamond structures.
Stand-in edges entailed by individual labeled edges.
Each LC, UC or wait edge entails a (weaker) ordinary edge. For example, consider the labeled edges associated with the contingent link in Figure 1. The LC edge represents the possibility that the duration might take on its minimum value . Its stand-in edge represents the (modeled) certainty that will be at most . Similarly, the UC edge represents the possibility that might take on its maximum value , while its stand-in edge represents the certainty that will be at least . Finally, the wait edge represents the conditional constraint that, as long as remains unexecuted, must wait until after . Its stand-in edge represents that must unconditionally wait at least after , since cannot execute before then.
More generally, for any contingent link , the LC edge entails the stand-in edge ; the UC edge entails the stand-in edge ; and any wait edge entails the stand-in edge , as seen in Figure 1.
Stand-in edges entailed by diamond structures.
The minDispESTNU algorithm uses its genStandIns helper algorithm to compute stand-in edges arising from diamond structures. Figure 2(a) shows a typical diamond, which involves the LC and UC edges associated with a contingent link , a wait edge , and some ordinary edges aimed at a timepoint . Figure 2(b) shows that in the projection where , the shortest path from to has length , and the shortest path from to has length . Figure 2(c) shows that in the projection where , the shortest path from to has length , and the shortest path from to has length . Figure 2(d) introduces (dashed) stand-in edges to reflect that, across all projections, where , the shortest path from to has length at most , while the shortest path from to has length at most . These stand-in edges represent ordinary constraints that must be satisfied by any valid dynamic execution strategy. Figure 2(e) shows the general case where the stand-in edge from to has length , and the stand-in edge from to has length , the latter being termed an application of the VAC rule [9].
Stand-in edges entailed by nested diamonds.
The main focus of genStandIns is on computing stand-in edges entailed by individual diamond structures. But diamond structures can also be nested. In particular, in any diamond, the subpath from to may contain a stand-in edge derived from a nested diamond. However, because the activation timepoints appearing in a nested diamond structure are subject to a strict order (as shown elsewhere [9]), diamonds can only be nested to a maximum depth of . For this reason, the genStandIns algorithm does up to iterations, each addressing one level of potential nesting. Each iteration of genStandIns involves two steps: (1) exploring individual diamonds ( choices for the contingent link, and choices for both and ); and then (2) calling Johnson’s algorithm [2] to update the APSP distance matrix to accommodate stand-in edges generated by the first step.
Figure 3 shows how genStandIns deals with a sample quadruply nested diamond structure. The innermost diamond, , is explored during the first iteration, yielding the blue, dashed stand-in edge , shown in Figure 3(b), where .111As seen in Figure 1, each labeled edge itself entails a corresponding stand-in edge, not shown in Figure 3. Those stand-in edges ensure that there are ordinary subpaths from each to , and from each to , which implies that all of the diamonds in Figure 3 would be processed during each iteration of genStandIns. However, the stand-in edges shown in Figure 3 are the strongest ones. Johnson’s algorithm then updates the APSP distance matrix, setting , indicated by the red, dotted line in Figure 3(b). The next iteration considers , which uses the new subpath from to of length to generate the blue, dashed stand-in edge , shown in Figure 3(c), where . Johnson’s algorithm then updates to , indicated by the red, dotted line in Figure 3(c). The third iteration generates the blue, dashed stand-in edge , since ; and the red, dotted line from to indicates the subsequent update . Finally, as shown in Figure 3(d), the last iteration generates the blue, dashed stand-in edge , since ; while the red, dotted line from to indicates the update .
The complexity of minDispESTNU is driven by the -time complexity of genStandIns, which derives from its up to calls of Johnson’s algorithm on up to edges.
2.1 Canonical Form of Nested Diamond Structures
The authors presented a novel, rigorous theory of the canonical form of nested diamond structures [9] that provides a foundation for understanding the dispatchability of ESTNUs and formally proving the correctness of the minDispESTNU algorithm. It also highlights features of such structures that suggest new approaches to solving the MinDispESTNU problem.
Central to any such algorithm is computing, for each pair of timepoints and , the strongest ordinary constraint entailed by ESTNU paths from to , notated as . For the ESTNU in Figure 3, (cf. the red dotted line in Figure 3(e)). The theory confirms that each value that derives from nested diamonds must have an associated structure, notated as , whose form is illustrated in Figure 4. In particular, comprises a sequence of contingent links, shown in brown, connected by different kinds of paths. From each contingent timepoint , there is a path of non-negative ordinary edges from to , shown in blue. Between consecutive pairs of activation timepoints and there is a negOrdWait path (i.e., a path comprising zero or more negative ordinary edges, shown in red, followed by a single wait edge, shown in green). There is also a negOrdWait path from to the leftmost activation timepoint . Finally, the path from the rightmost activation timepoint to is an ordinary path, shown in black, that is a shortest vee-path (SVP). The path from to that passes through all of the activation timepoints is called the spine of the structure. For this paper, the following properties are particularly important:
-
In the situation/projection where each contingent duration along the spine satisfies , the length of the spine is .
-
The negOrdWait paths between consecutive pairs of activation timepoints, across all canonical structures, puts the entire set of activation timepoints into a strict partial order.
2.2 Error in the fastMinDispESTNU Algorithm
Recent work [8] presented an algorithm, called fastMinDispESTNU, that aimed to take advantage of certain features of nested diamonds. In particular, it exploited the fact that activation timepoints participating in nested diamonds fall into a strict partial order. That enabled processing them in a single iteration, instead of the iterations in the minDispESTNU algorithm. Unfortunately, that work made an incorrect assumption. Although it is true that for any given canonical structure it suffices to include only one wait edge terminating at each activation timepoint along the spine, it is not the case that all of the canonical structures that include some activation timepoint necessarily employ the same wait edge terminating at . Instead, as illustrated in Figure 5, different wait edges terminating at may be needed in different canonical structures. In the figure, there are three overlapping canonical structures that each use the contingent link : one from to (in purple), one from to (in green), and one from to (in blue). For , the projection where is determinative; and in that projection the shortest path from to is through with length , indicated by the red dotted arrow. The dashed, purple stand-in edge has length , since the wait edge has length in that projection. For , the projection where is determinative; and in that projection, the shortest path from to is through with length . The green, dashed stand-in edge has length , since the wait edge has length -4 in that projection. For , the projection where is determinative; and in that projection, the shortest path from to is through with length . The blue, dashed stand-in edge has length , since the wait edge has length in that projection. The righthand side of Figure 5 plots the lengths of the three paths from to as functions of the contingent duration . It confirms that for different values of , different paths are shortest between and . As a result, each value is based on a different path from to .
In general, for each terminus , the value is determined by the projection where . Since these durations/projections may be different for different , the wait edges terminating at may provide different shortest vee-paths in different projections. Although this example shows that the fastMinDispESTNU algorithm does not necessarily solve the MinDispESTNU problem, it also suggests an alternative way to approach the computation of values that results in a more efficient (and correct) algorithm for solving the MinDispESTNU problem, which is the subject of the next section.
3 A New Approach to Generating Stand-in Edges
Figure 6 illustrates our new approach to efficiently generating stand-in edges derived from nested diamond structures. It uses the following feature of the canonical form of nested diamonds: in the situation where the duration of each participating contingent link is given by , the length of the path from to along the spine of the canonical structure equals . Crucially, these durations are fixed for a given . Therefore, the problem of activation timepoints, and , that are consecutive in multiple overlapping canonical structures employing different wait edges in different structures, can effectively be sidestepped by computing all of the values for a fixed . To do so, our new algorithm backtracks from along shortest paths in the OW-graph (i.e., the graph comprising the ordinary and wait edges from the ESTNU) where wait edges, as they are encountered, are projected using the above-mentioned durations.
On the left of the figure, backtracking from encounters the activation timepoint , where and , where the determinative duration is . In this situation, the wait edges terminating at project onto the red edges shown in the middle-left of the figure. In this projection, the path is shortest, with a length of , indicated by the red, dotted arrow. The corresponding stand-in edge from to is shown as dashed and purple. The dashed stand-in edges emanating from (green) and (blue) are also generated, but do not contribute to .
On the righthand side of the figure, backtracking from encounters and yields the duration . In this situation, the wait edges project to the red edges shown on the far right. Although each wait edge generates a stand-in edge, the one from to provides the shortest path (dotted, red) from to , which determines .
Pseudocode for our new algorithm for generating stand-in edges entailed by nested diamond structures is given as Algorithm 1. (Appendix A provides pseudocode for all minDispESTNU procedures updated to use Algorithm 1.) Algorithm 1 works as follows.
Initialization (Lines 1–3).
The getInitStandins algorithm (a helper for minDispESTNU) is called to generate stand-in edges entailed by individual labeled edges (cf. Figure 1) or from applications of the VAC rule (cf. Figure 2(e)). Next, the Bellman-Ford algorithm [2] is called to compute a solution to the STN, , that comprises the ordinary and wait edges from , ignoring any alphabetic labels. That solution, , is then used as a potential function to re-weight the edges in to have non-negative values, thereby enabling the use of Dijkstra’s algorithm [2] to guide the subsequent back-tracking from each . Finally, Johnson’s algorithm [2] is used to compute the initial distance matrix for ordinary paths.
Main foreach Loop (Lines 4–30).
Each iteration of the main foreach loop processes a single timepoint . It uses a modified version of Dijkstra’s algorithm to back-propagate from through the edges in the graph, aiming to update the distance function so that by the end of the iteration, for each timepoint , , and all needed stand-in edges terminating at have been generated.
- Iteration initialization (Lines 5–8).
-
First, a minimum priority queue, , is initialized. For each timepoint in the queue, its priority is the current estimate of , re-weighted by the potential function . In particular, the priority of is given by: . Initially, the queue contains only , with a priority of . The -vector, enables anytime access to the priorities of timepoints in the queue.
Next, a set is initialized. It is used to keep track of timepoints for which a stand-in edge from to will need to be generated. If the current estimate of derives from a path (1) that forms the spine of a canonical diamond structure; and (2) whose first edge is a wait edge, then is added to , at Line 26. However, should subsequent propagation discover a shortest path from to for which no stand-in edge is needed, then is removed from , at Line 16. Since the status of a given timepoint may change during the algorithm, stand-in edges are not actually accumulated until the end of the iteration, at Lines 28–30.
- Iteration Body (Lines 9–30).
-
The body of each iteration is a while loop that carries out the back-propagation from . At Line 10, a timepoint is extracted from the queue, along with its priority . At Line 11, the value of is extracted from by undoing the re-weighting using the potential function . (The next section proves the invariant that when a timepoint is popped from the queue, its priority equals , re-weighted by the potential function .) That value is then used to update the distance function , at Line 12.
Next, Lines 13–17 back-propagate along each incoming ordinary edge . First, at Line 14, a possible new estimate of using a path from to to , re-weighted using the potential function , is computed and stored in . (Note that is the re-weighted length of the incoming edge from to .) If that estimate is less than the current priority of (cf. Line15), then is removed from to reflect that this newly found shortest path from to does not begin with a wait edge and, hence, does not require a stand-in edge (cf. Line 16). At Line 17, is inserted into the queue and its priority is updated.
- Lines 18–27
-
carry out the back-propagation along any incoming wait edges, which can only happen if is an activation timepoint for a contingent link . Line 19 computes the value of the contingent duration that determines whether any stand-in edges terminating at can use this contingent link (cf. Figures 2(e) and 6). Note that the algorithm relies on the fact that at this point. Line 20 checks whether , since otherwise, as shown in Claim 10 of Hunsberger and Posenato [9], it is not necessary to back-propagate along any wait edge coming in to (i.e., ordinary edges suffice). Line 22 computes the projection of the wait edge in the situation where . Line 23 re-weights the projected length using the potential function. Line 24 computes the length of the path from to to in the re-weighted graph. If that length less than or equal to the current key of in the queue (Line 25), then is added to (at Line 26) to reflect that a stand-in edge should be generated; and the key for is updated in the priority queue (at Line 27).
- Finally,
-
at the end of the iteration, stand-in edges for all of the flagged timepoints are generated at Lines 28–30.
Correctness of the betterMinDispESTNU Algorithm
The correctness of betterMinDispESTNU relies on the following properties of the canonical form of nested diamond structures that we have rigorously presented elsewhere [9]. (The claims mentioned below are from that work.) First, for each pair of timepoints and , there is a canonical form that determines the value . Furthermore, equals the length of the spine of that structure in the situation where each . (See the proof of Claim 8.) Second, using the same techniques as in the proof of Claim 7, we get that for a fixed , there is a single situation that is simultaneously maximal for all values (i.e., in the projection determined by , the length of the spine of each structure equals ). For each contingent link appearing in any canonical structure from any to the fixed timepoint , specifies the duration, . Therefore, the betterGenStandIns algorithm, as it backtracks from , can be understood as incrementally computing the durations, , for each activation timepoint that it encounters, based on the accumulated values, and . It then computes the length of each incoming wait edge in that projection (i.e., ), which is its length in the spine of any structure that uses it.
Worst-Case Time Complexity of the betterMinDispESTNU Algorithm
First, let and be the numbers of ordinary, lower-case, upper-case, and wait edges, respectively, in the input ESTNU. Generating stand-in edges for individual labeled edges along with those derived from the VAC rule add more ordinary edges. Afterward, betterMinDispESTNU is applied to the OW-graph which has edges. For each timepoint , betterMinDispESTNU uses a Dijkstra-like back-propagation that runs in time. (At most additional stand-in edges can be added during the course of the algorithm.) Therefore, its iterations can be done in time, which reduces to . For dense graphs, where , this reduces to , but for sparse graphs, for example, where and , it reduces to .
4 Empirical Evaluations
We implemented the betterMinDispESTNU algorithm containing the procedure Algorithm 1 in Java – publicly available as part of the CSTNU Tool framework [18] – and evaluated its performance using the STNU benchmark published by Posenato [17]. This benchmark was created using the STNU random generator of the CSTNU Tool framework. The public benchmark comprises 1000 instances, all having the same topology, the worker-lanes topology, which simulates the worker lanes of business process modeling [16]. In this topology, the set of contingent links is divided into five lanes, with each lane representing a sequence of tasks that must be executed by an agent. The contingent links within each lane are interspersed with ordinary constraints that specify delays between the end of one task and the start of the next. Additionally, there are extra constraints between nodes in different lanes to represent temporal-coordination constraints among tasks executed by different agents.
For each possible number of nodes , the benchmark contains 200 DC instances and 200 non-DC instances, each having contingent links and, on average, edges (i.e., edges). We considered the first 30 instances for each value of in the benchmark.
All of the experiments were executed on an OpenJDK JVM 21 configured with 16 GB of heap memory (parameters -Xmx16G and -Xms16G), on a Linux computer equipped with two AMD Opteron™ 4334 processors running at 3.1 GHz (6200 BogoMIPS) and 64 GB RAM.
Each DC STNU was first pre-processed by the FDSTNU dispatchability algorithm to generate an equivalent dispatchable ESTNU, . Then, the dispatchable ESTNU, , was fed as input to minDispESTNU and betterMinDispESTNU to generate equivalent dispatchable ESTNUs having minimal numbers of edges (called ESTNUs) to: (1) confirm that the output ESTNUs were identical; and (2) compare the average execution times.
Surprisingly, during the execution of minDispESTNU, we observed that no instances from the considered benchmarks contain any nested diamond structures. Consequently, there were no opportunities for the betterMinDispESTNU algorithm to outperform minDispESTNU.
Figure 7(a) shows the average numbers of edges in the input STNUs (black), the dispatchable ESTNUs generated FDSTNU (teal), and the minimal dispatchable ESTNUs produced by minDispESTNU (dotted red) and betterMinDispESTNU (dashed blue). (The dotted red and dashed blue lines in the figure are completely overlapping and, hence, difficult to distinguish.) The error bars denote 95% confidence intervals, which are scarcely visible due to the minimal standard deviations. The findings reveal that the average numbers of edges in the minimized networks are approximately one order of magnitude smaller than in the ESTNUs generated by FDSTNU. Since the numbers of edges in dispatchable networks directly impact the performance of real-time execution algorithms, these results demonstrate that minDispESTNU and betterMinDispESTNU generate dispatchable networks that can be more efficiently executed. We also confirmed that they output the same minimal networks.
Figure 7(b) plots the computational cost associated with generating ESTNUs. The lower teal line shows the average execution times for FDSTNU to generate equivalent dispatchable networks that are typically not ESTNUs. The upper two (red and blue) lines show the average execution times for generating equivalent dispatchable networks having minimal numbers of edges, obtained by applying minDispESTNU or betterMinDispESTNU to . As expected, if there are no nested diamond structures, then both algorithms will have essentially equivalent performance since they both end up doing two calls to Johnson’s algorithm (or a Johnson-like algorithm).
To assess the impact of nested diamond structures on the performance of the two algorithms, we created two new benchmarks, one comprising random STNU instances that each contain one copy of the depth-4 nested diamond structure depicted in Figure 3(a), the other similar to the first, but where the diamond structure has depth 6.
The presence of the depth-4 nested diamond structure in each instance requires the genStandIns helper algorithm used by minDispESTNU to perform up to five iterations, each taking time, to generate the appropriate stand-in edges. In contrast, betterMinDispESTNU replaces genStandIns with Algorithm 1 (betterGenStandIns) whose worst-case time complexity is only , regardless of how deeply nested the diamond structure may be. We therefore expected to see an especially pronounced difference in average execution times for instances having the depth-6 nested diamond structure.
The results are presented in Figures 7(c) and 7(d). The execution time of betterMinDispESTNU (FDSTNU) (in blue) is significantly less than that of minDispESTNU (FDSTNU) (in red) across all instances. In addition, for instances having 2000 nodes, the execution time of minDispESTNU (FDSTNU) exceeded the 30-minute timeout. Such results confirm that the betterMinDispESTNU algorithm is significantly more efficient than the minDispESTNU algorithm when the input instances contain nested diamond structures, even when the number of nested diamonds is small. Regarding the depth-6 nested diamond structure, we discovered that, on average, the presence of random constraints among nodes in different lanes and those in the diamond structure sometimes entailed stronger constraints than the stand-in edges associated with the diamond structure and, therefore, the genStandIns helper for minDispESTNU performs on average five internal iterations, the same as for instances having the quadruply-nested diamond structure.
5 Conclusions
Generating an equivalent dispatchable ESTNU having a minimal number of edges is an important problem for applications involving actions with uncertain, but bounded durations. The number of edges in the dispatchable network is important because it directly impacts the real-time computations required during execution. Therefore, for time-sensitive applications it is important to generate an equivalent dispatchable ESTNU having a minimal number of edges, which we call a ESTNU. This paper modified the only existing algorithm for generating ESTNUs, making it an order-of-magnitude faster. It also showed that a second previously presented algorithm does not in fact solve the MinDispESTNU problem. The new algorithm, betterMinDispESTNU, reduced the worst-case time-complexity from to which, for sparse networks, reduces to .
References
- [1] Massimo Cairo, Luke Hunsberger, and Romeo Rizzi. Faster Dynamic Controllablity Checking for Simple Temporal Networks with Uncertainty. In 25th International Symposium on Temporal Representation and Reasoning (TIME-2018), volume 120 of LIPIcs, pages 8:1–8:16, 2018. doi:10.4230/LIPIcs.TIME.2018.8.
- [2] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, 4th Edition. MIT Press, 2022. URL: https://mitpress.mit.edu/9780262046305/introduction-to-algorithms.
- [3] Rina Dechter, Itay Meiri, and J. Pearl. Temporal Constraint Networks. Artificial Intelligence, 49(1-3):61–95, 1991. doi:10.1016/0004-3702(91)90006-6.
- [4] Luke Hunsberger. Fixing the semantics for dynamic controllability and providing a more practical characterization of dynamic execution strategies. In 16th International Symposium on Temporal Representation and Reasoning (TIME-2009), pages 155–162, 2009. doi:10.1109/TIME.2009.25.
- [5] Luke Hunsberger and Roberto Posenato. Speeding up the RUL- Dynamic-Controllability-Checking Algorithm for Simple Temporal Networks with Uncertainty. In 36th AAAI Conference on Artificial Intelligence (AAAI-22), volume 36-9, pages 9776–9785. AAAI Pres, 2022. doi:10.1609/aaai.v36i9.21213.
- [6] Luke Hunsberger and Roberto Posenato. A Faster Algorithm for Converting Simple Temporal Networks with Uncertainty into Dispatchable Form. Information and Computation, 293(105063):1–21, 2023. doi:10.1016/j.ic.2023.105063.
- [7] Luke Hunsberger and Roberto Posenato. Converting Simple Temporal Networks with Uncertainty into Minimal Equivalent Dispatchable Form. In Proceedings of the Thirty-Fourth International Conference on Automated Planning and Scheduling (ICAPS 2024), volume 34, pages 290–300, 2024. doi:10.1609/icaps.v34i1.31487.
- [8] Luke Hunsberger and Roberto Posenato. Faster Algorithm for Converting an STNU into Minimal Dispatchable Form. In 31st International Symposium on Temporal Representation and Reasoning (TIME 2024), volume 318 of Leibniz International Proceedings in Informatics (LIPIcs), pages 11:1–11:14, 2024. doi:10.4230/LIPIcs.TIME.2024.11.
- [9] Luke Hunsberger and Roberto Posenato. Canonical Form of Nested Diamond Structures. Technical Report 111/2025, Dipartimento di Informatica - Università degli Studi di Verona, May 2025. URL: https://iris.univr.it/handle/11562/1163111.
- [10] Paul Morris. A Structural Characterization of Temporal Dynamic Controllability. In Principles and Practice of Constraint Programming (CP-2006), volume 4204, pages 375–389, 2006. doi:10.1007/11889205_28.
- [11] Paul Morris. Dynamic controllability and dispatchability relationships. In Int. Conf. on the Integration of Constraint Programming, Artificial Intelligence, and Operations Research (CPAIOR-2014), volume 8451 of LNCS, pages 464–479. Springer, 2014. doi:10.1007/978-3-319-07046-9_33.
- [12] Paul Morris. The Mathematics of Dispatchability Revisited. In 26th International Conference on Automated Planning and Scheduling (ICAPS-2016), pages 244–252, 2016. doi:10.1609/icaps.v26i1.13739.
- [13] Paul Morris, Nicola Muscettola, and Thierry Vidal. Dynamic control of plans with temporal uncertainty. In 17th Int. Joint Conf. on Artificial Intelligence (IJCAI-2001), volume 1, pages 494–499, 2001. URL: https://www.ijcai.org/Proceedings/01/IJCAI-2001-e.pdf.
- [14] Paul H. Morris and Nicola Muscettola. Temporal dynamic controllability revisited. In 20th National Conference on Artificial Intelligence (AAAI-2005), pages 1193–1198, 2005. URL: https://www.aaai.org/Papers/AAAI/2005/AAAI05-189.pdf.
- [15] Nicola Muscettola, Paul H. Morris, and Ioannis Tsamardinos. Reformulating temporal plans for efficient execution. In Proceedings of the Sixth International Conference on Principles of Knowledge Representation and Reasoning, KR’98, pages 444–452, 1998.
- [16] Object Management Group (OMG). Business process definition metamodel (bpdm), Beta 1. http://www.omg.org, 2007.
- [17] Roberto Posenato. STNU Benchmark version 2020, 2020. URL: https://profs.scienze.univr.it/˜posenato/software/cstnu/benchmarkWrapper.
- [18] Roberto Posenato. CSTNU Tool: A Java library for checking temporal networks. SoftwareX, 17:100905, 2022. doi:10.1016/j.softx.2021.100905.
- [19] Ioannis Tsamardinos, Nicola Muscettola, and Paul Morris. Fast Transformation of Temporal Plans for Efficient Execution. In 15th National Conf. on Artificial Intelligence (AAAI-1998), pages 254–261, 1998. URL: https://cdn.aaai.org/AAAI/1998/AAAI98-035.pdf.
