Mining CSTNUDs significant for a set of traces is polynomial
Introduction
Temporal networks are a possible framework to model temporal plans and check the consistency of their temporal constraints imposing delays and deadlines between the occurrences of pairs of events in the plan [1]. The main components of a temporal network are time points and constraints. Time points are real variables modeling temporal events. Executing time points means to assign real values to them to fix “when” the corresponding temporal events occur. Constraints are linear inequalities in two variables (with both of their coefficients set to 1) imposing minimal and maximal temporal distances between pairs of time points.
Over the years the core formalism of Simple Temporal Networks [1] has been extended in several ways to cope with uncontrollable durations [2], uncontrollable and controllable choices [3], [4] and, more recently, with combinations of them (see, e.g., [5], [6], [7], [8], [9], [10]). The most expressive formalisms of temporal networks are those that simultaneously handle all such features. Moreover, such formalisms give rise to several, different, taxonomies in which sub-formalisms belonging to them can be ordered by expressive power. As a result, solving any problem for a top-level formalism (e.g., checking consistency or controllability) results in solving the same problem for every sub-formalism in the corresponding hierarchy. Conditional Simple Temporal Networks with Uncertainty and Decisions (CSTNUDs, [9], [10]) is a recent formalism that is able to model controllable and uncontrollable durations as well as controllable and uncontrollable choices simultaneously. CSTNUDs define a hierarchy of temporal networks in which any combination of features can be considered by focusing on the corresponding sub-formalism.
Like any model-based engineering approach, creating a temporal network is a complex, time-consuming, and error-prone task, where discrepancies between the actual process and the obtained network might eventually emerge requiring that the designer refines or abstracts the model being created. This is a top-down, trial-and-error approach. Instead, the opposite, bottom-up approach is known in the literature under the name of process mining and it aims to mine (i.e., synthesize) process descriptions (or, more reasonably, model approximations) from execution traces (i.e., process logs). A trace describes a run of a process, and the set of all available traces can be thought of as a log of a process carried out many times by humans that base their actions only on their experience. One of the first contributions in process mining is that of Agrawal, Gunopulos, and Leymann [11], but, after this seminal work, many others followed by focusing on different process description languages [12], [13], [14], [15], [16], [17], [18]. However, to the best of our knowledge, the problem of mining temporal networks subject to uncontrollable parts has not received particular attention. Despite the current trend in process mining calls for machine learning techniques, we shall see that the well-founded mathematical structure of temporal networks allows us to solve this problem correctly and efficiently, because of a strong underlying monotonicity of the constraint expressions by which , with time points and k a number.
We provide a deterministic polynomial time algorithm to mine a CSTNUD significant for a finite set of execution traces . That is, by construction, the resulting CSTNUD contains every temporal event, (un)controllable duration and (un)controllable choice belonging to some processed trace in . Furthermore, every trace in the input set satisfies the constraints of the resulting CSTNUD.
With respect to the previous version of this paper, presented at the 27th International Symposium on Temporal Representation and Reasoning (TIME 2020) [19], our new contributions in this paper are the following.
- 1.
We update the previous algorithm to fix a corner case due to compatible partial combinations of conditions appearing in different traces.
- 2.
We introduce cstnud-miner.py, a Python prototype implementation, which we test on a set of artificially-produced data.
- 3.
We elaborate on consistency, as well as weak, strong, and dynamic controllability properties of the mined temporal networks.
This paper and its previous version are a first step toward the mining of dynamic controllable temporal networks.
Section 2 discusses background and related work. Section 3 adapts CSTNUDs for the purpose of this paper. Section 4 defines the problem of mining CSTNUDs significant for a set of traces and provides a correct algorithm for it. Section 5 summarizes a note on consistency and controllability of temporal networks needed at the end of Section 6, where we introduce cstnud-miner.py and carry out an experimental evaluation on a synthetic dataset. Section 7 sums up and discusses future work.
Section snippets
Background and related work
Simple Temporal Networks (STNs) [1] model fully controllable and non-disjunctive temporal plans but they cannot deal with (un)controllable choices nor with uncontrollable durations. To bridge such gaps some extensions were proposed over the years. Simple Temporal Networks with Uncertainty (STNUs) [2] extend STNs with uncontrollable (but bounded) durations by means of contingent links. A contingent link consists of an activation (time) point A, whose execution is under control, a contingent
Conditional STNUs with decisions
In this section we formalize the model used in this paper.
Definition 1 A Conditional Simple Temporal Network with Uncertainty and Decisions (CSTNUD) is a tuple , where: is a finite set of time points disjointly partitioned in controllable time points and uncontrollable time points, respectively. is a finite set of booleans disjointly partitioned in controllable booleans and uncontrollable booleans, respectively. is the set of controllable time points having
Mining CSTNUDs significant for a set of traces
As we explained in Section 2, a CSTNUD models a temporal plan in a compact way. In real-world cases, often the network is not given, but, on the contrary, it must be hand-craftily designed. In this section we solve this problem: given a finite set of execution traces (e.g., log) of an underlying temporal plan, mine automatically a good CSTNUD that describes it.
Definition 3 A trace τ is a sequence of these statements: , where . This models the execution of a controllable time point A at time .
A note on consistency and controllability
When uncontrollable parts are supported, the corresponding planning and scheduling problem modeled by the underlying network can be seen as a two-player game between Controller (representing the executor) and Nature (representing the environment). The concept of Controller can be thought of as a deterministic program running on some system which is connected to sensors (to become aware of the behavior of the uncontrollable parts) and actuators (to take action and modify the state of the plan).
A software prototype
We developed a software prototype implementation of our algorithm. We implemented it in Python 3 and named it cstnud-miner.py. Fig. 7 shows cstnud-miner.py's help screen. cstnud-miner.py can be used for either mining a CSTNUD from a log file (option -m) or for generating random log files (option -g). A log file has the format of the traces as discussed in this paper. Fig. 8 shows the specification of the log file containing all traces previously used as examples; the only difference in how
Conclusions and future work
Like any model-based engineering approach, creating a temporal network is a complex, time-consuming, and error-prone task. Along the lines of the bottom-up approach in the field of process mining, we proposed CstnudMiner, an algorithm for mining significant CSTNUDs from a set of execution traces that also contain information on uncontrollable events. A CSTNUD is -significant if:
- •
it contains all time points, booleans and uncontrollable durations in the processed traces, and
- •
each partial
Declaration of Competing Interest
The authors declare no conflicts of interests.
Acknowledgements
This work was partially supported by MIUR, Project Italian Outstanding Departments, 2018-2022, and by INdAM, GNCS 2020, Project Strategic Reasoning and Automated Synthesis of Multi-Agent Systems.
References (32)
- et al.
Temporal constraint networks
Artif. Intell.
(1991) - et al.
Conditional simple temporal networks with uncertainty and decisions
Theor. Comput. Sci.
(2019) - et al.
Workflow mining: a survey of issues and approaches
Data Knowl. Eng.
(2003) - et al.
Consistency checking of STNs with decisions: managing temporal and access-control constraints in a seamless way
Inf. Comput.
(2021) - et al.
Handling contingency in temporal constraint networks: from consistency to controllabilities
J. Exp. Theor. Artif. Intell.
(1999) - et al.
An efficient executive for temporal plans with choice
J. Artif. Intell. Res.
(2011) - et al.
CTP: a new constraint-based formalism for conditional, temporal planning
Constraints
(2003) - et al.
Dynamic controllability via timed game automata
Acta Inform.
(2016) - et al.
Robust execution of plans for human-robot teams
- et al.
Concurrent plan recognition and execution for human-robot teams
Resolving uncontrollable conditional temporal problems using continuous relaxations
Conditional simple temporal networks with uncertainty and decisions
Mining process models from workflow logs
A region-based algorithm for discovering Petri nets from event logs
Process Mining - Data Science in Action
Discovering models of software processes from event-based data
TOSEM
Cited by (3)
Timed Partial Order Inference Algorithm
2023, arXivTimed Partial Order Inference Algorithm
2023, Proceedings International Conference on Automated Planning and Scheduling, ICAPSMining temporal networks: Results and open problems
2021, CEUR Workshop Proceedings