<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Dynamic Controllability of Temporal Networks via Supervisory Control</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matteo Zavatteri</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Davide Bresolin</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Romeo Rizzi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tiziano Villa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Verona</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Mathematics, University of Padova</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Temporal networks are expressive formalisms employed in AI to model, validate, and execute temporal plans. The core parts of a temporal network are a finite set of real variables called time points and a ifnite set of constraints bounding the minimal and/or maximal temporal distance between pairs of time points. When uncontrollable choices are considered, a problem of interest is determining whether or not a network is dynamically controllable. That is, whether there exists a strategy that, based only on the values already assigned to uncontrollable variables, progressively assigns the controllable variables with their final values in such a way that all constraints will be met in the end. Current single-strategy synthesis approaches are mainly based on constraint propagation or controller synthesis for timed game automata. In this paper we show how to model a temporal network as a Discrete Event System (DES) so as to leverage on Supervisory Control Theory to synthesize all dynamic integer strategies within a finite time horizon.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;AI</kwd>
        <kwd>formal methods</kwd>
        <kwd>temporal network</kwd>
        <kwd>discrete event system</kwd>
        <kwd>supervisory control</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Temporal Networks</title>
      <p>
        In the Artificial Intelligence community, temporal networks are a framework to model
temporal plans and check the consistency of temporal constraints imposing delays and deadlines
between the occurrences of events in the plan [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Over the years the core formalism of
Simple Temporal Networks [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] has been extended in several ways to cope with uncontrollable
durations, (un)controllable choices, disjunctive and conditional constraints, see for example
[
        <xref ref-type="bibr" rid="ref1 ref10 ref11 ref2 ref3 ref4 ref5 ref6 ref7 ref8 ref9">1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11</xref>
        ]. The most expressive formalisms of temporal networks are those
that simultaneously handle all such features. In this paper we stick with the restriction of
CDTNUs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] (or CTNUDs [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]) that only consider uncontrollable choices and conditional disjunctive
constraints over the same pair of time points. We address the dynamic controllability problem
from a maximally-permissive point of view. That is, we synthesize all strategies that correctly
assign integer values to the controllable variables (within a finite time horizon) only depending
on the already observed values assigned to the uncontrollable ones.
      </p>
      <p>Definition 1.1. The temporal network model of this paper is a tuple ( , ℬ, ℐ, ), where  is
a finite set of controllable real variables called time points; ℬ is a finite set of uncontrollable
Boolean variables called booleans; ℐ : ℬ →  is an injective function associating booleans
to time points; and  is a finite set of conditional constraints. Each constraint has the form
 ⇒  −  ∈ ⋃︀=1[ℓ, ], where  is a consistent conjunction of literals over ℬ; ,  are time
points; ⋃︀=1[ℓ, ] is a finite disjoint union of intervals [ℓ, ] with ℓ,  ∈ Z ∪ {±∞} and
ℓ ≤  for each  = 1, . . . , .</p>
      <p>
        An example of temporal network is given in Figure 1, where  := {, , }, ℬ := {},
ℐ() :=  , and  := { −  ∈ [
        <xref ref-type="bibr" rid="ref10">10, 20</xref>
        ], ¬ ⇒  −  ∈ [
        <xref ref-type="bibr" rid="ref5 ref5">5, 5</xref>
        ] ∪ [15, 15],  ⇒  −  ∈
[
        <xref ref-type="bibr" rid="ref10 ref10">10, 10</xref>
        ] ∪ [30, 30],  −  ∈ [−∞ , 30]}. Such a temporal network models a daily commuting
plan to get to work. Specifically, the time point  models the commuter that checks the weather
to see if it is raining or not before leaving. If so, the uncontrollable boolean  associated to 
will be observed to be true. False, otherwise. After that, the time points  and  model the
commuter leaving for and arriving to work, respectively.  occurs from 10 to 20 minutes since
 (unconditional constraint  −  ∈ [
        <xref ref-type="bibr" rid="ref10">10, 20</xref>
        ]). When leaving, the commuter might chose
to go by car or by bus. It takes 5 minutes to go by car or 15 minutes to go by bus when it is
not raining (constraint ¬ ⇒  −  ∈ [
        <xref ref-type="bibr" rid="ref5 ref5">5, 5</xref>
        ] ∪ [15, 15]). Instead, if it is raining, these times
are doubled (constraint  ⇒  −  ∈ [
        <xref ref-type="bibr" rid="ref10 ref10">10, 10</xref>
        ] ∪ [30, 30]). Finally, the commuter must arrive to
work within 30 minutes (unconditional constraint  −  ∈ [−∞ , 30]). Clearly, the exact time
at which the commuter arrives to work depends on the combination of weather and means of
transport. Notice that the temporal network is dynamically controllable. A possible strategy
is as follows. The commuter checks the weather at time 0 and then leaves at time 10. If it is
not raining (s)he takes the bus and arrives at work at 25. If it is raining (s)he takes the car and
arrives at work at 20. Clearly, there is more than one possible strategy. For example, if it is not
raining and the commuter leaves no later than 15, then (s)he will be able to choose any means
of transport (or car only if (s)he leaves after 15). Instead, if it is raining, regardless on when the
commuter leaves (from 10 to 20) (s)he will be able to only go by car.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Non-Blocking Supervisory Control</title>
      <p>
        Supervisory control provides tools and methodologies for the automatic synthesis of controllers
with respect to a set of requirements [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The need for control arises whenever the plant admits
a subset of behaviors that are undesired and must therefore be prevented by control. Concretely,
this is achieved by deploying a supervisor in feedback loop with the plant that will tell which
events are allowed next. A Discrete Event System (DES) is a transition system that generates
and marks a pair of formal languages built on a finite alphabet of events, where each event is
 | ≠, ≥
 ∈
start { I
0}
      </p>
      <p>X0
...</p>
      <p>Yh</p>
      <p>SANTo(t(ℎ),)</p>
      <p>S
(a) Encoding a time point  with associated boolean .</p>
      <p>Not()
{ ∈  |  ̸= ,  ≥ 0}
{ ∈  |  ̸= ,  ≥ 1}
{ ∈  |  ̸= ,  ≥ ℎ}
start
...
either controllable or uncontrollable. When working with regular languages, we can model
DESs by means of finite state automata. The control synthesis problem takes as input a set of
automata whose concurrent behavior models the plant and another set of automata modeling
requirements and it tries to build a controller that is maximally-permissive and non-blocking.
Roughly speaking, the former means that all executions of the plant that are legal must not
be blocked, whereas the latter means that no execution of the plant gets to a point at which it
cannot “complete” (i.e., reach a marked state).</p>
      <p>In the case of finite state automata, the synthesis algorithm starts from the parallel composition
of the plant automata with the requirement automata and then removes states if they disable
uncontrollable events or if there is no path toward a marked state. The algorithm ends when
there are no more states to remove. Eventually, either all states are removed (and thus we have
no supervisor) or we get a maximally, non-blocking supervisor.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Dynamic Controllability via Supervisory Control</title>
      <p>Let  := ( , ℬ, ℐ, ) be a temporal network and let ℎ be a finite time horizon. That is, a
number “big enough” to guarantee that if  is dynamically controllable, then there exists some
strategy that always schedules all events within ℎ. In our example, ℎ = 30 sufices because of
the constraint  −  ∈ [−∞ , 30]. Also, when all numbers in the instance are integers, the
network is dynamically controllable, and we assume instantaneous reaction semantics, then
there exist integer strategies. We start from a set of events  that contains ℎ + 1 controllable
events 0, . . . , ℎ for each  ∈  , and two uncontrollable events , ¬ for each  ∈ ℬ. An
event  means that time point  is executed at time . An event  (resp., ¬) means that the
boolean  has been observed true (resp., false).</p>
      <p>The first thing that we need to do is to create the plant that guarantees the followings: (1)
each time point is executed exactly once, (2) if a time point  has a boolean associated, then
the boolean is assigned a truth value exactly once upon the execution of , and (3) the time
assigned to a time point is monotone non-decreasing (w.r.t. the time assigned to the already
executed time points). To achieve this purpose, we create a plant automaton for each time point
 ∈  as shown in Figure 2a. Self loops at state I (initial state) allow the execution of other
time points before the execution of . The execution of  at time  ∈ {0, . . . , ℎ} happens
by taking a transition  leading to the state Xt. If  has also a boolean  associated (i.e.,
() = ), then the assignment of a truth value to  occurs by executing one of the events , ¬
leading to the marked state Xbt. If  does not have any boolean associated, then the automaton
lacks the transitions labeled by /¬ as well as the state Xbi, but in that case it is Xt to be marked.
At marked states (Xt or Xbt), the execution of all other time points is restricted to occur at a time
≥  (self loops at marked states). The concurrent behavior of all these automata meets (1), (2),
and (3) described above. To give an example, Figure 2b provides the encoding of the time point
 of Figure 1.</p>
      <p>
        The second thing that we need to do is to create the requirement automata. To achieve this
purpose, we create a requirement automaton for each constraint  ⇒  −  ∈ ⋃︀=1[ℓ, ] in
. Figure 2c shows such encoding. Basically, the automaton is synchronized with the execution
of ,  (for  ∈ {0, . . . , ℎ}) and the observation of the truth values of booleans in . The
states of the automaton handle all possible valid executions of these events. At any state Xt a set
of transitions leading to S are labeled by events ′ resembling the executions of  that satisfy
the constraint (event set SAT()). Symmetrically, for any state Yt transitions to S are labeled
with events from SAT(). Also, from any state it is always possible to reach S with a boolean
event that makes  false (event set Not(L)). Finally, at S there are self loop transitions to avoid
blocking the execution once the constraint is satisfied. This way, all executions not satisfying
the constraint will get stuck in some state diferent from S. Figure 2d shows the encoding of
 ⇒  −  ∈ [
        <xref ref-type="bibr" rid="ref10 ref10">10, 10</xref>
        ] ∪ [30, 30] of Figure 1. For example, if we could leave at 0 (state L0), then
either it does not rain and thus the constraint does not apply leading immediately to S, or we
would need to arrive at work at time 10 or 30 in order to satisfy the constraint.
      </p>
      <p>Finally, if we run the synthesis algorithm with these plant and requirement automata we can
obtain a supervisor if and only if the temporal network is dynamically controllable.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions and Future Work</title>
      <p>
        This paper places dynamic controllability of temporal networks at the intersection of Formal
Methods and Artificial Intelligence, by modeling temporal networks as discrete event systems,
so we leverage 40-more years of Supervisory Control to solve dynamic controllability in a
maximally-permissive way. In the case of the example in Figure 1 the supervisor has 399 states
and 398 transitions (52 states and 228 transitions, if minimized). As future work we plan to
explore variations of classic supervisory control (e.g., [
        <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
        ]) in order to reduce time and space
complexity of the synthesis.
This work was partially supported by MIUR, Project Italian Outstanding Departments, 2018-2022,
by INdAM, GNCS 2022, Project Elaborazione del Linguaggio Naturale e Logica Temporale per la
Formalizzazione di Testi, and by the SID/BIRD project Deep Graph Memory Networks, Department
of Mathematics, University of Padova.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Dechter</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Meiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pearl</surname>
          </string-name>
          ,
          <article-title>Temporal constraint networks</article-title>
          ,
          <source>Artif. Intell</source>
          .
          <volume>49</volume>
          (
          <year>1991</year>
          )
          <fpage>61</fpage>
          -
          <lpage>95</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T.</given-names>
            <surname>Vidal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Fargier</surname>
          </string-name>
          ,
          <article-title>Handling contingency in temporal constraint networks: from consistency to controllabilities, Jour</article-title>
          . of Exp. &amp;
          <string-name>
            <surname>Theor</surname>
          </string-name>
          . Artif. Intell.
          <volume>11</volume>
          (
          <year>1999</year>
          )
          <fpage>23</fpage>
          -
          <lpage>45</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Conrad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <string-name>
            <surname>Drake:</surname>
          </string-name>
          <article-title>An eficient executive for temporal plans with choice</article-title>
          ,
          <source>JAIR</source>
          <volume>42</volume>
          (
          <year>2011</year>
          )
          <fpage>607</fpage>
          -
          <lpage>659</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>I.</given-names>
            <surname>Tsamardinos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Vidal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. E.</given-names>
            <surname>Pollack</surname>
          </string-name>
          ,
          <string-name>
            <surname>CTP:</surname>
          </string-name>
          <article-title>A new constraint-based formalism for conditional, temporal planning</article-title>
          ,
          <source>Constraints</source>
          <volume>8</volume>
          (
          <year>2003</year>
          )
          <fpage>365</fpage>
          -
          <lpage>388</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cimatti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Hunsberger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Micheli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Posenato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Roveri</surname>
          </string-name>
          ,
          <article-title>Dynamic controllability via timed game automata</article-title>
          ,
          <source>Acta Informatica</source>
          <volume>53</volume>
          (
          <year>2016</year>
          )
          <fpage>681</fpage>
          -
          <lpage>722</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>E.</given-names>
            <surname>Karpas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. J.</given-names>
            <surname>Levine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <article-title>Robust execution of plans for human-robot teams</article-title>
          ,
          <source>in: ICAPS '15</source>
          , AAAI Press,
          <year>2015</year>
          , pp.
          <fpage>342</fpage>
          -
          <lpage>346</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S. J.</given-names>
            <surname>Levine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <article-title>Concurrent plan recognition and execution for human-robot teams</article-title>
          ,
          <source>in: ICAPS '14</source>
          ,
          <string-name>
            <surname>AAAI</surname>
          </string-name>
          ,
          <year>2014</year>
          , pp.
          <fpage>490</fpage>
          -
          <lpage>498</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Fang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <article-title>Resolving uncontrollable conditional temporal problems using continuous relaxations</article-title>
          ,
          <source>in: ICAPS '14</source>
          ,
          <string-name>
            <surname>AAAI</surname>
          </string-name>
          ,
          <year>2014</year>
          , pp.
          <fpage>341</fpage>
          -
          <lpage>349</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zavatteri</surname>
          </string-name>
          ,
          <article-title>Conditional simple temporal networks with uncertainty and decisions</article-title>
          ,
          <source>in: TIME</source>
          <year>2017</year>
          ,
          <article-title>Schloss Dagstuhl-Leibniz-Zentrum fuer</article-title>
          <string-name>
            <surname>Informatik</surname>
          </string-name>
          ,
          <year>2017</year>
          , pp.
          <volume>23</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>23</lpage>
          :
          <fpage>17</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zavatteri</surname>
          </string-name>
          , L. Viganò,
          <article-title>Conditional simple temporal networks with uncertainty and decisions</article-title>
          ,
          <source>Theoretical Computer Science</source>
          <volume>797</volume>
          (
          <year>2019</year>
          )
          <fpage>77</fpage>
          -
          <lpage>101</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zavatteri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rizzi</surname>
          </string-name>
          , T. Villa,
          <article-title>Dynamic controllability of temporal networks with instantaneous reaction</article-title>
          ,
          <source>Information Sciences</source>
          (
          <year>2022</year>
          ). doi:https://doi.org/10.1016/j.ins.
          <year>2022</year>
          .
          <volume>08</volume>
          .099.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Ramadge</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. M.</given-names>
            <surname>Wonham</surname>
          </string-name>
          ,
          <article-title>Supervisory control of a class of discrete event processes</article-title>
          ,
          <source>SIAM Journal on Control and Optimization</source>
          <volume>25</volume>
          (
          <year>1987</year>
          )
          <fpage>206</fpage>
          -
          <lpage>230</lpage>
          . doi:
          <volume>10</volume>
          .1137/0325013.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>C.</given-names>
            <surname>Ma</surname>
          </string-name>
          , W. M.
          <article-title>Wonham, Nonblocking supervisory control of state tree structures</article-title>
          ,
          <source>IEEE Transactions on Automatic Control</source>
          <volume>51</volume>
          (
          <year>2006</year>
          )
          <fpage>782</fpage>
          -
          <lpage>793</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>L.</given-names>
            <surname>Ouedraogo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Malik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Akesson</surname>
          </string-name>
          ,
          <article-title>Nonblocking and safe control of discreteevent systems modeled as extended finite automata</article-title>
          ,
          <source>IEEE Transactions on Automation Science and Engineering</source>
          <volume>8</volume>
          (
          <year>2011</year>
          )
          <fpage>560</fpage>
          -
          <lpage>569</lpage>
          . doi:
          <volume>10</volume>
          .1109/TASE.
          <year>2011</year>
          .
          <volume>2124457</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>