## 4 Case Study and Hybrid Modelling
### Simulation Algorithm of the Hybrid Dynamic Queueing System
For the example of Figure 5(a), the component has reached the failed state in four out of the total six runs before \"t\"--therefore, the unreliability of the system, \(\rm F(t)=4/6\). With regard to the second, with reference to Figure 5(b), modelling the failure rate evolution enables one to calculate the instantaneous reliability R(T) as the probability that the component survives over the next times step \(\Delta\)T. If the jump from one time step to another can be written with a mathematical functional \(\Gamma(\rm F,\,t,\,\cdot)\), which is a combination  
Figure 5: Number of entities in the system versus time. Figure 6: Instance runs for failure analysis of a component with state (**a**) and failure rate (**b**). of dynamic failure rates and deterministic (mechanical) system equations (with this latter taking into account the dynamic change of the component's failure behaviour and the working conditions), it is possible to build a hybrid distribution function that overcomes the limitation of the hypotheses HP3, HP4 and HP5. This type of modelling reconfigures a reliability problem into a Dynamic Reliability problem where \(\Gamma\) is a mathematical functional that depends on the stochastic distribution function of the failure rate F, the time variable t and (\(\cdot\)) which represents all the other physical parameters included in the mechanical relationship. Moreover, for this type of problem, the numerical integration of the functional is carried on through adopting a time-step integration \(\Delta t_{\text{sim}}\). For the proposed case study, the time-step integration, \(\Delta t_{\text{sim}}\), has been set to 1 h and the dynamic failure rate functional that depends on the environmental temperature can be written as follows:  
\[\Delta\Gamma_{i}=\frac{\beta}{\alpha_{i}}\Bigg{[}\left(\frac{t}{a_{i}}\right) ^{\beta-1}-\left(\frac{t-\Delta t_{sim}}{\alpha_{i}}\right)^{\beta-1}\Bigg{]} \tag{16}\]  
\[\alpha_{i}= \begin{cases}\alpha_{i}=\alpha_{0}\frac{T_{0}}{T_{i}}\,\ \ if\ T_{i}>T_{0}\\ \\ \alpha_{0}\,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ otherwise\end{cases}  \tag{17}\]  
\[T_{i}=Tm+A_{T}\sin\left(\frac{2\pi}{T}i\right) \tag{18}\]  
The numerical integration of the functional \(\Gamma\) can be computed using the following formula:  
\[\Gamma_{i+1}=\Gamma_{i}+\Delta\Gamma_{i} \tag{19}\]  
In order to overcome the hypothesis HP6, the restoration of a component can be modelled by sampling the generic repair distribution which will give the time-point at which the repair transition occurs and bring the component back to the functioning state (i.e., as good as new with a corrective maintenance policy). Therefore, in the repairable queue system, whenever the manufacturing station goes into the failed state, it is possible to assume that during the unavailable state, the queueing system cannot continue its processing (and thus decreases the number of items in the queue), but, eventually, it can be subject only to the arrival of new items. Only when the manufacturing station gets restored, the provision of service will start again. By assuming a general probability distribution of repair, it is possible to write the general discrete equation of the equipment unavailability that can be expressed as the ratio of the total accidental shutdown time over the total task time [31]:  
\[U_{i+1}=\frac{\mathbb{E}\big{(}\tau_{u}^{min}\big{)}\ \mathbb{E}(\sum_{0}^{i+1} \Gamma_{i+1})+\mathbb{E}\Big{(}\tau_{p}^{min}\Big{)}}{i\ast\Delta\Gamma+ \mathbb{E}\Big{(}\tau_{p}^{min}\Big{)}} \tag{20}\]  
where \(\mathbb{E}\big{(}\tau_{u}^{min}\big{)}\) is the expected value o on the jobs scheduling for the minimal repair duration, \(\mathbb{E}\Big{(}\tau_{p}^{min}\Big{)}\) is the expected value of the planned maintenance duration, \(\mathbb{E}(\sum_{0}^{i+1}\Gamma_{i+1})\) is the the expected number of failures in the (i + 1)th timestep.