## 2 Materials and Methods
### Mathematical Model Development
#### 3.3.2 Optimisation and Authentication of Process Parameters and Responses  
The final step in the modelling process was to optimise the model to determine the optimal input factors based on the desired objectives for each response (Table 7). The available objectives include maximising, minimising, targeting a specific value, staying within a range, none (for responses only), and setting an exact value (for factors only). A minimum and maximum value must be specified for each parameter. In addition, a weight can be assigned to each goal to customise the shape of the respective desirability function. The \"importance\" of each goal can be adjusted in relation to the others. By default, all goals are considered equally important, with a setting of 3 plus points (+++). If a goal is more important, it can be set to 5 plus points (+++++).  
The goals are combined into a general desirability function that the programme tries to maximise. The optimisation process begins with a random starting point and proceeds via the steepest slope to reach the maximum. The search can start from several points within the design space to increase the chances of finding the \"best\" local maximum. The default is 30 starting points, which can be adjusted as required.  
Desirability is an objective function that ranges from 0, indicating values outside the acceptable limits, to 1, representing the target value. Numerical optimisation searches for a point that maximises this desirability function. The characteristics of each objective can be adjusted by changing its weighting or importance. When multiple responses and factors are involved, all objectives are combined into a single desirability function. It is important to note that achieving a high desirability score is not always necessary. The desirability value depends entirely on how close the lower and upper limits are to the optimum. The goal of optimisation is to determine a set of conditions that satisfy all objectives, rather than aiming for a desirability value of 1.0. Desirability is a mathematical tool used to find the optimal conditions.  
Table 8 shows the number of solutions obtained based on the specified criteria and constraints. In this case, only three solutions fulfil the desirability criteria, and the highest solution is selected.  
Figure 9 shows a graph of desirability-generated selected solutions obtained through numerical optimisation.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Name** & **Goal** & **Lower Limit** & **Upper Limit** & **Lower Weight** & **Upper Weight** & **Importance** \\ \hline A–pH & is in range & 3 & 7 & 1 & 1 & 3 \\ \hline B–\(t\) (min) & is in range & 10 & 50 & 1 & 1 & 3 \\ \hline C–\(i\) (A cm\({}^{-2}\)) & is in range & 0.008 & 0.024 & 1 & 1 & 3 \\ \hline \(T\) (\({}^{\circ}\)C) & target (30) & 22 & 35 & 1 & 1 & 3 \\ \hline pH & target (7) & 6 & 8 & 1 & 1 & 4 \\ \hline \(c\) (mmol L\({}^{-1}\)) & minimise & 0.0003 & 0.0367 & 1 & 0.1 & 5 \\ \hline \end{tabular}
\end{table}
Table 7: Constraint table with goals and limits for all factors.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Number** & **pH** & \begin{tabular}{c} **\(t\)** \\ **(min)** \\ \end{tabular} & \begin{tabular}{c} **\(i\)** \\ **(A cm\({}^{-2}\))** \\ \end{tabular} & \
\begin{tabular}{c} **T (\({}^{\circ}\)C)** \\ \end{tabular} & **pH** &
\begin{tabular}{c} **\(c\) (mmol L\({}^{-1}\))** \\ \end{tabular} & **Desirability** \\ \hline
1 & 3.3696 & 18.741 & 0.016 & 30.000 & 7.000 & 0.016 & 0.976 & Selected \\ \hline
2 & 3.000 & 46.592 & 0.008 & 28.404 & 7.000 & 0.011 & 0.932 & \\ \hline
3 & 3.048 & 45.027 & 0.008 & 38.303 & 7.000 & 0.012 & 0.927 & \\ \hline \end{tabular}
\end{table}
Table 8: Obtained solutions depending on set criteria and constraints.