**5. Performance evaluation with simulation**

Real systems are large and complex and so are the Petri nets used for their modelling and analysis. As the model complexity increases, the use of analytical techniques for analysis and performance evaluation becomes harder for many real-life applications or case studies. Despite the many free software tools available for Petri nets simulation and analysis, we had to develop our specific simulation tool in order to validate and analyze the performance of the models presented in this chapter. In fact, the "marking dependent weights" concept, which is an important feature to model self-service public bicycle systems, does not exist anywhere in the existing Petri nets simulation tools.

Our simulation tool has been developed by exploiting the *BDSPN* simulator recently realized by us [17]-[6] for the simulation of *BDSPN* models developed for the modelling and performance evaluation of inventory control systems and logistic systems where we also used the "marking dependent weights" concept. The developed simulation tool provides functions for calculating some important perfomance indices of the Petri net model. These indices can then be mapped to the system's performance indices by the modeler. At the end of the simulation, some performance indices for places and transitions can be obtained. Some of them are formulated and interpreted for the performance evaluation of PBS systems as follows:

a. Average number of tokens in a place P (Mavr(P)):

482 Petri Nets – Manufacturing and Computer Science

presented with one redistribution vehicle.

**Figure 10.** The "bicycle flows" subnet.

**5. Performance evaluation with simulation** 

anywhere in the existing Petri nets simulation tools.

In the presented Petri net model (for three stations), we used a single redistribution vehicle for the control of the stations. Obviously, in practice, for a system with *N* stations implemented in a given city, the regulation can be performed by several redistribution vehicles which can be affected to different districts of the city. Thus, in the Petri net model, several redistribution vehicles and their circuits can be represented similarly to the example

Real systems are large and complex and so are the Petri nets used for their modelling and analysis. As the model complexity increases, the use of analytical techniques for analysis and performance evaluation becomes harder for many real-life applications or case studies. Despite the many free software tools available for Petri nets simulation and analysis, we had to develop our specific simulation tool in order to validate and analyze the performance of the models presented in this chapter. In fact, the "marking dependent weights" concept, which is an important feature to model self-service public bicycle systems, does not exist

Our simulation tool has been developed by exploiting the *BDSPN* simulator recently realized by us [17]-[6] for the simulation of *BDSPN* models developed for the modelling and performance evaluation of inventory control systems and logistic systems where we also used the "marking dependent weights" concept. The developed simulation tool provides functions for calculating some important perfomance indices of the Petri net model. These indices can then be mapped to the system's performance indices by the modeler. At the end

$$M\_{avr}(P) = \frac{\sum M(P) \ast \tau}{T\_s} \tag{5}$$

where *M(P)* is the number of tokens at the beginning of the cycle; *Ts* is the total simulation time and is the duration of the cycle. This performance indice can be used particulary to get the mean number of bicycles in each station *Si* and in the regulation vehicle(s) by computing the average marking of the corresponding places *PSi* and *PRi*.

b. Mean sojourn time of tokens in a place (Savr(P)):

$$S\_{avr}(P) = \frac{\sum M(P) \* \tau}{N\_t} \tag{6}$$

where *Nt* is the number of different tokens that have passed through the place until the current cycle. The value of *Nt* can be obtained by incrementing a counter each time an input transition fires and put tokens in the place. *M(P)* is the number of tokens in the place *P* and is the duration of the cycle. By calculating the mean sejourn times of the places *PSi*, we get important informations about the the turnover (rotation) of bicycles between the different stations of the transport network.

c. Effective firing rate of a transition T (Favr(T)):

$$F\_{avr}(T) = \frac{NF(T)}{T\_s} \tag{7}$$

where *Ts* is the total simulation time; *NF(T)* is the number of firings of the transition. The firing rates of some transitions of the Petri net model, such as the transitions *TRi*, *TSi*, and *TRij*, measure some operations rates of the regulation function in order to quantify the dynamics of the system or some rates of specific activities.

d. Rates of empty and full places (REmpty(P); RFull(P)):

$$R\_{empty\%}(P) = 100 \cdot \frac{T\_s - \sum (\tau\_k - \tau\_{k+1})\_{\lambda \ell(P) = 0}}{T\_s} \tag{8}$$

$$R\_{full\text{(\%)}}(P) = 100 \cdot \frac{T\_s - \sum (\tau\_k - \tau\_{k+1})\_{M(P) = C\_P}}{T\_s} \tag{9}$$

where *Ts* is the simulation time (*Ts* ); (k - k+1) represente the the duration of the cycle where the place *P* is empty (resp. full) (i.e., *M(P)* = 0 resp. *M(P)* = *Cp* where *Cp* is the capacity of the place *P*). The performance indices are particularly interesting to measure the rates of two uncomfortable situations that can occur in the system. That is the case of empty and full stations which have necessary to be avoided.

Petri Nets Models for Analysis and Control of Public Bicycle-Sharing Systems 485

Configuration Of The Initial Marking Of The Model M0(PS1) M0(PS2) M0(PS3) M0(PR1) M0(PR2) M0(PR3) 15 15 15 10 0 0 M0(PS1) M0(PS2) M0(PS3) M0(PR1) M0(PR2) M0(PR3) 0 0 0 0 0 0 Configuration Of The Parameters Ri And Ci Of The Petri Net Model R1 R2 R3 C1 C2 C3 10 10 10 20 20 20 Configuration Of The Transitions Of The Model TS11 TS12 TS13 TS21 TS22 TS23 E, C, 20 E, C, 5 E, C, 10 E, C, 5 E, C, 20 E, C, 5 TS31 TS32 TS33 TR1 TO1 TS1 E, C, 10 E, C, 5 E, C, 20 E, C, 3 I, 0 E, C, 3 TR2 TO2 TS2 TR3 TO3 TS3 E, C, 3 I, 0 E, C, 3 E, C, 3 I, 0 E, C, 3 TR12 TR23 TR31 TE1 TE2 TE3 E, C, 15 E, C, 15 E, C, 15 I, 0 I, 0 I, 0

Considering all the parameters of this configuration, evolution graphs and some performances of the system can be established thanks to our simulation tool. We focus our attention on the behavior of the time evolution of the number of available bicycles in the stations which can be observed in Figure 11. According to the control function integrated in the model, it can be observed that the number of bicycles (marking the places *PSi*) in the three stations "oscillates" around the reorder point *Ri* (=10) and the capacity *Ci* (= 20) of each station is respected. Obviously, the dynamic behavior of this part of the system is similar to

As shown in Figure 12, the dynamic behavior of the redistribution vehicle can also be observed through the time evolution of the marking of the places *PRi* together. For the chosen parameters of the system, we see that there are always enough bicycles in the

As defined previously, in this configuration, we consider the dynamic model without the regulation system. Here, the initial markings of all the places *M(PRi)* are equal to zero. That is the only modification to be made in the Table 6 to obtain this situation. Thanks to this change, the redistribution vehicle path and all of the control function of each station are not available in the Petri net model (see Figure 6). Formally, for *M(PRi) = 0* and *M(PCi) = 0*, the transitions *TEi, TSi, TOi, TRi* (control function) and *TRij* (displacement of the redistribution vehicle) are never enabled for this configuration. Consequently, the stations remain

**6.2. Simulation of the PBS model under the configuration (b)** 

**Table 6.** Configuration data of the Petri net model

the one of inventory control systems [17].

operationnal for users but whitout any control.

redistribution vehicle.
