1 Introduction

In crisis situations, the evacuation of people from endangered areas (EA) is the overriding and principal matter. Crisis situations cannot be completely controlled anyway. They can only be partially influenced. To manage the evacuation process from EA, flexible escape strategies are required. Namely, it is necessary to find safety and free escape routes [15]. Suitable models utilized in the simulation process, especially the models representing the EA structure, are able to yield useful information. There are many methods how to model the evacuation processes—see, e.g. [11]. Especially, Petri nets (PN) seem to be suitable for those purposes. In [4], the place/transition Petri nets (P/T PN) [16, 17] were used in agent-based modelling of the evacuation process. Concisely said, P/T PN are bipartite-directed graphs \(\left\langle P,\,T,\,F,\,G \right\rangle \) with \(P,\,T,\,F,\,G\) being, respectively, the set of places (the first kind of the graph nodes), the set of transitions (the second kind of the graph nodes), the set of the edges (directed arcs) from the places to the transitions and the set of edges from the transitions to the places. Moreover, P/T PN have their dynamics (marking evolution). The dynamics can be formally expressed as \(\langle X,\,U,\,\delta ,\,{\mathbf {x}}_0\rangle \), \(X \cap U = \emptyset \), \(\delta : X \times U \rightarrow X\) with \(X,\,U,\,\delta ,\,{\mathbf {x}}_0\) being, respectively, the set of marking the places (i.e. the P/T PN states), the set of states of the transitions (starting or ending the states of the places—i.e. the control vector), the transition function and the initial state vector of the places. The formal expression of \(\delta \) can be rewritten into the system form as follows:

$$\begin{aligned}&{\mathbf {x}}_{k+1} = {\mathbf {x}}_k + {\mathbf {B}}\cdot {\mathbf {u}}_k \quad ,\quad k = 0,\, \ldots ,\, N\end{aligned}$$
(1)
$$\begin{aligned}&{\mathbf {B}} = {\mathbf {G}}^T - {\mathbf {F}}\end{aligned}$$
(2)
$$\begin{aligned}&{\mathbf {F}}\cdot {\mathbf {u}}_k \le {\mathbf {x}}_k \end{aligned}$$
(3)

where \(k\) is the discrete step of the dynamics development, \({\mathbf {x}}_k = \, (\sigma ^k_{p_1},\ldots , \sigma ^k_{p_n})^T\) is the \(n\)-dimensional state vector with the entries \(\sigma ^k_{p_i} \, \in \, \{0, 1,\ldots , c_{p_i}\}\), \(i = 1 ,\ldots , n\) expressing the states of places (i.e. some atomic activities) by \(0\) (passivity) or by \(0 < \sigma _{p_i} \le c_{p_i}\) (activity), where \(c_{p_i}\) is the capacity of \(p_i\). The vector \({\mathbf {u}}_k = \, (\gamma ^k_{t_1},\ldots , \gamma ^k_{t_m})^T\) is the \(m\)-dimensional vector of the transitions (i.e. the control vector with the entries \(\gamma ^k_{t_j} \, \in \, \{0, 1\}\), \(j = 1,\ldots , m\) representing the occurrence of the elementary discrete events (e.g. starting or ending the activities, failures, etc.) by \(1\) (presence of the corresponding discrete event) or by \(0\) (absence of the event). The matrices \({\mathbf {F}}\) (in the literature about PN theory frequently denoted as \({\mathbf {Pre}}\)) and \({\mathbf {G}}^T\) (in the literature about PN theory frequently denoted as \({\mathbf {Post}}\)) are the incident matrices of the directed arcs corresponding to the sets \(F\) and \(G\).

The P/T PN-based approach [4, 5] is very useful at the creation of the detailed model of EA as well as at synthesizing the supervisors guaranteeing the desired cooperation of the individual components of the model. While in [4] the principal P/T PN model of the EA was introduced and tested, in [5] also the P/T PN-based model of the workflow was introduced and tested. Although the P/T PN models are very suitable and useful, they do not allow to observe the the course of the evacuation process in time. Because during the evacuation especially the time relations are very important (one can even say that the most important) another ways to modelling the evacuation process have to be explored. Fortunately, there exist the kinds of PN where time is the inherent part of their parameters—e.g. timed PN, hybrid PN, etc. Consequently, the approach [6] was presented. It is very important that experience and knowledge from the creation and usage of the P/T PN model could be utilized at the creation of such alternative kinds of models. This paper represents the extension of the conference paper [6] and yields the more complex view on the application of PN to modelling the EA and dynamics of the evacuation process.

Here, alternatively, timed PN (TPN) viewed, e.g. in [18] and hybrid PN (HPN) [8], especially the modification of HPN named as the first-order hybrid Petri nets (FOHPN) defined and/or used in [1, 2, 7, 9, 10, 19] will be tested in such a role. All of these kinds of Petri nets (PN) are particular extension of PN. TPN and FOHPN used here allow to model the EA structure and to analyse the evacuation process. Namely, their places directly model the spaces to be evacuated and marking the places models people, while their transitions models the gate-ways. While P/T PN do not include time and yield only the successive discrete marking of their places, TPN and FOHPN yield the time behaviour of the marking which depicts the escape of people from EA. TPN offer stepped time functions, while FOHPN offer real continuous ones. By adding the time parameter(s) into P/T PN structure TPN can be obtained.

In TPN, the transitions are components of blocks modelling the gate-ways. In FOHPN, the gate-ways are modelled by continuous transitions affected by discrete PN subnets. Because only the gate-ways play an active role in EA they can be regarded as simple agents. Although such agents have not own goals (in fact they are rather reactive subsystems), they are able to cooperate each other. In TPN, they cooperate by means of a suitable supervisor, and in FOHPN by means of discrete PN subnets. The cooperation favourably affects the evacuation dynamics.

Supervisors synthesized and utilized in [46] were able to ensure the intended agent cooperation. The supervised evacuation of EA given in Fig. 1 left was modelled there by P/T PN. The models of the one-way door and two-way door [4, 15] are displayed in Fig. 1 right. Supervisors given in Fig. 2, displaying the P/T PN model of EA, were synthesized in [4] by means of supervision principles known in discrete event systems control theory [1214]. While the Supervisor 1 monitors number of people leaving the rooms, the Supervisor 2 determines the priority of leaving the Corridor through the Exit 1. However, when, e.g. the preferential Exit 1 is busy the escape across the Room 2 or the Room 4 is possible too. Details about the supervisors synthesis can be found in [4].

Fig. 1
figure 1

The scheme of EA to be evacuated (left). P/T PN-based model of two kinds of gate-ways—the non-reversible way and the reversible (bidirectional) one (right)

Fig. 2
figure 2

The P/T PN-based model of EA. Two supervisors influence the evacuation

In contrast to P/T PN, TPN yield the time behaviour of marking (stepped functions), expressing the escape of people from the rooms and corridors to the safety spaces. FOHPN offer similar information but in the form of piecewise-linear real functions–flows. The FOHPN continuous part corresponds directly to the EA structure (the places model the rooms and the transitions model the gate-ways), while their discrete part makes possible to affect the throughput of the gate-ways. Instead of the supervisor(s), the P/T PN or TPN modules are used to influence the continuous transitions, and consequently, also the escape. First of all TPN and FOHPN will be concisely introduced. Then, the relation between the TPN model and P/T PN one [4] will be explained. The supervisors used in the P/T PN model will be utilized in TPN too. Time specifications will be assigned to the TPN model. Next, the FOHPN model will be presented and described. Finally, simulation results obtained by means of the handy simulation tool HYPENS for Matlab [19, 20] will be displayed for both kinds of models. They will show emptying the rooms and corridor and filling the safety spaces at different kind of timing the discrete transitions.

2 Timed Petri nets and hybrid Petri nets

P/T PN transitions, places, arcs and tokens do not depend on time. In TPN [18], time specifications are defined. Here, we will use TPN assigning time exclusively to P/T PN transitions (delays in deterministic case or a kind of probability distributions of timing in non-deterministic case) because they model doorways (being bottle-necks) playing the most important role at the throughput of the escape routes.

HPN [8] are an extension of standard PN. They model the coexistence of discrete and continuous variables. HPN have two groups of places and transitions: discrete and continuous. Thus, there are three kinds of directed arcs here: (i) between discrete places and discrete transitions (described by the incidence matrices \({\mathbf {Pre}}_{dd}\) and \({\mathbf {Post}}_{dd}\)); (ii) between continuous places and continuous transitions (described by the incidence matrices \({\mathbf {Pre}}_{cc}\) and \({\mathbf {Post}}_{cc}\)); (iii) between discrete places and continuous transitions (described by the incidence matrices \({\mathbf {Pre}}_{dc}\) and \({\mathbf {Post}}_{dc}\)) as well as between the continuous places and discrete transitions (described by the incidence matrices \({\mathbf {Pre}}_{cd}\) and \({\mathbf {Post}}_{cd}\)). The discrete places and transitions handle discrete tokens, while the continuous places and transitions handle continuous variables.

FOHPN are a simplified kind of HPN. Here, they can model the escape from EA (flows are groups of people). Rules defining mutual interactions between their groups of places, transitions and arcs are defined in detail in [13, 9, 19]. Duplicating the FOHPN comprehensive definition here is needless. It is sufficient to give a basic idea about the FOHPN principle and function. The set of places \(P = P_d \cup P_c \), where \(P_d\) is a set of discrete places and \(P_c\) is a set of continuous places (figured by double concentric circles). The set of transitions \(T = T_d \cup T_c\), where \(T_d\) is a set of discrete transitions and \(T_c\) is a set of continuous transitions (figured by double rectangles). \(T_d\) contains a subset of immediate (no-timed) transitions and/or a subset of timed transitions (deterministic and/or non-deterministic). The FOHPN marking consists of two parts: (i) discrete (tokens in the discrete places) and (ii) continuous (an amount of a fluid in the continuous places). The instantaneous firing speed (IFS) \(v_j\) [13] appertains to each continuous transition \(T_j \in T_c\). IFS determines an amount of fluid per a time unit which fires the continuous transition in a time instance \(\tau \). For all time instances \(\tau \) holds \(V_j^\mathrm{min} \le v_j(\tau ) \le V_j^\mathrm{max}\), where min and max denote the limit values of the speed \(v_j(\tau )\). Thus, IFS is piecewise-constant. In our case \(V_j^\mathrm{min},\,V_j^\mathrm{max}\) depend on the gate-ways’ sizes. Then, the equation governing the evolution of the continuous marking \(M_i\) of a continuous place \(P_i \in P_c\) can be expressed [10] as follows:

$$\begin{aligned} \frac{\mathrm{d}M_i(\tau )}{\mathrm{d}\tau } = \sum _{T_j \in T_c}^{}C(P_i,\,T_j)\cdot v_j(\tau ) \end{aligned}$$
(4)

where \(C(\cdot ) = \mathrm{Post}_{cc}(P_i,\,T_j) - \mathrm{Pre}_{cc}(P_i,\,T_j)\) with \(\mathrm{Post}_{cc}(P_i,\,T_j)\) being the entree of the matrix \({\mathbf {Post}}_{cc}\) and \(\mathrm{Pre}_{cc}(P_i,\,T_j)\) being the entree of \({\mathbf {Pre}}_{cc}\), while \(v_j(\tau )\) is the entree of the IFS vector \({\mathbf {v}} = (v_1(\tau ),\,v_2(\tau ),\,\ldots ,\,v_{n_c}(\tau ))^T\) with \(n_c\) being the number of the continuous transitions. An empty continuous place \(P_i\) is filled through its enabled input transition. Thus, the fluid can flow to the output transition of this place. The continuous transition \(T_j\) is enabled in the time \(\tau \) [13, 9, 19] if and only if its input discrete places \(p_k \in P_d\) have marking \(m_k(\tau )\) at least equal to the entree \(\mathrm{Pre}_{dc}(p_k,\,T_j)\) of the incidence matrix \({\mathbf {Pre}}_{dc}\) of the arcs from the discrete places to the continuous transitions and all of its input continuous places \(P_i \in P_c\) satisfy the condition that their markings \(M_i(\tau ) \ge 0\)—i.e. the places \(P_i\) are filled. If all of the input continuous places of the transition \(T_j\) have nonzero marking then \(T_j\) is strongly enabled, otherwise \(T_j\) is weakly enabled. The continuous transition \(T_j\) is disabled if some of its input places are not filled. Namely, \(T_j\) cannot take more fluid from any empty input continuous place than the amount entering the place from other transitions. This corresponds to the principle of mass conservation.

2.1 A fragment of FOHPN in general

To present FOHPN in detail, let us introduce a fragment of FOHPN. It does not represent any specific model but it only demonstrates the more detailed view on the relation between the FOHPN continuous and discrete parts. The example of a FOHPN fragment is given in Fig. 3 where the continuous places \(P_{k-1}\) (with continuous marking \(M_{k-1}\)), \(P_{k}\) (with continuous marking \(M_{k}\)) and \(P_{k+1}\) (with continuous marking \(M_{k+1}\)) occur. There are also two continuous transitions \(T_i\) (with limited IFS \(v_i\)) and \(T_j\) (with limited IFS \(v_j\)). The discrete part of the example of FOHPN is created by four discrete places. The places \(p_{i_1}\) (with discrete marking \(m_{p_{i_1}}\)) and \(p_{i_2}\) and the discrete transitions \(t_{i_1}\), \(t_{i_2}\) create the TPN subnet controlling the continuous transition \(T_i\), while the places \(p_{j_1}\) (with discrete marking \(m_{p_{j_1}}\)) and \(p_{j_2}\) and the discrete transitions \(t_{j_1}\), \(t_{j_2}\) create the TPN subnet controlling the continuous transition \(T_j\). Timing the discrete transitions \(t_{i_1}\), \(t_{i_2}\) and \(t_{j_1}\), \(t_{j_2}\) can be either deterministic (i.e. with predefined time delays) or non-deterministic (with different kinds of probability distribution of timing—exponential, discrete uniform, Poisson’s, Rayleigh’s, Weitbull’s, etc.). For such a fragment the particular incidence matrices are the following

$$\begin{aligned}&{\mathbf {Pre}}_{cc}=\left( \begin{array}{c@{\quad }c} 1&{}0\\ 0&{}1\\ 0&{}0\end{array}\right) ;\; {\mathbf {Post}}_{cc}=\left( \begin{array}{c@{\quad }c} 0&{}0\\ 1&{}0\\ 0&{}1\end{array}\right) ;\;\\&{\mathbf {Pre}}_{cd}={\mathbf {Post}}_{cd}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c} 0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0\end{array}\right) \end{aligned}$$
Fig. 3
figure 3

The fragment of a FOHPN with three continuous places, two continuous transitions, four discrete places and two discrete transitions

$$\begin{aligned}&{\mathbf {Pre}}_{dc}={\mathbf {Post}}_{dc}=\left( \begin{array}{c@{\quad }c} 1&{}0\\ 0&{}0\\ 0&{}1\\ 0&{}0\end{array}\right) ;\; {\mathbf {Pre}}_{dd}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c} 1&{}0&{}0&{}0\\ 0&{}1&{}0&{}0\\ 0&{}0&{}1&{}0\\ 0&{}0&{}0&{}1\end{array}\right) ;\;\\&{\mathbf {Post}}_{dd}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c} 0&{}1&{}0&{}0\\ 1&{}0&{}0&{}0\\ 0&{}0&{}0&{}1\\ 0&{}0&{}1&{}0\end{array}\right) \end{aligned}$$

The vectors \({\mathbf {V}}^\mathrm{min}\!=\!(V_i^\mathrm{min},\,V_j^\mathrm{min})\) and \({\mathbf {V}}^\mathrm{max}\!=\!(V_i^\mathrm{max},\,V_j^\mathrm{max})\) represent, respectively, the lower and upper boundaries of the IFS \(v_i,\,v_j\).

3 Problem formulation and simulation results

Let us model EA by both the TPN and the FOHPN. To obtain the TPN model it is sufficient only to add the time specifications to transitions in the P/T PN model [4]. The model structure retains the form of P/T PN in Fig. 2. However, the FOHPN model is completely different from the P/T PN model. It has the structure given in Fig. 6—the continuous PN affected by the discrete PN modules.

3.1 Using the TPN model of the endangered area

Consider the supervised P/T PN-based model [4] given in Fig. 2. Assign time specifications to its transitions to obtain the TPN model. The time delays in the deterministic case and the parameters of the probability distribution of timing in the non-deterministic one depend on the kind of doorways in the real EA, especially on their throughput (determined primarily by the doorway size). Namely, the transitions model the doorways being the bottle-necks at the escape of people from the rooms and the corridor to the safety spaces and affect the time behaviour of the escape. For simulation, we have chosen the universal PN tool HYPENS [19, 20] for MATLAB. Consider the EA initial state (before evacuation): 15 people in the Room 1, 17 people in the Room 2, 43 people in the Room 3, 55 people in the Room 4 and 5 people in the Corridor. Firstly, let us suppose the deterministic timing of the transitions with time delays of particular transitions \(t_1\)\(t_{18}\) being the entries of the vector \(0.15.(10,\,10,\,10,\,10,\,10,\,10,\,10,\,10,\,10,\,10,\,10,\,10,\,20,20,\,20,\,20,\,15,\,15)\). Corresponding simulation results are displayed in Fig. 4.

Fig. 4
figure 4

The escape dynamics expressed by the evolution of markings \(m(p_i)\) of the TPN places (compare with Fig. 2): \(p_1\), \(p_4\), \(p_7\), \(p_{10}\) (rooms), \(p_{13}\) (corridor) and \(p_{16}\), \(p_{19}\), \(p_{22}\) (safety spaces) in time at the deterministic timing the TPN transitions. The markings express people while the stepped functions show how people escape from the rooms and from the corridor as well as how the numbers of people accrue in the particular safety spaces

Now, consider that the transitions are non-deterministic, with the exponential probability distribution of their timing \(f_x=\lambda \cdot e^{-\lambda \cdot x}\) for \(x \ge 0\) and \(f_x=0\) otherwise, having the parameter as follows: \(\lambda =\) 2 for the transitions \(t_1\)\(t_{12}\), \(\lambda = 4\) for \(t_{13}\)\(t_{16}\) and \(\lambda =\) 3 for \(t_{17}\) and \(t_{18}\). Then, the simulation results on the time interval \((0,\,500)\) are given in Fig. 5.

Fig. 5
figure 5

The escape dynamics expressed by the evolution of markings \(m(p_i)\) of the TPN places (compare with Fig. 2): \(p_1\), \(p_4\), \(p_7\), \(p_{10}\) (rooms), \(p_{13}\) (corridor) and \(p_{16}\), \(p_{19}\), \(p_{22}\) (safety spaces) in time at the exponential probability distribution of timing the TPN transitions. The markings express people while the stepped functions show how people escape from the rooms and from the corridor as well as how the numbers of people accrue in the particular safety spaces

In both cases, the evacuation of the rooms and corridor is represented by means of the stepped time functions displaying the escape (i.e. escape time behaviour) of people from EA. The time behaviour of the increase of people into the safety spaces is represented also by means of the stepped time functions. Notice, that the courses of the escape at the deterministic timing (i.e. at time delays) of the TPN transitions and those at the non-deterministic timing (namely at the exponential probability distribution) are indeed different but comparable as to shapes of the curves.

3.2 Using the FOHPN model of the endangered area

The FOHPN model is given in Fig. 6. The continuous places \(P_i,\,i=1,\ldots ,8\), represent (compare with Fig. 1 left and Fig. 2) the EA rooms \(R_j,\,j=1,\ldots 4\) (\(P_1\) is \(R_3\), \(P_2\) is \(R_1\), \(P_3\) is \(R_4\), \(P_4\) is \(R_2\)), the corridor (\(P_5\)) and the safety spaces outside EA reached by the exits \(E_i,\,i=1,\,\ldots ,3\) (\(P_6\) by \(E_1\), \(P_8\) by \(E_2\), \(P_7\) by \(E_3\)). The FOHPN continuous transitions \(T_j,\,j=1,\ldots ,9\), represent the doorways including the exits (\(E_1\) is \(T_7\), \(E_2\) is \(T_9\), \(E_3\) is \(T_8\)). Each continuous transition is affected by a simple discrete PN module. The modules substitute the supervisor(s) used in the TPN model, e.g. the module \(\{p_1,\,p_2,\,p_3,\,p_4,\,t_1,\,t_2\}\) in Fig. 6 affects \(T_1\): (i) if \(p_1\) is active then \(T_1\) is open; (ii) if \(p_2\) is active then \(T_1\) is closed; (iii) the active \(p_3\) opens the closed \(T_1\), while the active \(p_4\) closes the open \(T_1\); (iv) \(t_1\), \(t_2\) may be either deterministic (time delays) or non-deterministic (with a probability distribution of timing). The continuous transition modelling the one-way door needs one such a module. Two transitions are needful to model the two-way door. Each of them needs the own module. Moreover, the transitions have to be mutually exclusive. Namely, the door can be passed either outwards or inwards. The passage in both directions simultaneously is forbidden. \(T_1,\,T_2\) and \(T_7\)\(T_9\) model one-way doors while the pairs (\(T_3,\,T_5\)), (\(T_4,\,T_6\)) model two-way doors. \(T_3\), \(T_5\) represent the same door, but in the opposite direction of passing. To avoid a collapse (at the endeavour to exit and enter the room simultaneously), \(T_3\), \(T_5\) have to be mutually exclusive by means of the discrete place \(p_{37}\). The same is valid for \(T_4\), \(T_6\) and \(p_{38}\). Likewise, the simultaneous entering the room \(P_3\) (through \(T_5\)) and the external space \(P_6\) (through \(T_7\)) from the corridor \(P_5\) are mutually exclusive by means of \(p_{39}\). The same is valid for entering \(P_4\) (through \(T_6\)) and \(P_6\) (through \(T_7\)) from \(P_5\) and \(p_{40}\). In general, we can obtain the graphical results for both the deterministic timing of discrete transitions and the non-deterministic one using the FOHPN model at simulation by means of the tool HYPENS [19, 20] in MATLAB.

Fig. 6
figure 6

The FOHPN-based model of the EA

Consider the EA initial state (before evacuation) being the same like in the TPN approach, i.e. 15 people in the Room 1, 17 people in the Room 2, 43 people in the Room 3, 55 people in the Room 4 and 5 people in the Corridor.

3.2.1 Deterministic timing of the FOHPN discrete transitions

Let us consider the deterministic timing of the FOHPN discrete transitions. Namely, with the following parameters of timing (time delays of the discrete transitions): \(\mathrm{del} = (.1,\,.2,.1,.2,.1,.2,.1,.2,.1,.2,.1,.2,.1,.3,.1,\,.4,.1,\,.4)\). The IFS parameters are \({\mathbf {V}}^\mathrm{min}=(0,0,0,0,0,0,0,0,0)\), \({\mathbf {V}}^\mathrm{max}=(12,12,12,12,12,12,24,18,24)\). The simulation results are given in Fig. 7.

Fig. 7
figure 7

The escape dynamics expressed by the evolution of markings \(M(P_i)\) of the FOHPN continuous places \(P_1\)\(P_8\) in time at the deterministic timing the FOHPN discrete transitions. The piecewise-linear real functions show the flows of people escaping from the rooms modelled by \(P_1\)\(P_4\) and from the corridor modelled by \(P_5\) as well as the flows of people filling the particular safety spaces modelled by \(P_6\)\(P_8\)

3.2.2 Timing with the discrete uniform probability distribution

Consider now a non-deterministic case with the discrete uniform probability distribution of timing: \(f_x = 1/(b-a)\) when \(x \in (a,b)\) and \(f_x = 0\) otherwise. Let the parameters \(a,\,b\) for 18 discrete transitions are entries of the vectors \({\mathbf {a}} = (.1,\,.2,.1,.2,.1,.2,.1,.2,.1,.2,.1,.2,\,.1,.3,.1,.4,.1,\,.4)\), \({\mathbf {b}} = (1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,4,1,4)\). Let the entries of \({\mathbf {V}}^\mathrm{min}=(0,0,0,0,0,0,0,0,0)\), \({\mathbf {V}}^\mathrm{max}=(12,12,12,12,12,12,24,18,24)\) limit IFS of the transitions \(T_j\). These parameters depend on a kind and a size of the EA doors and characterize their throughput. Let the initial states of continuous places are the entries of the vector \({\mathbf {M}}0_C = (25\,\,27\,\,43\,\,55\,\,5\,\,0\,\,0\,\,0)\) representing the number and dislocation of people in the rooms and the corridor before evacuation. The simulation results on the time interval \((0,\,4.5)\) are given in Fig. 8. The particular pictures in Fig. 8 display the courses of the escape of people from the rooms modelled by \(P_1\)\(P_4\) and the corridor modelled by \(P_5\) to the safety spaces modelled by \(P_6\)\(P_8\) with respect to time. These functions are piecewise linear. HYPENS allows to use also other kinds of the probability distribution for the discrete transitions—exponential, Poisson’s, Rayleigh’s, Weitbull’s.

Fig. 8
figure 8

The escape dynamics expressed by the evolution of markings \(M(P_i)\) of the FOHPN continuous places \(P_1\)\(P_8\) in time at the discrete uniform probability distribution of timing the FOHPN discrete transitions. The piecewise-linear real functions show the flows of people escaping from the rooms modelled by \(P_1\)\(P_4\) and from the corridor modelled by \(P_5\) as well as the flows of people filling the particular safety spaces modelled by \(P_6\)\(P_8\)

3.2.3 Timing with the exponential probability distribution

To illustrate at least one of them consider now the non-deterministic case with the exponential probability distribution of timing \(f_x=\lambda \cdot e^{-\lambda \cdot x}\) for \(x \ge 0\) and \(f_x=0\) otherwise, having the parameter \(\lambda \) for particular discrete transitions equal to the entries of the vector \({\varvec{\lambda }} = (.1,.2,.1,.2,.1,.2,.1,.2,.1,.2,.1,.2,\,.1,.3,\,.1,.4,.1,.4)\). Let the initial continuous marking is \({\mathbf {M}}0_C = (25\,\,27\,\,43\,\,55\, 5\,\,0\,\,0\,\,0)\). Let the limits for the IFS of particular continuous transitions are the entries of the following vectors. \({\mathbf {V}}^\mathrm{min}=(0,0,0,0,0,0,0,0,0)\), \({\mathbf {V}}^\mathrm{max}=(12,12,12,12,12,12,24,18,24)\). After simulation we obtain the results given in the Fig. 9.

Fig. 9
figure 9

The escape dynamics expressed by the evolution of markings \(M(P_i)\) of the FOHPN continuous places \(P_1\)\(P_8\) in time at the exponential probability distribution of timing the FOHPN discrete transitions. The piecewise-linear real functions show the flows of people escaping from the rooms modelled by \(P_1\)\(P_4\) and from the corridor modelled by \(P_5\) as well as the flows of people filling the particular safety spaces modelled by \(P_6\)\(P_8\)

3.2.4 Comment

Although there are differences between the simulation results achieved in the part 3.2.1 using the discrete uniform probability distribution of timing and the simulation results achieved in the part 3.2.2 using the exponential one (especially in the escape behaviour in time) the tendencies of their behaviour during the escape of the rooms and corridor and during the corresponding increase of the number of escaping people which come into the safe spaces are analogical. Their comparison with the results achieved in the part 3.2.3 during the deterministic timing shows that they are more responsive to the control interferences than the deterministic ones.

4 Conclusion

The problem of modelling EA and the model-based simulation of the EA evacuation were examined. The paper represents the extension of the paper [6]. It represents a simple case study schematically outlined in Fig.1. As it can be seen in Fig.1 (left) the Room 2 has the own Exit 2 and the Room 4 has the own Exit 3 to safety spaces. Moreover, they also have two-way doors to the Corridor. Thus, e.g. when the direct Exit 1 from the Corridor is busy, the escape of people can be realized across these rooms too. Two alternative models were used here to simulate the evacuation process.

Firstly, the TPN model of EA was proposed, arising from the supervised P/T PN model presented in [4] and utilized also in [5, 6]. The doorways (one-way and reversible) were considered to be simple agents able to cooperate by means of the supervisor(s). Although the cooperation is forced (especially by the Supervisor 2), at simulation it helps to master the escape of people from EA. The TPN model conserves the structure of the supervised P/T PN model [4] and adds the time specifications to the transitions—the time delays to deterministic transitions or a kind of the probability distribution of timing to non-deterministic ones—depending on the kind and size of doorways. Namely, the transitions model the doorways being the bottle-necks of the escape. Thus, they have the most important influence on the escape.

Secondly, the FOHPN model of EA was built. It models EA structure by the continuous PN (the first part of FOHPN). Here, the continuous places represent the rooms, the corridor and the safety spaces (where the people escape tends). The continuous transitions (modelling the doorways) are affected by means of discrete PN modules (the second part of FOHPN). Thus, the flow of people escaping from EA is modelled by the evolution of marking the FOHPN continuous places in time. The discrete PN modules are either simple P/T PN subnets or TPN subnets with deterministic or non-deterministic timing of their transitions. The parameters of the discrete transition timing as well as IFS of continuous transitions have a coherence with the kind and size of the real EA doorways. In effect, the discrete PN modules substitute the supervisors applied in TPN.

In both approaches (TPN and FOHPN), the model-based simulation of the evacuation process was performed in MATLAB by means of the universal simulation tool HYPENS [19, 20]. The TPN simulation results and the FOHPN ones were presented, respectively, in Figs. 5 and 8 where the marking evaluation of particular relevant places with respect to time was displayed. In comparison with the P/T PN-based approach [4] the TPN-based approach as well as the FOHPN-based one seem to be more suitable for the simulation of the evacuation process. Namely, they yield time behaviour of the escape, while P/T PN do not. This allows to test the throughput of particular escape routes in time. On comparison of both approaches (TPN and FOHPN), we can state that TPN approach has a higher accuracy (its marking exactly express human individuals) while FOHPN offer the piecewise-linear functions (something like tangents or envelopes of the courses of the actual continuous marking). In general, the simulation results achieved by such models can be useful not only in modelling the evacuation but also in the development of new buildings.