## 3 Optimization of the PMPP
### Algorithms Used to Solve the PMPP in the Numerical Example
#### 3.2.5 Random Search Method  
* Sample a new position \(\mathbf{x_{k}}\) from the hypersphere of a given radius surrounding the current position \(\mathbf{x}\).
- If \(f(\mathbf{x_{k}})<f(\mathbf{x})\), then move to the new position by setting \(\mathbf{x}=\mathbf{x_{k}}\).
* **Numerical Results** When we apply the random search method to the numerical example, we obtain the following results:  
Table 8 summarizes the results obtained for each method presented in this section. We calculate the relative gap between the best solution and the solution found from each used method. We note the relative gap as follow:  
\[\mathrm{GAP}=\frac{\mathrm{HeuristicSolution}-\mathrm{OptimalSolution}}{ \mathrm{OptimalSolution}}\]  
Based on the results obtained (Table 7), using a medium data size, we observe that the differential evolution method provides the best production plan and the best number of preventive maintenance  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \(k\) & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \(U(k)\) & 12 & 12 & 11 & 5 & 11 & 4 & 13 & 10 & 10 \\ \(k\) & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 \\ \(U(k)\) & 11 & 1 & 11 & 15 & 10 & 13 & 11 & 4 & 13 \\ \(k\) & 18 & 19 & 20 & 21 & 22 & 23 & & & \\ \(U(k)\) & 2 & 10 & 13 & 3 & 10 & 4 & & & \\ \hline \hline \end{tabular}
\end{table}
Table 7: Optimal production plan yielded by the random search method.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Total Cost (mu)** & \(\mathbf{N^{*}}\) & **Execution Time (s)** & **GAP** \\ \hline Exact Method & 22,281.25 & 3 & 0.01 & 0 \\ Nelder–Mead & 315,483.7 & 2 & 12.93 & 13.16 \\ Differential Evolution & 23,379.85 & 2 & 9.18 & 0.046 \\ Simulated Annealing & 31,820.01 & 2 & 5.72 & 0.43 \\ Random Search & 386,743.62 & 2 & 404.67 & 16.36 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Comparative summary of the performance of the used methods.  
actions compared with the other algorithms (simulated annealing, random search, and Nelder-Mead) in order to obtain the best cost with a minimal execution time that gives the minimal GAP. Therefore, our results echo what many types of research have observed. In fact, [PERSON] [41] mentioned that Nelder-Mead is not a true global optimization algorithm, although, in practice, it gives good results for problems that do not have many local minima. Regarding the random search method, its significant inconvenience is that the execution time increases exponentially with the problem size [42]. On the other hand, the differential evolution algorithm is applied in solving complex optimization problems according to its effectiveness and efficiency and robustness in a wide variety of applications. The importance of DE is its ability to handle non-differentiable, nonlinear, and multimodal objective functions; it mostly converges to the optimal solution, and uses few control parameters. For simulated annealing, its main advantage is the ability to get out of a local minimum, based on an acceptance probability related to an exponential function, called transformation Gibbs-Boltzmann [43].  
Based on this numerical example, we can conclude that if we need to increase the data size, the exact method may not lead to optimal solutions. Thus, we adopt the differential evolution method for our problem, since it gives the minimal GAP.  
In the next section, we relax our problem by adding other constraints and another hypothesis. We tried to calculate the risk of loss profit using the results found by the different methods used in this section.