## 4 Case Study and Hybrid Modelling
### Simulation Execution of the Hybrid Monte Carlo Simulation Algorithm  
This section describes the results of single iteration of the simulation process for the use case described in Section 4.1. As explained in the previous section, the Discrete Event Table is initialized in Block.2 at the beginning of each iteration. For instance, Table 3 shows the main data-points event times of the \(i\)th jobs of a generic iteration, which are sampled using the inverse functions of Equations (11) and (12). From Block.4, the continuous simulation starts, and Table 4 shows the evolution of the system that, among other things, depends on the physical mechanical equations of the system. The instantaneous dynamic failure rates are updated at any \(\Delta\Gamma\). Let's explain the meaning of each column for a better understanding of the paper. * The column SimTime represents the time of simulation that increases according to the integration time step (\(\Delta\)tsim). * The column \(\Delta\Gamma\) is the instantaneous failure rate of the machine tool, computed using Equation (16). * The column \(\alpha\)(T) is the expected mean life of the machine tool, computed using Equation (17). * The column T(t) is the working temperature, computed using Equation (18). * The column \(\Gamma\) is the integral of the instantaneous failure rate functional. * The column rand_num samples a uniform real random number in [0,1] to perform the failure test. Therefore, in the failure test column is indicated the result performed in Block.9 to verify whether the machine tool of the service station becomes broken (Failure_Test = True) at that time point:  
\[\text{Failure Test }=\left\{ \begin{array}{ll}\text{False},&\quad\text{if e}^{- \Gamma}<\text{rand\_num}\\ \text{True},&\quad\text{if e}^{-\Gamma}\geq\text{rand\_num}\end{array} \right. \tag{21}\]  
As shown in Table 3, it is possible to see that the Job 1 would require 94 hours to complete (see the \(\mathfrak{t}_{\text{sm}}\) column). From the evolution of the Time-Driven Table (Table 4), it is possible to notice that at time 80 h the machine tool becomes broken (see column \"Failure Test\" \(\rightarrow\) True), and it resumes after 7 h. Therefore, the next row of the Time-Driven Table has the value SimTime = 87 h. In the end, the Job 1 completes at time SimTime = 101 h (see column \"Job Complete\" True) so that the algorithm executes in Block.4 the next job. During that interval, the machine has gone under repair, Block.10; the simulation parameters are updated (Block.6), and the next time of failure for the service station is computed (Block.7 to Block.9). Otherwise, if the service station is functioning, the simulation process keeps verifying when the ith job has completed in Block.11. If it is not completed, the parameters are updated in the Block.6; otherwise, in Block.12, the simulation engine checks whether the jobs scheduled in Table 3 are completed. If there are other jobs to process, the simulation starts back from the Block.4; otherwise, the run of the simulation is complete. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**SimTime** & **T(t)** & **\(\alpha\)(T)** & **\(\Gamma\)** & **Random** & **Failure** & **Job** \\  & [\({}^{\circ}\)C] & **[h]** & **\(\Delta\Gamma\)** & \(\Gamma\)** & **Number** & **Test** & **Complete** \\ \hline
**0** & 20.0 & 100.0 & - & 0.000 & 0.3834 & False & False \\
**1** & 21.3 & 93.9 & \(1.09\times 10^{-5}\) & \(1.086\times 10^{-5}\) & 0.3831 & False & False \\
**2** & 22.5 & 88.9 & \(2.14\times 10^{-5}\) & \(3.222\times 10^{-5}\) & 0.9560 & False & False \\
**3** & 23.5 & 85.0 & \(3.42\times 10^{-5}\) & \(6.644\times 10^{-5}\) & 0.1671 & False & False \\  & & & & & & & False \\
**80** & 24.3 & 82.2 & \(9.13\times 10^{-5}\) & \(2.52\times 10^{-2}\) & 0.0126 & True & False \\
**87** &... &... &... &... &... & False & False \\  & & & & & & & False \\
**101** &... &... &... &... &... & True \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Time-Driven Table of the generic iteration (run) of the simulation process.