#### Abstract

This paper proposes a monitoring approach based on stochastic fuzzy Petri nets (SFPNs) for railway transport networks. In railway transport, the time factor is a critical parameter as it includes constraints to avoid overlaps, delays, and collisions between trains. The temporal uncertainties and constraints that may arise on the railway network may degrade the planned schedules and consequently affect the availability of the transportation system. This leads to many problems in the decision and optimization of the railway transport systems. In this context, we propose a new fuzzy stochastic Petri nets for monitoring (SFPNM). The main goal of the proposed supervision approach is to allow an early detection of traffic disturbance to avoid catastrophic scenarios and preserve stability and security of the studied railway networks. Finally, to demonstrate the effectiveness and accuracy of the approach, an application to the case study of the Tunisian railway network is outlined.

#### 1. Introduction

Railway industry plays a critical role in transportation and transit systems attributed to the ever-growing demand for catering to both freight and passengers. However, owing to many challenges faced by railway stations such as harsh environments, traffic flow, safety, and security risks, new and adaptive systems employing new technology are recommended [1].

In the railway transport system, the processing times are interval-valued with parameters that depend on the operation to be performed. Any deviations from the specified interval will characterize a traffic disturbance. Consequently, the monitoring of the time intervals will be used as the main principle to detect and isolate the disturbances that affect the system. The system that motivated this study is a real railway transport network in Tunisia.

To reduce road congestion in urban areas, railway networks are coming under increasing strain. In Tunisia, integrity rail services are operated in many metropolitan areas but most notably in the Tunisian Sahel region.

Safety is of critical concern, particularly given the recent high-profile rail accidents featured in the media. The metro derailment, which happened near Sahline, 10 km south of Sousse, is especially relevant (numerous injured passengers). The inquiry commission determined that the accident resulted from failure of the railroad switch, holding the maintenance company responsible for the failure. In this context, it is essential to develop a supervision approach allowing to avoid catastrophic scenarios and to further rail safety.

Our study is devoted to the modeling and monitoring of the Tunisia railway transport networks by using stochastic P-timed Petri nets in order to control traffic and to avoid disruptions problems. The approach proposed in this paper is based on a statistical analysis of the real measurements, collected by the *Supervisory Control and Data Acquisition*(SCADA) system of the Tunisian National Railway Company (TNRC), to identify the time parameters of the stochastic P-timed Petri net (SP-TPN) model. In particular, the approach determines the dynamic time intervals associated with the places of the SP-TPN and the resulting probability density functions (PDF) of the travelling and parking times. The main objectives are to analyze the traffic conditions by simulation and to monitor the traffic by avoiding possible troubles and perturbations.

Our study concerns the Tunisian railway transport system, particularly, in the Tunisian Sahel region. This system must respond to different requirements, minimizing the waiting times in the stations, respecting schedules, and ensuring the safety of passengers and equipment. In our previous works [2], synchronized Petri nets (P-TPNs) are used to model railway transport systems. In this way, the modeling process is greatly simplified, and the complexity of the model is widely reduced. In [2], an identification of the P-TPN model of the Sahel railway network in Tunisia was made. The objective was to identify the temporal parameters of the model from a set of real measurements collected by the SCADA system of TNRC.

The contributions of the present paper are as follows:(i)The improvement of the time semantic of the railway network model with the introduction of the stochastic P-timed Petri nets (SP-TPNs)(ii)A new supervision approach, based on the study of effective sojourn time of the token in places and the evaluation of the probability density functions (PDF) of the travelling times, is proposed. This approach is used to evaluate the influence of different types of disturbances on the expected schedule.

This paper is organized as follows. Section 2 presents the state of the art. Section 3 presents the studied railway transport system and the SP-TPN model of the railway network of the Sahel Tunisia. Afterward, the problem of monitoring of railway transport networks is tackled. An original supervision approach based recovery approach based on stochastic P-timed Petri nets is presented.

In Section 5, an application of the developed monitoring approach to realistic railway is proposed. Finally, a conclusion is presented with some perspectives.

#### 2. State of the Art

Railway transport systems must be monitored online to avoid situations that may be critical because of disturbances. These disturbances can affect the railway infrastructure or traffic management, and that they can lead to a degradation of the transport service. The general objective is to maintain the stability of the railway network and make it more efficient and secure. In this context, various research projects were conducted on the monitoring of transportation systems to save time and improve the quality of rail service [3–9].

Among many related research studies, Bennet et al. [10] propose an identification of the critical factors that should be considered in the design of a wireless sensor network, including the availability of electrical power and communications networks in railway transport. Various issues facing underground deployment of wireless sensor are discussed, in particular, for two-field case studies involving networks deployed for structural monitoring in the Prague Metro and the London Underground.

In [1], the authors present a review of wireless sensor networks (WSNs) that have been designed for use in monitoring and securing railway stations. Several WSNs applications are proposed for use in railway station systems, including advanced WSNs, which will enhance security, safety, and decision-making processes to achieve more cost-effective management in railway stations, as well as the development of integrated systems. The authors demonstrate that the size, efficiency, and cost of WSNs are influential factors that attract the railway industry to adopt these devices.

Kulbovskyi et al. [11] propose a new monitoring approach for a power supply network system. The proposed monitoring model shows information chains between system components and their object, generalized structure of original data flow-over, particulrly, controlling decisions and external effects within the information and computer system. In order to identify emergency and abnormal operating regimes of electrical networks in real-time mode, an application to railway power supply network was proposed.

The development of algorithms for detecting failures in railway catenary support components was proposed by Liu et al. [12]. In this context, virtual reality technology is employed to control the learning environment of convolutional neural networks (CNNs) for the automatic multicamera-based monitoring of catenary support components. First, 3D image data based on drawings and real-life video images are developed. Then, a virtual reality environment for monitoring the railway catenary support system is created, emulating real-life conditions such as measurement noise and a multicamera train simulation to resemble state-of-the-art monitoring systems.

On the other hand, Mishra [13] proposed an anticollision system named “TMCAS” (train monitoring and collision avoidance system) that uses a protocol to share and exchange position, speed, and the signal at danger information between trains and central control room. TMCAS aims to automate train operations and act as a safety enhancement system by ensuring speed control, rear-end and head-on collision avoidance, and signal-at-danger avoidance.

Some other works are interested in the online monitoring of railway traffic in presence of unpredictable events. Pinto et al. [14] presents a contactless system to measure track displacements and its application in an embankment/underpass transition zone, located on the Northern line of the Portuguese railway network where the Alfa Pendular tilting train travels at a maximum speed of 220 km/h. The system is based on a diode laser module and a position sensitive detector (PSD). The PSD receives the laser beam emission, and the detection of the center of gravity of the beam spotlight on the PSD area enables the calculation of the displacement. The optical measuring system proved to be an efficient and flexible way to measure absolute and relative rail displacements in the field, enabling the detection of track deformability differences along the transition zone.

The work presented by Ciampoli et al. [15] reports on the experimental activities carried out on a test-site area within a railway depot in Rome, Italy. In particular, combinations of varying scenarios of fragmentation and fouling of the ballast were reproduced. The setup was then investigated using different multifrequency of ground penetrating radar (GPR) horn antenna systems. These were towed along the rail sections by means of a dedicated railway cart. Interpretation of the preliminary results has shown viability of the GPR method in detecting signs of decay at the network scale, thereby proving this technique to be worthy for implementation in monitoring systems.

To ensure the safety of railway operations and reduce the maintenance costs, a satellite synthetic aperture radar (InSAR) system is presented by Wang et al. [16]. The proposed InSAR provides a potential solution for a consecutive structural health monitoring of transition zones with bi-/triweekly data update and mm-level precision. To demonstrate the feasibility of the InSAR system for monitoring transition zones, a transition zone is tested. The results show that the differential settlement in the transition zone and the settlement rate can be observed and detected by the InSAR measurements.

All previous works are different from our work. In our article, a new supervision approach allows to recognize abnormal behaviors and traffic disturbances with the cooperation of the sojourn time and the probability density functions (PDF) associated with the travelling times. To the best of our knowledge, such monitoring approach has been never formalized for railway transport networks.

#### 3. Tunisian Railway Network

##### 3.1. Presentation

The railway line of the Sahel Tunisia ensures the transportation of passengers and connects the main cities and agglomerations in the Sahel Tunisia from Sousse to Mahdia. This metro line is 70 km long, and it is totally electrified. The trains that run on the line make the ride several times a day between 5 : 00 and 22 : 00, in an average duration of 1h 30 minutes: 30 minutes between Sousse and Monastir and 1 hour between Monastir and Mahdia. It ensures the transport of more than 10 million passengers per year with an average traffic of 27 000 passengers per day. Figure 1 details the stations and durations on the line train railway of the Sahel Tunisia between Mahdia and Sousse stations.

The line begins from the Sousse Bab Jedid station until Monastir station by serving the airport of Monastir, a part of the Monastir touristic zone and the University complex of Monastir. South of Monastir the line continues to Ksar Hellal and Moknine cities and continues to Mahdia serving the cities of Teboulba, Bekalta, the tourist zone of Mahdia.

##### 3.2. Modeling of the Studied Railway Network by Stochastic P-Timed Petri Nets

Stochastic P-timed Petri nets (SP-TPNs) are a convenient tool to model the railway transportation networks with uncertainties and disturbances. SP-TPNs are a subclass of timed Petri nets where stochastic durations are associated with the places of the net [17–19]. In the considered application, the sojourn duration *q*_{i} in each place *p*_{i} represents either the stop at a station or the duration required to travel through a segment of the railway network. Such a duration has an expected value (*qe*_{i}) computed in order to satisfy the planned scheduled. Formally, SP-TPN models are inspired from Khansa et al. [20] and defined as follows:

*Definition 1. *(see [20]). A SP-TPN system is a triplet < *R*, IS, IR>, where(i)R is a Petri net system(ii)IS: P ⟶ *Q*^{+} × (Q^{+} ∪ {+∞}) such that IS_{i} = [*a*_{i}, *b*_{i}] with 0 ≤*a*_{i} ≤ *b*_{i} is the static interval associated to the place *p*_{i}(iii)IR: P ⟶ *Q*^{+} × (Q^{+} ∪ {+∞}) such that IR_{i} = [*α*_{i}, *β*_{i}] with *a*_{i} ≤ *α*_{i} ≤ *β*_{i} ≤ *b*_{i} is the dynamical interval associated to the place *p*_{i}IS_{i} defines the static interval of staying time of a mark in the place *p*_{i} belonging to the set of places P (Q^{+} is the set of positive rational numbers). A mark in the place *p*_{i} is taken into account in transition validation when it has stayed in *p*_{i} at least a duration *a*_{i} and no longer than *b*_{i}. After the duration *b*_{i}, the token will be dead.

In the railway network, each parking and travelling operation is associated with a time interval ([*ai*, *bi*] with u.t (unit time)). Its lower bound indicates the minimum time needed to travelling, and the upper bound sets the maximum time not to exceed in order to avoid the traffic disturbances. Consequently, SP-TPNs have the capability of modeling time intervals and deducing a set of scenarios, when time constraints are violated.

###### 3.2.1. A Stochastic P-Timed Petri Net Model of the Railway Network

The objective of the SP-TPN modeling of the transportation networks is to obtain a usable representation of the network to analyze the system and improve its performance.

The Sahel railway network is composed of three terminals stations (Mahdia, Monastir, and Sousse) and 28 stations: 20 stations between Mahdia and Monastir and 8 stations between Monastir and Sousse. At the beginning of the day, it is assumed that four trains start at Mahdia station, and 2 others are stationed at Sousse station. Figure 2 shows the SP-TPN model for the Sahel railway network. The places P_{127}, P_{128}, P_{129}, P_{130}, P_{131}, and P_{132} are source places initially marked to represent the parking of the trains. The static intervals associated with these places are: IS_{127} = [2700, 2760], IS_{128} = [5100, 5160], IS_{129} = [7500, 7560], IS_{130} = [9600, 9660], IS_{131} = [6000, 6060], and IS_{132} = [5700, 5760]. On this graph, the times associated to the places represent the durations of travels between two successive stations. The displacement of the tokens represents the circulation of the trains on the railway. The whole model has 238 places and 126 transitions and more than 100 000 states because 6 trains are assumed to be simultaneously in circulation (this is the true situation in the considered railway network).

A specific module for bidirectional segments is detailed in [2] and used in Figures 2 and Figure 3. The sojourn duration *q*_{i} in each place *p*_{i} represents either the travelling time between station or the parking times in stations. Such duration has an expected value (*q*_{ie}) which should be computed in order to satisfy the planned schedule.

The main parameters of the models are defined as follows:(i)A train can park in a principal station at least one minute. The static intervals associated with the three main stations are ISp_{1} = ISp_{45} = ISp_{63} = [60, +∞] (Figure 2).(ii)The sojourn time of a metro in any other station is estimated from one to two minutes: IS_{i} = [60, 120] (Figure 3).(iii)At the beginning of each day, it is assumed that 4 trains start from Mahdia station, and 2 others are stationed at Sousse station (Figure 3).(iv)The static intervals IS_{i} and the effective sojourn time *q*_{ie} associated with the stations and with the segments between two successive stations are summarized in Table 1. The static intervals are defined based on the TNRC traffic dataset.

###### 3.2.2. A Model of a Single Directional Segment

Figure 4 shows a part of the SP-TPN modeling a single directional segment. In the graph,(i)The filled red places represent the stations(ii)The empty white places represent the paths between two stations(iii)The presence of a token at a place represents a train movement

Other places (places P_{185} and P_{186}) (Figure 5) have been added to avoid the catching-up between two metros: if metro “M1” parks at a station P75, the latter cannot be caught by metro “M2,” since the crossing of the transition T76 is conditioned by the presence of two tokens, respectively, at places P186 and P75.

#### 4. Uncertainty in Railway Network

The railway traffic is subject to many uncertainties arising from the travelling and staying time in stations. All authors, who treated uncertainties, studied mainly two disturbances: disturbances on the equipment (metro, train, traffic lights, security barrier etc.) or the disturbances concerning travelling durations and, more particularly, the changes in staying and travelling times. For all these reasons, two functions of possibilities representing uncertainty over the effective residence time (*q*_{i}) of a token in a place *p*_{i} and uncertainty on travelling time are proposed. These functions make it possible to highlight traffic disturbances and help the human agent in charge of detecting perturbations and deciding reconfiguration actions.

##### 4.1. Uncertainty on Travelling Time

The proposed approach is based on the analysis of the measured behavior (departure times of the trains at the stations) and expected schedule. From a sequence of experimental measurements observed during the operation of the Sahel rail transport system, the goal is to build a complete SP-TPN model capable of reproducing the observed behavior of the railway traffic. For this purpose, the measured times will be used to determine the dynamic intervals and the sojourn times for each place of the SP-TPN.

###### 4.1.1. Collected Data from the TNRC Company

To identify the parameters of the SP-TPN model, a set of real data is considered (see Table 2), that concerns the circulation of trains from Mahdia to Sousse and from Sousse to Mahdia on the Sahel railway network, during the month of June 2019. The measurements have been recorded by the SCADA of the TNRC company. The SCADA system allows to control traffic, monitor, process real time, and record events.

From an experimental point of view, at the end of each operation, the current real-time value is collected and stored in TNRC database. The identification of model parameters is based on a set of vectors showing the planned and measured metro departure times at each station. All data and measurements are reported in Table 2.

###### 4.1.2. Computation of the Parking and Travelling Times

The identification process aims to calculate the durations between the stations. For this purpose, the duration between the departure times in two successive stations is first computed:

Each duration *D*(*k*) is decomposed into two times: the parking time at station and the travelling time between the stations. One difficulty is that the SCADA does not collect separately these two times. Thus, the parking times have been estimated based on the expert knowledge of the TNRC operators: such times equal 50 seconds for main stations and 30 seconds for the other stations. Parking and travelling times between Mahdia station and Sidi Massaoud station are illustrated in Table 3 illustrates an example:

###### 4.1.3. Determination of the Duration Probability Density Functions

For each segment, the computation of the series of travelling and parking times during a period of several days leads to a collection of values that can be used to build a stochastic model of the time behavior at the considered segment. In particular, we are interested in computing the probability density functions (PDF) of the travelling times, and then estimating the characteristic time parameters of the SP-TPN model (i.e., the IR dynamical intervals).

The histograms of the collected values are computed. The parameters *α*_{i} and *β*_{i} correspond to the limit values of these histograms. The shape of the PDF is determined from the histogram. Three types of PDF are considered for travelling time: triangular, exponential, or uniform PDF. Figures 6 and 7 illustrate three particular segments with PDF of different types. For parking times, only the uniform PDF has been considered based on the knowledge of the operators.

The triangular probability density functions (PDF) is considered as fuzzy number. Indeed, the PDF is a continuous variable restricted to a distribution function *μ*(PDF), which satisfies the following assumptions:(i)*μ*(PDF) is piecewise continuous(ii)*μ*(PDF) is a convex fuzzy set(iii)*μ*(PDF) is a normal fuzzy set

##### 4.2. Effective Sojourn Time Uncertainty

To model the uncertainties and disturbances that may affect the networks, the effective sojourn time *q*_{i} in each place *p*_{i} is computed according to a stochastic process of support IR_{i} = [*α*_{i}*β*_{i}] such that *a*_{i}≤*α*_{i} ≤ qe_{i}≤ *β*_{i} ≤ *b*_{i}. The effective sojourn duration *q*_{i} differs from the expected duration qe_{i} depending on the disturbances Ω that occur in the network:

The probability density function of the sojourn time *q*_{i} is assumed to be known. Next, uniform probability density functions will be considered (Figure 8), but any other function can be considered.

###### 4.2.1. A Graphical Representation of Effective Sojourn Time Uncertainty

In rail transport networks, by analyzing the time constraints (static intervals of the SP-TPN), which represent the travel and parking times, it seems practical to provide an intermediate state between the normal and failure behavior, by providing a tolerance interval located chronologically after the proper functioning interval. In the transport system, the time travel is specific to a given situation. Therefore, the system is in normal operating mode, if the travel duration “T” is in the interval noted *I*_{T}, Figure 9. The mode is qualified as degraded, if the travel duration belongs to the interval *J*_{T} (*I*_{T} ≠ *J*_{T}). If the travelling time exceeds the upper bound , the system is considered as faulty. As shown in Figure 9, for each travelling and staying times, three time values are defined:(i): the minimum time necessary for the travelling time(ii): the maximum time tolerated for the travelling time(iii): critical time not to exceed (failure occurrence)

Therefore, we can distinguish three types of intervals: a normal operating interval denoted *I*_{T} = , a degraded interval *J*_{T} = , and a faulty interval (Figure 9).

In order to quantify the set of possible duration *q*_{i}, a graphical representation is proposed (Figure 10). The possibility that a time constraint is satisfied belongs to the interval [0, 1]. Consequently, the verification of time constraints can be considered as fuzzy numbers represented by fuzzy membership functions (Figure 10).

These results (Figure 10) make it possible to highlight zones of certainty for travelling durations; a high value of effective sojourn time (*q*_{i} ∈ *I*_{T}) can guarantee a normal behavior of the transport monitored system, and there are no traffic disturbances. Instead, a low value (*q*_{i} ∈ *J*_{T} ∪ ] implies the possibility of detecting behavioral deviation. Based on the fuzzy model (Figure 10), all system scenarios are developed. The scenarios consider all possible deviations. Then, from the fuzzy model, it is possible to deduce a set of scenarios (events sequences) bringing the system to erroneous situations.

#### 5. Monitoring of the Sahel Railway Network

##### 5.1. Introduction

In railway transport system, traffic disturbances will occur if the degradation level exceeds the permissible value. Therefore, monitoring represents all the means implemented (manual or automatic operations, steps, functions, and mechanisms) intended to observe the state of an entity (online and in real time) in order to deal with the vagaries of the system during the operating phase. The role of a monitoring system is to know the state of the process, to provide validated data to the control system, and to improve the availability and safety of the process.

Two types of monitoring can be distinguished: operating system and control monitoring. The operating system monitoring can be broken down into two types: curative and predictive monitoring (Figure 11). The monitoring of the operating system is responsible for monitoring process failures which are classified into two categories: cataleptic failures (sudden and complete) failures and progressive failures (Figure 11).

##### 5.2. Monitoring Principle

In the studied transport system, the monitoring is based on the control object technique. The control objects can be connected to the places of SP-TPN model of the Sahel railway network and can, respectively, be applied to perform checking and validation of the adequateness and correctness of all travelling and parking durations that are introduced in the system.

To restrict the maximum and the minimum time periods, allowed for a particular travelling operation, and Watch-dog control objects can be utilized for the purpose. In this case, if the time restrictions are violated (travelling and staying times), the considered control system is capable to generate an immediate reaction (similar to the alarm cases).

##### 5.3. Constraint Violation and Monitoring Task

In the transport system, the fuzzy models associated with effective sojourn time (*q*_{i}) and the probability density functions (PDF) monitor the system evolutions through the time duration verification (travelling and staying times). These durations represent interval constraints. When the interval constraints are exceeded, there is an error.

An error is defined as a discrepancy between observed or measured value and the true or theoretically correct value or condition. In our study, error means a gap between measured and computed time intervals by the scheduling task.

Based on the above statements, error is sometimes referred to as an incipient failure. Therefore, monitoring action is taken when the system is still in an error condition, i.e., within acceptable deviation and before failure occurs. Thus, this study employs uncertainty of sojourn time and probability density function of the travelling times in order to perform early railway traffic disturbances.

##### 5.4. Stochastic Fuzzy Petri Nets for Monitoring (SFPNM)

Much of development works has been undertaken in certain of the monitoring fields. Monitoring tools have been researched, and their application to failure prevention is well reviewed.

Each input and output places of the proposed SFPNM are associated with a fuzzy description. For the input places, we describe sojourn time of a mark in places and probability density functions (PDF) of the travelling times (Figure 12), whereas the output variables represent the monitoring task. These actions can be slow, normal, or urgent.

In SFPNM, the transitions represent rules in which antecedent propositions implicate consequent propositions, Figure 12. Each rule *“**”* is associated with a certainty factor, which describes the confidence level of the rule.

###### 5.4.1. A Definition of SFPNM

The stochastic fuzzy Petri net for monitoring (SFPNM) is defined as being the *n*-uplet: <P,T, PDF,Q,MT,F, *λ*,*δ*, Ω, *M*_{0}> with the following: : the finite set of input *p*^{x} and output *p*^{y} places. : a collection of transitions. A transition *t*_{i} is specialized in inference/aggregation operations of logic rules. : the finite set of the input variable “probability density function.” : subsets of input variables “sojourn time.” : subsets of output variables “monitoring task.” *Q* (resp., PDF) and MT are subsets of variables that are, respectively, in the antecedence and in the consequence of the fuzzy rules . : : the fuzzy logic rules set. *λ* *=* (*λ*_{11}*, λ*_{12}*, …, λ*_{z1}*, λ*_{z2}*,…, λ*_{ze}): the finite set of membership functions, defined on the universe [0, 1] of the input variables “probability density function,” PDF= (PDF_{1}, PDF_{2},…, PDF_{z}). “*e*” represents the number of input variables Pr. *δ* *=* *(δ*_{11}*, δ*_{12}*, …, δ*_{f1}*, δ*_{f2}*,…, δ*_{fr}*)*: the finite set of membership functions, definite on the universe [0, 1] of the second input variable “sojourn time.” “*r”* is the number of input variables “sojourn time.” Ω *=* *(*Ω_{11}, Ω_{12}*, …,**,*,…, *)*: the finite set of membership functions, definite on the universe [0, 1] of the output variable “monitoring task.” “*s”* is the number of output variables. *M*_{0}: the initial marking of the input places *p*_{i} ∈ *P*^{x}.

#### 6. Illustrative Example

In order to help the supervisor in charge of managing the studied railway networks; i.e., detecting traffic perturbations, alerting travelers’ claims, and maintaining stability and security of the networks, a monitoring task is needed. This section presents an application of the monitoring approach to the railway network between Mahdia and Faculty station (Figure 13).

Let us suppose that we want to supervise the duration between the two events *e*_{1} (metro arrival at Faculty station: place *p*_{6}) and *e*_{2} (departure from Mahdia station: place *p*_{1}) (Figure 13). In the studied railway networks, every sensor provides useful information as events. To monitor this duration, it is necessary to check the time constraint linking the occurrences of the two events *e*_{1} and *e*_{2}. This timing constraint is a global one; therefore, the verification of this constraint can be done through the measure of the travelling time between station and parking time of a metro in stations. As long as these durations are included in the mentioned intervals, no disturbance is detected. Otherwise, a traffic disturbance is detected. The global constraint “C” to compute is an interval constraint defined as *≤* *C ≤* with the following:

According to the time intervals (Figure 13), the minimum time () of the journey between Mahdia and Faculty is 756 s, whereas the maximum time () is 984 s.

Let us suppose a late departure of the metro from Mahdia station (departure at 05 : 26 : 48, see Table 2). This delay disturbance Φ1 (Φ = 108 s) occurred in *p*0 may involve an illegal behavior and can lead to a degraded service (Figure 14). In fact, according to Figure 14, we deduce that the possibility of railway traffic delay is 0.59 (possibility of violation of the global constraint *C*). This delay can affect the stability of the studied railway network: according to Table 2, the metro arrives in the Faculty station with a delay Φ2 equal to 84 s (planned arrival time 05 : 35 : 00/measured arrival time at 05 : 36 : 24).

The computation of the series of travelling and staying times between Mahdia and Faculty station, during a period of several days (from October to November 2020), leads to build probability density functions (PDF) of the travelling times at the considered segment (Figure 14).

The probability density calculation permits to verify at each iteration that the time constraints are respected during several days. The PDF also makes it possible to check the time constraints linking the occurrences of the two events and enable detecting disruptions when these constraints are violated.

The histograms of the collected values allow to built triangular probability density functions (PDF) which can be considered as a fuzzy number (Figures 15(a) and 15(b)). The parameters *α*_{i} and *β*_{i} correspond to the limit values of these histograms.

**(a)**

**(b)**

The mission of the proposed SFPNM associated with the Sahel railway network (Figure 16) is to modify the control models, activate urgent procedures, and decide about the selective monitoring task. These monitoring actions can be slow, normal, urgent, predictive, or curative.

The full set of linguistic variables associated with each input membership is summarized in Table 4.

Similarly, Table 5 shows linguistic variables associated with the output “monitoring action.”

To demonstrate the effectiveness and accuracy of the monitoring approach, an example with three fuzzy rules is outlined. Consider the following fuzzy rules:(i)Rule 1: if the sojourn time *q*_{1.6} ∈ [756, 984] AND the PDF∈ [0.0021, 0.0034], then there is a predictive monitoring(ii)Rule 2: if the sojourn time *q*_{1.6} ∈ [950, 1000] AND the PDF∈ [0.002, 0.0069], then there is a scheduled curative monitoring(iii)Rule 3: if the sojourn time *q*_{1.6} ∈ [350, 534] AND the PDF∈ [0.024, 1], then an urgent monitoring action is required(iv)Each rule use the operator “AND” in the premise, and since it is an AND operation, the minimum criterion is used (Mamdani inference method), and the fuzzy outputs corresponding to these rules are represented in Figure 17.(v)Next, we perform defuzzification to convert our fuzzy outputs to a single number (crisp output); various defuzzification methods were explored; the best one for this particular application: the Center of Area (COA) defuzzifier; according to the COA method, the weighted strengths of each output member function are multiplied by their respective output membership function center points and summed; finally, this area is divided by the sum of the weighted member function strengths, and the result is taken as the crisp outputs

In practice there are two fuzzy outputs to defuzzify (operating system or control monitoring). Analyzing the data, it is noted that the appropriate task is operating system monitoring.

#### 7. Remarks

This monitoring approach can be applied to any discrete event system integrating time constraints (urban, maritime, rail transport networks, manufacturing system with time constraints, etc.). The proposed surveillance approach would lead to more efficient inspection routines and directed anticipatory maintenance trips.

Certainly the approach can be applied to other networks, but it does not cover three aspects:(i)The first is the progression of faults: it is not easy to define, extract, or “quantity” damage; but it may be worthwhile to consider the history of maintenance on a point and other relevant facts.(ii)The second aspect is the deterioration process. It is not possible to wait until the component deteriorates to an unrepairable status because it may be very unsafe when it is working in this condition. Hence, it would be better to repair or replace the components before its deterioration.(iii)The third aspect is the maintenance resources (personal, tools, drawings, spare parts, etc.). When a failure occurs and if drawing, maintenance teams, and tools are ready, the repair work can be started.

#### 8. Conclusion

In this paper, we have proposed a stochastic fuzzy Petri net for monitoring. The new supervision approach is based on the study of effective sojourn time of the token in places and the evaluation of the probability density functions (PDF) of the travelling times. Abnormal behaviors and traffic disturbances are recognized with the cooperation of the sojourn time and PDF and not due to a simple detection based on isolated sites.

Our study makes the assumption that the supervised system is modeled by stochastic timed Petri nets. The proposed SFPNM is able to integrate uncertainty on sojourn time and probability density functions (PDF) of the travelling times related to a base of fuzzy logic rules.

The paper proposes an application of the developed monitoring approach to the realistic railway network. The proposed monitoring model has a double interface, one with the modeling model system and the second one with the behavioral model.

Simulation results of the case study of a part of the Tunisian railway network show that monitoring approach is able to modify the control models, activate urgent procedures, and decide about the selective monitoring task. This monitoring task is based on time constraint verification performed with a probability density function. The results obtained in the illustrative example are promising. They show that the proposed approach improves the prevention of temporal disruption, traffic management by performing an early detection, and can be used to evaluate the influence of different types of disturbances on the expected schedule.

##### 8.1. Suggested Further Work

It is interesting as further research to incorporate the issues of maintenance and repair strategies into the fuzzy probabilistic approach to compute a modified maintenance cost. The development of operating and monitoring algorithms and their implementation on a PLC seems interesting for this rail transport application.

In the railway networks, the travelling times should be within two bounds. Any deviations (occurrence of a temporal disturbance) from the allowed lower (resp., upper) bounds will lead to a low service quality and can lead to disaster scenarios. The proposed monitoring approach have been validated and verified by the real data provided by TNRC which manages the Sahel railway networks.

In this context, we are in the process of developing with the engineers of the railway company a platform (dashboard) allowing the supervision and the selection in real time of the most appropriate maintenance strategy. The developed dashboard permits real-time data display and allows the supervisor to control the train locomotion through a graphical interface. The first test demonstrates that the surveillance approach has the potential to react in real time in order to avoid catastrophic scenarios and to further improve rail safety.

Other perspective of this work is to develop maintenance scheduling. Scheduling involves the allocation of resources to tasks over time subject to temporal and capacity constraints. The notion of maintenance scheduling in railway transport networks refers to the assignment of resources to a task in one or several connected discrete time intervals and a decision-making process with the objective of optimizing one or more targets. In this context, it is interesting to develop a static insertion policy. This procedure allows us to insert the projected maintenance jobs in periods of machine availability, without changing the initial scheduling solution jobs. This method of integration can also integrate unforeseen and urgent recovery job.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.