Keywords

1 Introduction

Motivation. Emergency call centers exhibit complex synchronization and concurrency phenomena. Various types of calls induce diverse chains of actions, including reception of the call, instruction by experts, dispatch of emergency means and monitoring of operations in progress. The processing of calls is subject to priority rules, making sure that the requests evaluated as the most urgent are treated first. The present work originates from a specific case study, concerning the performance evaluation of the medical emergency call centers in Paris and its inner suburbs, operated by four Services d’aide médicale urgente (SAMU) of Assistance Publique – Hôpitaux de Paris (APHP). One needs to evaluate performance indicators, like the throughput (number of calls of different types that can be processed without delay). One also needs to optimize the resources (e.g., personnel of different kinds) to guarantee a prescribed quality of service for a given inflow of calls.

Table 1. Correspondence between Petri nets and semi-Markov decision processes

Contribution. We develop a general method for the analysis of the timed behavior of Petri nets, based on a representation by piecewise linear dynamical systems. These systems govern counter functions, which yield the number of firings of transitions as a function of time. We allow routings based either on preselection or priority rules. Preselection applies to situations in which certain attributes of a token determine the path it follows, e.g. different types of calls require more or less complex treatments. Moreover, priority rules are used to allocate resources. We study a fluid relaxation of the model, in which the numbers of firings can take real values. Supposing the absence of priority routing, we establish a correspondence between timed Petri nets and semi-Markov decision processes. Table 1 provides the details of this correspondence that we shall discuss in the paper. Then, we apply methods from the theory of semi-Markov decision processes to analyze timed Petri nets. We show that the counter variables converge to a periodic orbit (modulo additive constants). Moreover, the throughput can be computed in polynomial time, by looking for affine stationary regimes and exploiting linear programming formulations. We also show that the throughput is given as a function of the resources (initial marking), by an explicit concave piecewise affine map. The cells on which this map is affine yield a polyhedral complex, representing the different “congestion phases”. We finally discuss the extension of these analytic results to the case with priorities. The dynamics still has the form of a semi-Markov type Bellman equation, but with negative probabilities. Hence, the theoretical tools used to show the convergence to a periodic orbit do not apply anymore. However, we can still look for the affine stationary regimes, which turn out to be the points of a tropical variety. From this, we still obtain a phase diagram, representing all the possible throughputs of stationary regimes. Throughout the paper, these results are illustrated by the case study of emergency call centers. The final section focuses on the analysis of a policy proposed by the SAMU, involving a monitored reservoir.

Related Work. Our approach originates from the max-plus modeling of timed discrete event systems, introduced by Cohen, Quadrat and Viot and further investigated by Baccelli and Olsder and a number of authors. We refer the reader to the monographs [3, 10] and to the survey of Komenda, Lahaye, Boimond and van den Boom [11]. The max-plus approach was originally developed for timed event graphs. Cohen, Gaubert and Quadrat extended it to fluid Petri nets with preselection routing [5, 6]. Gaujal and Giua established in [9] further results on the model of [5, 6]. Their results include a characterization of the throughput as the optimal solution of linear program. Recalde and Silva [14] obtained linear programming formulations for a different fluid model.

By comparison with [5, 6, 9], we use more powerful results on semi-Markov decision processes and nonexpansive mappings. This allows us, in particular, to deduce more precise asymptotic results, concerning the deviation \(z(t)-\rho t\) between the counter function z at time t and its average growth \(\rho t\), instead of the mere existence of the limit \(\lim _{t\rightarrow +\infty } z(t)/t=\rho \). We also establish the existence of the latter limit even in the case of irrational holding times. The present work is a follow-up of [2], in which Bœuf and two of the authors established an equivalence between timed Petri nets with priorities and a class of piecewise-linear models.

The present methods are complementary to probabilistic approaches [12]. Priority rules put our systems outside the classes of exactly solvable probabilistic models; only scaling limit type results on suitably purified models are known [4]. In contrast, fluid models allow one to compute analytically phase portraits. They lead to lower bounds of dimensioning which are accurate when the arrivals do not fluctuate, and which can subsequently be confronted with results of simulation.

2 Piecewise Affine Models of Timed Petri Nets

2.1 Preliminaries on Timed Petri Nets

A timed Petri net is given by a bipartite graph whose vertices are either places or transitions. We denote by \(\mathcal {P}\) (resp. \(\mathcal {Q}\)) the finite set of places (resp. transitions). For two vertices x and y forming a place-transition pair, x is said to be an upstream (resp. downstream) vertex of y if there is an arc of the graph going from x to y (resp. from y to x). The set of upstream (resp. downstream) vertices of x is denoted by \(x^{\text {in}}\) (resp. \(x^{\text {out}}\)).

Every place p is equipped with an initial marking \(m_p \in \mathbb {N}\), representing the number of tokens initially present in the place before starting the execution of the Petri net. The place p is also equipped with a holding time \(\tau _p \in \mathbb {R}_{\geqslant 0}\), so that a token entering p must sojourn in this place at least for a time \(\tau _p\) before becoming available for firing a downstream transition. In contrast, firing a transition is instantaneous. Every arc from a place p to a transition q (resp. from a transition q to a place p) is equipped with a positive and integer weight denoted by \(\alpha _{qp}\) (resp. \(\alpha _{pq}\)). Transition q can be fired only if each upstream place p contains \(\alpha _{qp}\) tokens. In this case, one firing of the transition q consumes \(\alpha _{qp}\) tokens in each upstream place p, and creates \(\alpha _{p'q}\) in each downstream place \(p'\). Unless specified, the weights are set to 1. The same transition can be fired as many times as necessary, as long as tokens in the upstream places are available. We shall assume that transitions are fired as soon as possible. By convention, the tokens of the initial marking are all available when the execution starts.

When a place has several downstream transitions, we must provide a routing rule specifying which transition is to be fired once a token is available. We distinguish two sets of rules: priority and preselection.

A priority routing on a place p is specified by a total order \(\preccurlyeq _p\) over the downstream transitions of p. The principle of this routing rule is that a transition \(q \in p^{\text {out}}\) is fired only if there is no other fireable transition \(q' \in p^{\text {out}}\) with a higher priority, i.e. \(q' \preccurlyeq _p q\). We represent the ordering of downstream transitions by a variable number of tips, like in Fig. 1, with the convention that the highest priority transition is the one pointed by the highest number of tips.

Fig. 1.
figure 1

Priority routing

Priority routing will be used in our model of monitored reservoir studied in Sect. 5. We denote by \(\mathcal {Q}_\textsf {prio}\) the subset of \(\mathcal {Q}\) consisting of the downstream transitions of places subject to priority routing. We allow transitions in \(\mathcal {Q}_\textsf {prio}\) to admit multiple upstream places ruled by priority routings as long as the following compatibility condition is met.

Definition 1

Let \(\mathcal {P}_\textsf {prio}\) denote the set of places subject to priority routing. We say that the rules \((\preccurlyeq _p)_{p \in \mathcal {P}_\textsf {prio}}\) are compatible if their union (as binary relations) is acyclic.

Acyclicity amounts to the extension of a linear extension of the partial orders \((\preccurlyeq _p)_{p \in \mathcal {P}_\textsf {prio}}\). In consequence, our setting is equivalent to fixing a priority order over the set of all transitions.

The preselection routing on a place p is described by a partition \((m_{qp})_{q\in p^{\text {out}}}\) of the initial marking and a collection of maps \((\varPi ^p_q)_{q\in p^{\text {out}}}\) satisfying the following properties:

$$\begin{aligned} \sum _{q\in p^{\text {out}}}m_{qp}=m_p \, , \;\; \text {and}\quad \forall n\in \mathbb {N}\, , \; \sum _{q\in p^{\text {out}}} \varPi ^p_q(n) = n \, . \end{aligned}$$

For \(q\in p^{\text {out}}\), \(m_{qp}\) and \(\varPi ^p_q(n)\) represent the number of tokens, amongst the initial marking \(m_p\) and the n first tokens to enter place p, which are reserved to fire transition q. In other words, they cannot be used to fire any other transition of \(p^{\text {out}}\). A natural example of preselection routing is the proportional periodic routing: if \(p^{\text {out}}=\{q_1,q_2,\dots ,q_k\}\), consider a positive integer L, a partition \((J_1,J_2,\dots ,J_k)\) of \(\{1,2,\dots ,L\}\) and define \(\varPi ^p_{q_k}(n) = \mathrm {card}(\{1,2,\dots ,n\}\cap (J_k+L\mathbb {N}))\). For large values of n, we have \(\varPi ^p_{q_k}(n)\sim n\cdot \mathrm {card}(J_k)/L\).

In order to simplify the presentation of our following dynamical model, we assume that preselection routing is only allowed for places whose downstream transitions do not admit other upstream places. The general case can be reduced to this one by introducing extra places with holding time 0, as illustrated on Fig. 2.

Fig. 2.
figure 2

Compact notation for preselection routing in case of multiple upstream places

Fig. 3.
figure 3

A synchronization pattern

We denote by \(\mathcal {Q}_\textsf {psel}\) the subset of \(\mathcal {Q}\) consisting of the downstream transitions of places ruled by preselection routing. By construction, we have \(\mathcal {Q}_\textsf {psel}\cap \mathcal {Q}_\textsf {prio}\ne \varnothing \). We define , i.e. the set of transitions with no upstream place ruled by split or priority routing. As a result, we have a partition of \(\mathcal {Q}\) into \(\mathcal {Q}_\textsf {prio}\), \(\mathcal {Q}_\textsf {psel}\), and \(\mathcal {Q}_\textsf {sync}\). Transitions of \(\mathcal {Q}_\textsf {sync}\) correspond to a synchronization pattern between several upstream places, as illustrated in Fig. 3. We point out that transitions with one upstream place can be of any of the three kind \(\mathcal {Q}_\textsf {prio}\), \(\mathcal {Q}_\textsf {psel}\), and \(\mathcal {Q}_\textsf {sync}\). The choice of their classification does not affect the analysis developed below.

Remark 1

Contrary to the preselection routing, the priority routing is essentially non-monotone. Indeed, a “young” token might activate some prioritized transition before some other “older” token activates a non-prioritized transition.

2.2 Dynamic Equations Governing Counter Functions

We associate with every transition \(q\in \mathcal {Q}\) a counter function \(z_q\) from \(\mathbb {R}\) to \(\mathbb {R}_{\geqslant 0}\) such that \(z_q(t)\) represents the number of firings of transition q that occurred up to time t included. Similarly, given a place \(p\in \mathcal {P}\), we denote by \(x_p(t)\) the number of tokens that have entered place p up to time t included, taking into account the tokens initially present in p. By construction, \(x_p\) and \(z_q\) are non-decreasing càdlàg functions. Given a càdlàg function f, we denote by \(f(t^-)\) the left limit at the point t, possibly smaller than f(t).

For each place \(p\in \mathcal {P}\), \(x_p(t)\) is given by the sum of the initial marking \(m_p\) and the number of firings of transitions \(q\in p^{\text {in}}\) weighted by \(\alpha _{pq}\) (recall that one firing of transition q outputs \(\alpha _{pq}\) tokens in p):

$$\begin{aligned} \forall p\in \mathcal {P}, \quad x_p(t) = m_p + \sum _{q\in p^{\text {in}}} \alpha _{pq} \, z_q(t). \end{aligned}$$
(P1)

For each transition \(q\in \mathcal {Q}\), the equation satisfied by \(z_q\) depends on the routing policy of its upstream places. Suppose \(q\in \mathcal {Q}_\textsf {sync}\), so that its upstream places only admit q for downstream transition. Since transitions are fired as early as possible and must wait for all upstream tokens to be available, we have:

$$\begin{aligned} z_q(t) = \min _{p\in q^{\text {in}}}\; \bigg \lfloor \alpha _{qp}^{-1} x_p(t-\tau _p)\bigg \rfloor . \end{aligned}$$
(P2)

where \(\lfloor \cdot \rfloor \) denotes the floor function (recall that \(z_q\) must be integer). Suppose now that \(q\in \mathcal {Q}_\textsf {psel}\). Because q admits only one upstream place p, we also have:

$$\begin{aligned} \quad z_q(t) = \bigg \lfloor \alpha _{qp}^{-1} \bigg (m_{qp}+\varPi ^p_q(x_p(t-\tau _p))\bigg )\bigg \rfloor . \end{aligned}$$
(P3)

Finally, suppose that \(q\in \mathcal {Q}_\textsf {prio}\). We have

$$\begin{aligned} z_q(t) = \min _{p\in q^{\text {in}}} \bigg \lfloor \alpha _{qp}^{-1}\bigg ( x_p(t-\tau _p) - \sum _{q' \mathrel {\prec _p}\, q}\alpha _{q'p}z_{q'}(t) - \sum _{q' \mathrel {\succ _p}\, q}\alpha _{q'p}z_{q'}(t^-) \bigg ) \bigg \rfloor . \end{aligned}$$
(P4)

This equation can be interpreted by examining \(z_q(t)-z_q(t^-)\), which represents the number of tokens fired by q at time t. The amount of tokens available in place \(p\in q^{\text {in}}\) at time \(t^-\) is \(x_p(t-\tau _p)-\sum _{q'\in p^{\text {out}}}\alpha _{q'p}z_{q'}(t^-)\). However, transitions with higher priority than q relatively to p fire \(\sum _{q'\prec _p\, q}\alpha _{q'p}(z_{q'}(t)-z_{q'}(t^-))\) of these tokens, leaving \(x_p(t-\tau _p) - \sum _{q' \mathrel {\prec _p}\, q}\alpha _{q'p}z_{q'}(t) - \sum _{q' \mathrel {\succcurlyeq _p}\, q}\alpha _{q'p}z_{q'}(t^-)\) available to fire q. Equation (P4) is obtained by packing these tokens in an integer number of groups of \(\alpha _{qp}\) and taking the minimum of such terms over \(q^{\text {in}}\).

The correspondence between the semantics of timed Petri net (expressed in terms of a transition system acting over states corresponding to timed markings) and the equations above has been proved in [2] in a more restricted model. It carries over to the current setting, allowing multiple levels of priority, preselection routings, and arcs with valuations.

It will be convenient to consider the continuous relaxation of the previous dynamics. This boils down to considering infinitely divisible tokens and real-valued counters functions. The weights \(\alpha _{pq}\) or \(\alpha _{qp}\) can now be allowed to take positive real values. The priority and preselection routing rules are not affected by the fluid approximation, though in what follows we choose to focus only on proportional preselection routing: if a place p is ruled by preselection, we fix a stochastic vector \((\pi _{qp})_{q\in p^{\text {out}}}\) such that \(m_{qp} = \pi _{qp}m_p\) and \(\varPi ^p_q(x) = \pi _{qp} x\). Equivalently, this corresponds to the continuous relaxation of a stochastic routing at place p, in which \(\pi _{qp}\) is the probability for a token to be routed to transition q. Finally, the continuous relaxation drops the floor functions. This leads to the dynamical system presented in Table 2, governing the counter functions \(z_q\) of the transitions.

Table 2. Dynamic equations followed by transitions counter functions

In order to prevent an infinite number of firings from occurring in a finite amount of time, we shall work with Petri nets whose underlying directed graph does not contain any circuit in which places have zero holding times. Such Petri nets are said to be non-Zeno.

Lemma 1

Suppose that a Petri net is non-Zeno, and let T denote the maximum of the holding times of its different places. Then, the transition counter function \(z : [-T,\infty ) \rightarrow \mathbb {R}^\mathcal {Q}\), which follows the dynamics shown in Table 2, is uniquely determined by its restriction to the interval \([-T,0]\).

Proof (sketch)

We can reduce to the case where the right-hand sides of the dynamic equations only involve counter-variables \(z_{q'}(t - \tau _p)\) for which \(\tau _p\) is positive. We obtain this reduction obtained by successive substitutions of the counter-variables \(z_{q'}(t - \tau _p)\) such that \(\tau _p = 0\). The non-Zeno assumption guarantees that finitely many substitutions are enough. Defining , Lemma 1 can then be proved for all \(t \in {[-T, n\tau ^*)}\) by induction on \(n \geqslant 0\).    \(\square \)

3 Models of Medical Emergency Call Centers

We next present two models based on an ongoing collaboration with the Emergency Medical Services (EMS) of Paris and its inner suburbs (SAMU 75, 92, 93, and 94 of APHP). In France, the nation-wide phone number 15 is dedicated to medical distress calls, dispatched to regional call-centers. The calls are first answered by an operator referred to as a medical regulation assistant (MRA), who categorizes the request, takes note of essential personal information and transfers the call to one of the following two types of physicians, depending on the estimated severity of the case:

  1. (i)

    an emergency doctor, able to dispatch Mobile Intensive Care Units or first-responding ambulances and to swiftly send the patient to the most appropriate hospital unit;

  2. (ii)

    a general practitioner, who can dispatch ambulances and provide medical advice.

An MRA may also handle the call without transferring it if a conversation with a physician is not needed (report from a medical partner, dial error, etc.).

In case (i), the MRA must wait for an emergency physician to be available before transferring the call, in order to report the details of the request. In this way, the patient is constantly kept on line with an interlocutor. In case (ii), patients are left on hold, and dealt with by general practitioners who answer the calls in the order of arrival. As a first step, our main focus is the coupling between the answering operator and the emergency physician (which is a critical link of the system). Thus, for the sake of simplicity, we do not take into account what happens to calls in case (ii) after the MRA is released. In other words, we consider a simplified model in which only two types of inbound calls can occur: the ones which require the MRA to wait for an emergency physician and the ones which do not. We shall also consider that the patients do not leave the system before their call is picked up (infinite patience assumption).

Fig. 4.
figure 4

A basic model of emergency call center (EMS-A)

We represent this emergency call-center by the (EMS-A) Petri net. Inbound calls arrive via the uppermost transition \(z_0\). We may assume in what follows that \(z_0(t)=\lambda t\) (arrivals at constant rate \(\lambda \)). The pool of MRAs is represented by the place with initial marking \(N_A\). Transition \(z_1\) is fired as soon as an MRA is available and a call is waiting for pick-up. Preliminary examination and information filling occur in place with holding time \(\tau _1\), ruled by preselection routing: a known fraction \(\pi \) of the patients are deemed to need the help of the emergency physician; for the complementary fraction \(1 - \pi \) of the patients, the MRA is released at the firing of \(z_2\). Transition \(z_3\) is fired once a doctor is available from the pool of emergency physicians with initial marking \(N_P\) and an MRA waits for transfer. Summarizing the case takes a time \(\tau _2\) for both agents, then the firing of \(z_4\) releases the MRA and the physician proceeds to the medical consultation with the patient for a time \(\tau _3\) before getting released by the firing of \(z_5\). We use the color blue (resp. red) to highlight the circuits involving the MRA (resp. the emergency doctor). For the sake of readability, patient exits at transitions \(z_2\) and \(z_5\) are not depicted.

Applying the equations of the continuous relaxation of a timed Petri net recorded in Table 2, we obtain the following system of equations for the counter functions associated with transitions, where \(x \wedge y\) stands for \(\min (x,y)\).

$$\begin{aligned}\left\{ \begin{array}{rcrcl} z_1(t) &{} = &{} z_0(t)\;\;\;\;\; &{} \wedge &{} \big (N_{A} + z_2(t) + z_4(t)\big )\\[1ex] z_2(t) &{} = &{} (1-\pi )z_1(t-\tau _1) &{} &{}\\[1ex] z_3(t) &{} = &{} \pi z_1(t-\tau _1) &{}\wedge &{} \big (N_{P} + z_5(t)\big )\\[1ex] z_4(t) &{} = &{} z_3(t-\tau _2) &{} &{}\\[1ex] z_5(t) &{} = &{} z_4(t-\tau _3)&{} &{} \end{array}\right. \end{aligned}$$
(EMS-A)

As we shall see in Sect. 4, a slowdown arising either in the MRAs circuit or in the physicians circuit causes a slowdown of the whole system, owing to the synchronization step. To address this issue and still maintain the presence of an interlocutor with the patient and the brief oral summary told to physician, emergency doctors from the SAMU proposed to consider another model. One may create a new type of MRA, the reservoir assistant, who after a brief discussion with the MRA having answered the call, places the patient in a monitored reservoir. The answering MRA is released to pick-up other inbound calls. When an emergency physician becomes available, the reservoir assistant passes on the short briefing to the doctor and transfers the patient. While the queue of patients in the reservoir is non-empty, the reservoir assistant checks on the patients in the reservoir, and can call patients back in case they hung up. This replaces the synchronization between the physician and the answering MRA, enabling the first level MRAs to pick-up new calls more quickly. Another advantage of the reservoir mechanism is that a single reservoir assistant, having a consolidated vision of all the patients waiting for emergency physicians, can revise in real time their priority level if more severe cases arrive, whereas in the previous system the emergency physician may have had to ask each of the waiting MRAs.

Fig. 5.
figure 5

Medical emergency call center with a monitored reservoir (EMS-B) (Color figure online)

The model (EMS-B), whose dynamics shall be introduced and studied in Sect. 5, implements these modifications; see Fig. 5. The reservoir assistant pool is a new place with initial marking \(N_R\) (not necessarily equal to 1). Reservoir assistants receive patients from the answering MRAs at transition \(z_3\) and pass them to physicians at transitions \(z_5\) and \(z_5'\), depending on the severity of the case. We denote by \(\alpha \) the proportion of very urgent calls among patients who need to talk to an emergency physician. In case of conflict, reservoir assistants must first pass the calls already in the reservoir before placing other calls in, and should first handle very urgent calls. Release of the reservoir assistants happen at transitions \(z_4\), \(z_6\) and \(z_6'\). Consultations with a physician take a time \(\tau _3\) after which transitions \(z_7\) and \(z_7'\) can be fired. The circuits involving the reservoir assistant are depicted with color orange. It can be verified that the places standing for the pool of reservoir assistants and physicians have compatible priority rules.

4 Correspondence Between Fluid Petri Nets and Semi-Markov Decision Processes

4.1 Finite Horizon Problem

We next establish a correspondence between the Petri net dynamics and the Bellman equation of a semi-Markov decision process. Recall that Markov Decision Processes (MDPs) form a class of one-player games, in which one evolves through states by choosing actions at discrete time instants, which determine some costs. Semi-Markov Decision Processes (SMDPs, or Markov renewal programs) allow the time to take real values, while the state space remains discrete: between two successive moves, a holding time attached to states and actions must elapse. We refer for instance to [13, 19] for background.

The finite set of states is denoted by S, and for all \(i\in S\) the finite set of playable actions from state i is denoted by \(A_i\). We denote . As a result of playing action a from state i, the player incurs a cost \(r^a_i\), is held in the state i for a non-negative time \(t_i^a\), and finally goes to state \(j\in S\) with probability \(P^a_{ij}\) (it is assumed that \(\sum _{j\in S}P^a_{ij}=1\) for all \(i\in S\) and \(a\in A_i\)). Moreover, future costs are multiplied by a discount factor \(\gamma ^{a}_i\geqslant 0\). Given an initial state i and an horizon t, the value v(it) is defined as the minimal expected cost incurred in horizon t. By convention, \(v(\cdot ,t)=0\) when \(t<0\). Its formal definition in terms of nonanticipative strategies can be found in [13]. The value function satisfies the following Bellman-type dynamic programming equation (see for instance [19, §2, p. 800]):

$$\begin{aligned} v(i,t) = \inf _{a\in A_i} \bigg \{ r^{a}_i + \gamma ^{a}_i\sum _{j\in S} P^{a}_{ij}\,v(j, t-t^{a}_i) \bigg \} \, . \end{aligned}$$
(1)

Correspondence Theorem 1

Consider a timed Petri net with no priority rules. Then, its dynamics is equivalent to the dynamic programming equation of a semi-Markov decision process with controlled discount factors.

Proof

We extend the definition of proportions \(\pi _{qp}\) by letting \(\pi _{qp}=1\) if \(q\in \mathcal {Q}_\textsf {sync}\) and \(p\in q^{\text {in}}\). Similarly, we set the weights \(\alpha _{qp}\) (resp. \(\alpha _{pq}\)) to 0 if \(p \notin q^{\text {in}}\) (resp. \(q \notin p^{\text {in}}\)). For all \(q,q'\in \mathcal {Q}\) and \(p\in \mathcal {P}\), we set

By definition, for \(q\in \mathcal {Q}\) and \(p\in q^{\text {in}}\), the nonnegative numbers \((\tilde{\beta }^p_{qq'})_{q'\in \mathcal {Q}}\) are not all zero. We let and \(\beta ^p_{qq'} = \tilde{\beta }^p_{qq'}/\kappa ^p_q\) so that \((\beta ^p_{qq'})_{q'\in \mathcal {Q}}\) is a probability vector. The dynamics summarized in Table 2 can then be written as

$$\begin{aligned} \forall q\in \mathcal {Q}\quad z_q(t) = \min _{p\in q^{\text {in}}} \bigg \{ c^p_q + \kappa ^p_q \sum _{q'\in \mathcal {Q}}\beta ^p_{qq'} z_{q'}(t-\tau _p) \bigg \} \end{aligned}$$
(2)

where we recognize the finite-horizon Bellman’s equation of a discounted semi-Markovian decision process expressed in Eq. (1).    \(\square \)

As we announced in Table 1, the states of the SMDP built in the proof corresponds to the transitions of the Petri net, and in each state \(q\in \mathcal {Q}\) of the SMDP, the admissible actions are the upstream places \(p\in q^{\text {in}}\). After playing action p from state q, the player incurs a cost \(c^p_q = \pi _{qp}\alpha _{qp}^{-1} m_p\) and a discount factor \(\kappa ^p_q = \sum _{q' \in p^{\text {in}}} \pi _{qp}\alpha _{qp}^{-1} \alpha _{pq'}\). Then, the player is held for time \(\tau _p\), before moving to one of the states \(q'\in p^{\text {in}}\) with probability \(\beta ^p_{qq'} = \pi _{qp}\alpha _{qp}^{-1} \alpha _{pq'} / \kappa ^p_q\). In other words, the physical time of timed Petri nets is the backward time (time remaining to live) in semi-Markov decision processes.

In what follows, we shall interpret the other correspondences between these two families of models provided in Table 1.

4.2 Stationary Regimes and Average Cost Problem

We are interested in the long-run time behavior of Petri nets. For this purpose, we introduce a notion of affine stationary regime.

Definition 2

We say that a trajectory z (counter functions of the transitions) of the Petri net is an affine stationary regime if there exists two vectors \(\rho \in (\mathbb {R}_{\geqslant 0})^{\mathcal {Q}}\) and \(u\in \mathbb {R}^{\mathcal {Q}}\) such that for all \(t\geqslant -T\), \(z(t) = \rho t + u\).

The next proposition shows that, up to a shift in time, affine stationary regimes are characterized by a lexicographic system.

Proposition 1

Given \(\rho \in (\mathbb {R}_{\geqslant 0})^{\mathcal {Q}}\) and \(u\in \mathbb {R}^{\mathcal {Q}}\), there exists a nonnegative number \(t_0\) such that is a stationary regime if and only if

$$\begin{aligned} \rho _q&= \min _{p\in q^{\text {in}}}\Big \{ \kappa _q^p\sum _{q'\in \mathcal {Q}} \beta _{qq'}^p\, \rho _{q'}\Big \} \end{aligned}$$
(L1)
$$\begin{aligned} u_q&= \min _{p\in q^{\text {in}}_{*}}\Big \{ c^p_q + \kappa _q^p\sum _{q'\in \mathcal {Q}} \beta _{qq'}^p (u_{q'}-\rho _{q'}\tau _p ) \Big \} \end{aligned}$$
(L2)

where \(q^{\text {in}}_{*}\) is the subset of \(q^{\text {in}}\) where the minimum is achieved in (L1).

These equations are obtained by substituting \(z(t)=\rho (t+t_0) + u\) in (2) and letting t tend to infinity.

There is a convenient and more abstract way to write this lexicographic system using germs of affine functions. A germ at infinity of a function f is an equivalence class for the relation which identifies two functions that coincide for sufficiently large values of their argument. The tuple \((\rho ,u)\in \mathbb {R}^2\) will represent the germ of the affine function \(t \mapsto \rho t +u\). The pointwise order on functions induces a total order on germs of affine functions, which coincides with the lexicographic order on the coordinates \((\rho ,u)\), the \(\rho \) coordinate being considered first. We complete \(\mathbb {R}^2\) by introducing a greatest element \(\top \) with respect to the lexicographic minimum. Then, \(\mathbb {G}:=\mathbb {R}^2\cup \{\top \}\) equipped with the operations \(\min ^{\textsc {lex}}\) and \(+\) is a semifield (by convention, for all \(g\in \mathbb {G}\), \(g+\top =\top +g=\top \)). The multiplicative group \(\mathbb {R}_{>0}\) acts on \(\mathbb {G}\) by setting \(a(\rho ,u):=(a\rho ,au)\), for \(a>0\) and \((\rho ,u)\in \mathbb {R}^2\), and \(a\top = \top \). If \((\rho , u)\) is the germ of f, it is immediate to see that \((\rho , u - \rho \tau )\) is the germ of \(t\mapsto f(t-\tau )\). The system (L1)–(L2) then becomes

$$\begin{aligned} \forall q\in \mathcal {Q}\quad (\rho _q,u_q) = \underset{p\in q^{\text {in}}}{\min {}^{\textsc {lex}}}\Big ((0, c^p_q) + \kappa _q^p\sum _{q'\in \mathcal {Q}}\beta _{qq'}^p(\rho _{q'},u_{q'}-\rho _{q'}\tau _p)\Big ) \end{aligned}$$
(L)

In order to prove the existence of a stationary regime, we shall need the existence of a stoichiometric invariant:

Definition 3

We say a vector \((e_q)_{q\in \mathcal {Q}}\) is a stoichiometric invariant of the Petri net whose dynamics is given by (2) if

$$\begin{aligned} \forall q\in \mathcal {Q}, \quad \forall p\in q^{\text {in}}, \qquad e_q = \kappa _q^p \sum _{q'\in \mathcal {Q}}\beta ^p_{qq'}\,e_{q'}\,. \end{aligned}$$
(3)

As an illustration, it can be checked that \((1,1,1-\pi ,\pi ,\pi ,\pi )\) is a stoichiometric invariant of our model (EMS-A), with transitions indices in \(\{0,\dots ,5\}\).

In the rest of the section, the following assumption is made:

Assumption A

The Petri net is non-Zeno, has no priority rules and admits a positive stoichiometric invariant e.

Correspondence Theorem 2

Under Assumption A, the dynamics of the timed Petri net is equivalent to the dynamic programming equation of an undiscounted semi-Markov decision process.

Fig. 6.
figure 6

The SMDP corresponding to the Petri net (EMS-A).

To see this, it suffices to observe that the transformed counters \(\tilde{z}_q = z_q/e_q\) follow an equation of type (1), with \(P_{qq'}^p:=e_{q}^{-1}\kappa _q^p\beta _{qq'}^p e_{q'}\) and \(\gamma _q^p = 1\), thanks to (3). We illustrate on Fig. 6 the construction of the undiscounted SMDP corresponding to the Petri net (EMS-A). Actions (depicted by squares) are labeled by pairs consisting of the associated cost and holding time, and probabilities are given along the arcs from actions to states (when non equal to 1). As we discussed after the proof of Correspondence Theorem 1, places and transitions of the Petri net are respectively mapped to the states and actions of the SMDP. The orientation of the arcs are flipped, and the time goes backward. For every state \(q \in \mathcal {Q}\), the holding time of the action \(p \in q^{\text {in}}\) is \(\tau _p\). Moreover, since all the arc weights in (EMS-A) are 0 or 1, the reward \(r_p^q\) reduces to \(m_p / e_q\), which corresponds to a renormalization of the initial marking of the place p by the stoichiometric coefficient of the transition q.

Exploiting Correspondence Theorem 2, we arrive at our first main result.

Theorem 3

Under Assumption A,

  1. (i)

    there exists an affine stationary regime, i.e. \((\rho ,u)\in (\mathbb {R}_{\geqslant 0})^{\mathcal {Q}}\times \mathbb {R}^{\mathcal {Q}}\) such that, initializing the dynamics with \(z(t)=\rho t+u\) for \(t\in [-T,0]\), we end up with \(z(t)=\rho t+u\) for all \(t\geqslant 0\).

  2. (ii)

    the vector \(\rho \) in (i) is universal, i.e., for any initial condition, the solution z(t) of the dynamics satisfies

    $$ z(t) \underset{t\rightarrow \infty }{=} \rho t + O(1).$$

Theorem 3 relies on the equivalence with the undiscounted problem (Correspondence Theorem 2). Indeed, the term \(\rho _q/e_q\) can be interpreted as the optimal average cost per time unit of the associated undiscounted semi-Markov decision process. We refer to [8, 15, 16] for background on the average cost problem. Then, the lexicographic system (L1)–(L2) is equivalent to the optimality equation of the average cost problem. It is also known in the framework of undiscounted SMDPs that the optimal average cost is achieved by (stationary) policies. The existence of a solution to the optimality equations follows (constructively) from the termination of Howard’s multichain policy iteration algorithm, proved by Denardo and Fox [8]. Finally, the universality result is proved by using the nonexpansiveness of the evolution semigroup of the time-delay system (2) with respect to an appropriate weighted sup-norm.

This prompts us to introduce policies on Petri nets: a map \(\sigma :\mathcal {Q}\rightarrow \mathcal {P}\) is a policy if for all \(q\in \mathcal {Q}\), \(\sigma (q)\in q^{\text {in}}\). Given a policy \(\sigma \) and a stoichiometric invariant e, the \(|\mathcal {Q}|\times |\mathcal {Q}|\) matrix \(P^{\sigma }\) with entries \((e_q^{-1}\kappa _q^{\sigma (q)}\beta ^{\sigma (q)}_{qq'}e_{q'})_{q,q'\in \mathcal {Q}}\) is a probability matrix whose final classes are denoted by \(\mathcal {F}(\sigma )\). We denote by \(\mu _F^{\sigma }\) the unique invariant measure supported by the class \(F\in \mathcal {F}\), and by \(\phi ^{\sigma }_{F,q}\) the probability of reaching F by applying policy \(\sigma \) starting from state q. The vectors \(m^{\sigma }\) (resp. \(\tau ^{\sigma }\)) stand for \((m_{\sigma (q)})_{q\in \mathcal {Q}}\) and \((\tau _{\sigma (q)})_{q\in \mathcal {Q}}\) and we finally define the diagonal matrix . The fact that the average cost is achieved by stationary policies leads to the following explicit formula for the throughput.

Corollary 1 (Average cost complex)

Under Assumption A, the throughput vector \(\rho \) is given by

$$\begin{aligned} \forall q\in \mathcal {Q}, \quad \rho _q = e_q\,\min _{\sigma } \sum _{F\in \mathcal {F}(\sigma )} \phi _{F,q}^{\sigma } \frac{\langle \mu _F^{\sigma }, D^{\sigma }m^{\sigma }\rangle }{\langle \mu _F^{\sigma }, \tau ^{\sigma } \rangle }, \end{aligned}$$
(4)

where the minimum is taken over all the policies.

This formula shows that the throughput \(\rho _q\) of the transition q is a concave piecewise affine function of the initial marking vector \(m\in \mathbb {R}^{\mathcal {P}}\). As is customary in tropical geometry, we associate to this map a polyhedral complex (recall that a collection \(\mathcal {L}\) of polyhedra is a polyhedral complex if for all \(L\in \mathcal {L}\), any face F of L is also in \(\mathcal {L}\) and for \(L_1,L_2\in \mathcal {L}\), the polyhedron \(L_1\cap L_2\) is a face of both \(L_1\) and \(L_2\), see [7]). If \(\varSigma \) is a set of policies, we define the polyhedral cell \(\mathcal {C}_\varSigma \) to be the set of initial markings m such that the argument of the minimum in (4) is \(\varSigma \) (note that the cell \(\mathcal {C}_\varSigma \) may be empty for some choices of \(\varSigma \)). The space \(\mathbb {R}^\mathcal {P}\) is covered by the cells \(\mathcal {C}_\varSigma \) of maximal dimension, the latter can be interpreted as congestion phases. The policies \(\sigma \) which achieve the minimum for a given m determine bottleneck places.

We now consider the computational complexity of the problem of computing the throughput vector \(\rho \).

Corollary 2

Under Assumption A, the throughput vector \(\rho \) can be computed in polynomial time by solving the following linear program:

$$\begin{aligned} \max \sum _{q\in \mathcal {Q}} \rho _{q} \quad \text {s.t.}\quad \left\{ \begin{aligned} \rho _q&\leqslant \kappa _q^p \sum _{q'\in \mathcal {Q}} \beta ^p_{qq'}\rho _{q'},&\quad \forall q\in \mathcal {Q}, \forall p\in q^{\text {in}}\\ u_q&\leqslant c_q^p +\kappa _q^p \sum _{q'\in \mathcal {Q}} \beta ^p_{qq'}(u_{q'}-\rho _{q'}\tau _{q'}),&\quad \forall q\in \mathcal {Q}, \forall p\in q^{\text {in}}\end{aligned}\right. \end{aligned}$$

in which \(\rho , \, u\in \mathbb {R}^\mathcal {Q}\) are the variables. More precisely, if \((\rho , u)\) is any optimal solution of this program, then \(\rho \) coincides with the throughput vector.

We refer the reader to the work of Gaujal and Giua [9] for an alternative linear programming approach. The asymptotic behavior of the value function in large horizon has been extensively studied [1, 18]. As a corollary of these results, we arrive at:

Corollary 3 (Asymptotic Periodicity)

Suppose that Assumption A holds, and that the holding times are integer (so that \(T \in \mathbb {N}\)). Then, there exists an integer c, which is the order of an element of the symmetric group on nT letters, such that, for all \(0\leqslant r\le c-1\), \(z(tc+r)-\rho (tc+r)\) converges as \(t\rightarrow \infty \), for integer values of t.

Whereas the earlier results of this section hold for irrational holding times, the integrality restriction in Corollary 3 is essential.

4.3 Application to Model (EMS-A)

We illustrate the above results on our running example (EMS-A). Since \(z_1\) and \(z_3\) have two upstream places each, there are a total of four policies. Though it is possible to use (4) to determine \(\rho \), solving the lexicographic Eq. (L) turns out to be easier in practice. We also remark (for instance on Fig. 6) that \(z_2\) (resp. \(z_4\) and \(z_5\)) are always in the same recurrence class as \(z_1\) (resp. \(z_3\)), in the sense of SMDP’s chains. As a result, we shall just focus on the lexicographic optimality equation on \(\rho _1\) and \(\rho _3\):

$$ \left\{ \begin{array}{rcl} (\rho _1, u_1) &{} = &{} (\lambda ,\, 0) \wedge ((1-\pi )\rho _1+\rho _3,\, N_A+(1-\pi )(u_1-\rho _1\tau _1)+u_3-\rho _3\tau _2)\\[1ex] (\rho _3, u_3) &{} = &{} \pi (\rho _1 ,\, u_1-\rho _1\tau _1) \wedge (\rho _3,\, N_P + u_3 -\rho _3(\tau _2+\tau _3)\big )\\ \end{array}\right. $$

where \(\wedge \) now stands for the \(\min ^{\textsc {lex}}\) operation. Each policy (i.e. each choice of minimizing term in both equations) leads to a value of \(\rho _1\) and \(\rho _3\) and provides linear inequalities characterizing the associated validity domain. Eventually, we obtain \(\rho _1=\rho ^*\) and \(\rho _3=\pi \rho ^*\) with

$$\begin{aligned} \rho ^*=\min \left( \lambda \,,\,\frac{N_A}{\tau _1+\pi \tau _2},\,\frac{N_P}{\pi (\tau _2+\tau _3)}\right) \end{aligned}$$

in which we retrieve the piecewise-affine form of \(\rho \) showed in Corollary 1.

Fig. 7.
figure 7

The phase diagram of the (EMS-A) system

We interpret this result as follows: the “handling speed” \(\rho _1\) of the MRAs and \(\rho _3\) of the emergency physicians are always entangled and depend on three key dimensioning parameters: the arrival rate of inbound calls \(\lambda \), the maximum MRA throughput \(N_A/(\tau _1+\pi \tau _2)\) and the maximum physician throughput \(N_P/\pi (\tau _2+\tau _3)\). We recognize in these last two terms a number of agents divided by a characteristic cycle time. Hence, if and , we have \(\rho ^*=\lambda \) which means that all inbound calls are handled. If \(N_A\leqslant N_A^*\) and \(N_A/(\tau _1+\pi \tau _2)\leqslant N_P/\pi (\tau _2+\tau _3)\), there are too few MRAs, therefore they impose their maximum handling speed to the whole system (indeed emergency physicians wait for MRAs to pass them calls). Conversely, if \(N_P\leqslant N_P^*\) and \(N_P/\pi (\tau _2+\tau _3)\leqslant N_A/(\tau _1+\pi \tau _2)\), there are too few emergency physicians and they impose their handling speed to the whole system again (MRAs are waiting for doctors to take their calls and be released). This is illustrated by the phase diagram depicted on Fig. 7. We verify that its cells are the regions over which \(\rho ^*\) is affine (as a function of \(N_A\) and \(N_P\)).

To sum it up, there are three different possible regimes, among which only one is fluid and guarantees that all calls are answered. This analysis can lead to minimal dimensioning recommendations: for such an emergency call-center and considering that calls arrive with rate \(\lambda \), at least \(\lceil \lambda (\tau _1+\pi \tau _2)\rceil \) MRAs and \(\lceil \lambda \pi (\tau _2+\tau _3)\rceil \) emergency physicians are needed.

5 Case Study: Analysis of the Monitored Reservoir

In this section, we follow up on the analysis of the model (EMS-B) involving priority rules. Using Table 2, we can write the dynamics of the counter variable of the net. We present below a reduced system of equations where \(z_2\), \(z_4\), \(z_6\), \(z_6'\), \(z_7\) and \(z_7'\) have been substituted by expressions depending on \(z_1\), \(z_3\), \(z_5\) and \(z_5'\) only. For the sake of readability, we denote , and .

$$\begin{aligned} \begin{array}{rcrclcl} z_1(t) =&{} \quad \;\;z_0\big |^t &{}\wedge &{} \left( N_A+(1-\pi )\,z_1\big |^{t-\tau _1}+z_3\big |^{t-\tau _2}\right) &{} &{} \\ z_3(t) =&{}\qquad \;\;\! \pi \,z_1\big |^{t-\tau _1}&{} &{} &{}\wedge &{}\left( N_R+z_3\big |^{t-\tau _2}+z_5\big |_{t}^{t-\tau _2}+z_5'\big |_{t}^{t-\tau _2}\right) \\ z_5(t) =&{}\qquad \;\; \alpha z_3\big |^{t-\tau _2}&{}\wedge &{}\left( N_P+z_5\big |^{t-\tau _2-\tau _3}+z_5'\big |^{t-\tau _2-\tau _3}_{t^{-}}\right) &{}\wedge &{}\left( N_R +z_3\big |^{t-\tau _2}_ {t^{-}}+z_5\big |^{t-\tau _2}+z_5'\big |^{t-\tau _2}_{t^{-}}\right) \\ z_5'(t)=&{} (1-\alpha ) z_3\big |^{t-\tau _2}&{}\wedge &{}\left( N_P+z_5\big |^{t-\tau _2-\tau _3}_t+z_5'\big |^{t-\tau _2-\tau _3}\right) &{}\wedge &{}\left( N_R +z_3\big |^{t-\tau _2}_ {t^-}+z_5\big |^{t-\tau _2}_ t+z_5'\big |^{t-\tau _2}\right) \\ \end{array} \end{aligned}$$
(EMS-B)

If there are some priority routings, Correspondence Theorems 1 and 2 do not hold anymore: the dynamics has still the form of a Bellman equation, but the factors \(\beta _{qq'}^p\) in (2) take negative values, implying that some “probabilities” are negative. However, it is still relevant to look for affine stationary regimes, and we next show that these regimes are the solutions of a lexicographic system over germs similar to (L). To do so, we need to derive other germ equations for transitions ruled by priority routing, whose dynamics is recalled in Table 2. One needs to address how the expressions of the form \(z(t^-)\) behave when passing to germs. The problem may seem ill-posed since this value coincides with z(t) for ultimately affine functions. Nonetheless, in [2], it has been shown that the problem of looking for ultimately affine stationary regimes on the \(\delta \)-discretization of the fluid dynamics is well-posed. In this discretized model, the term \(z(t^-)\) is replaced by \(z(t- \delta )\). The detour via this discretized dynamics enables one to prove that, regardless of the choice of \(\delta \), small enough, some terms cannot achieve the minimum in the priority dynamic equations, and thus can be removed. This leads to the last equation of Table 3 and the following result.

Table 3. Dynamic equations followed by germs of transitions counter functions. When \(q\in \mathcal {Q}_\textsf {prio}\) and \(p\in q^{\text {in}}\), we denote by \(p^{\text {out}}_{\max }\) the transition of \(p^{\text {out}}\) with least priority and if \(q\ne p^{\text {out}}_{\max }\), \(\sigma _p(q)\) denotes the successor of q relatively to the order of \(p^{\text {out}}\) induced by the priority rule, i.e. the transition with highest priority after q.

Theorem 4

The ultimately affine stationary regimes \(z(t) = \rho t + u\) of the dynamics of Table 2 are solutions of the germ equations of Table 3.

Applying Theorem 4 and the equations of Table 3 to the model (EMS-B) provide the following (reduced) system on the affine germs of counter variables:

$$\begin{aligned} \begin{aligned} (\rho _1,u_1)&= (\lambda ,0) \wedge (\rho _1,N_A+(1-\pi )(u_1-\rho _1\tau _1)+u_3-\pi \rho _1\tau _2) \\ (\rho _3,u_3)&= (\pi \rho _1,\pi (u_1-\rho _1\tau _1)) \wedge (\pi \rho _1,u_3+N_R-\pi \rho _1\tau _2-(\rho _5+\rho _5')\tau _2) \\ (\rho _5,u_5)&= \left\{ \begin{aligned}(\alpha \pi \rho _1,\alpha (u_3-\pi \rho _1\tau _2))\wedge (\rho _5,u_5+N_P-\rho _5(\tau _2+\tau _3))&\quad \text {if}\quad \rho _5'=0&\\ (\alpha \pi \rho _1,\alpha (u_3-\pi \rho _1\tau _2))&\quad \text {if}\quad \rho _5'>0 \end{aligned}\right. \\ (\rho _5',u_5')&= ((1-\alpha )\pi \rho _1,(1-\alpha )(u_3-\pi \rho _1\tau _2))\wedge (\rho _5',u_5'+N_P-(\rho _5+\rho _5')(\tau _2+\tau _3))\\ \end{aligned} \end{aligned}$$

Note that the priority ruling the routing of tokens from the pool of reservoir assistants does not appear on the affine germs of \(z_5\) and \(z_5'\). This is an expected outcome since transitions \(z_5\) and \(z_5'\) (high level of priority for the reservoir pool) can only receive tokens that have passed through transition \(z_3\) (low level of priority for the reservoir pool) before, as a result \(z_5\) and \(z_5'\) cannot ultimately inhibit themselves. Such a layout of priorities does remain appropriate to perform arbitration of tokens orientation in case of conflicts but is not captured in the scope of long-run time analysis of the system.

As in Sect. 4.3, a choice of policy (i.e. a choice of minimizing terms in the lexicographic system) provides affine equalities determining the throughput and regions on which it is an affine function of the parameters of the model. This leads to nine congestion phases (maximal cells of the throughput complex) covering \((\mathbb {R}_{\geqslant 0})^3\), depicted on Fig. 9. As expected, the introduction of a new type of resource agent (the reservoir assistant) introduces more slowdown phases if its initial marking \(N_R\) is insufficient. Therefore, to ensure the good behavior of the (EMS-B) model whose design relies substantially on the reservoir, one needs to take . Note that the minimum number of MRAs (resp. emergency physicians) to answer all the calls is not affected by the presence of the reservoir by comparison with (EMS-A) model, it is still (resp. ).

Fig. 8.
figure 8

The throughput \(\rho _5'\) is not concave, although \(\rho _5\) and \(\rho _5+\rho _5'\) still are

Fig. 9.
figure 9

Congestion phases of the model (EMS-B)

From there, two qualitative advantages of this new model must be noted. First, we focus on the effect of the priority level for very urgent calls (in proportion \(\alpha \) among those passed to an emergency physician). Given an MRA throughput \(\rho _1\), define the two functions \(\underline{N}_P\) and \(\overline{N}_P\) by

A minimum number of \(\overline{N}_P\) physicians is needed to handle all the calls passed by the MRAs via the reservoir assistant. However, in case of a lack of physicians, the priority mechanism ensures that the very urgent calls remain handled as long as \(N_P\geqslant \underline{N}_P\). Below the latter threshold, there are not enough physicians to handle even these very urgent calls only. Remark that in presence of priorities, the throughput function of transitions may not be concave anymore, see for instance \(\rho _5'\) as a function of \(N_A\) and \(N_P\) in Fig. 8 (supposing \(N_R\geqslant \overline{N}_R\)). In our example though, note that in addition to \(\rho _1\) and \(\rho _3\), both \(\rho _5\) and \(\rho _5+\rho _5'\) are still concave.

Contrary to the model (EMS-A), we also observe that a slowdown in the emergency physician circuit does not affect the throughput of the MRAs, as an effect of their desynchronization by the reservoir buffer. It may still happen that we encounter both a lack of MRAs and physicians, but the latter do not prevent the former to pick up inbound calls at their maximal possible throughput.

6 Concluding Remarks

We developed a model of fluid timed Petri net including both preselection and priority routings. In the absence of preselection, we showed that the dynamics of the net is equivalent to the Bellman equation of a semi-Markov decision problem, from which a number of properties follows: existence and universality of the throughput vector (independence from the initial condition), existence of stationary regimes by reduction to a lexicographic system, polynomial-time computability of the throughput by reduction to a linear program, and explicit representation of the throughput, as a function of resources, by a polyhedral complex. This approach provides tools to address further issues: e.g., an important practical problem is to bound the time needed to absorb a peak of congestion. We believe it can still be addressed using techniques of nonexpansive dynamical systems, along lines of [1, 17], we leave this for a subsequent work.

In the presence of priority, only part of these results remain: finding stationary regimes is equivalent to solving a lexicographic system, which is a system of polynomial equations over a tropical semifield of germs. In other words, stationary regimes are the points of a tropical variety, and we still get a polyhedral complex, describing all the congestion phases. This complex can be computed in exponential time, by enumerating strategies, as we did on our case study. Whereas we do not expect worst-case polynomial-time computability results in such a generality (solving tropical polynomial systems is generally NP-hard), we leave it for further work to get finer complexity bounds. It is also an open problem to compare the asymptotic behavior of counters, for an arbitrary initial condition, with stationary solutions.