## 2 Materials and Methodology
### Artificial Intelligence Method  
The aim of this paper is to create an intelligent structure that is able to indicate the most adequate actuator parameters in order to have the most efficient desalination operation. To achieve this, first, it is necessary to obtain a table with the best values of the parameters from Table 2 and to establish limits for the daily amount of permeate water, permeate conductivity, and total energy consumption. The first requirement involves the amount of water produced in 24 h (as per the vessel's needs) and is obtained from the permeate flow rate. In this study, the daily water for the crew was set at between 70 to 100 m\({}^{3}\) per day. Regarding permeate conductivity, in this case, a maximum lower than those recommended by the WHO's GDWQ was chosen, since water could be utilized for several needs, including use by the crew; specifically, it was set to between 520 and 680 \(\mu\)S/cm. Finally, the total energy consumption of the plant was fixed between 6.5 and 10 kWh, since the principal objective of this research is to achieve the highest possible energy savings in a marine vessel. Having set these requirements, a cost function was defined to obtain the remaining variables based on a weight distribution. As mentioned above, the total energy consumption is considered the priority, and was thus assigned 50% of the cost function. The daily amount of permeate water was set at 20%, and permeate conductivity at 30%. By changing these proportions of the cost function or adding new parameters, such as seawater temperature, this method can be extrapolated to different marine vessels. At this point, the established requirements and the cost function defined generate the optimal values, reducing Table 2 from 1149 to 828 samples whose values satisfy the specified requirements. In what follows, this subset of values that meet the specified requirements will be called the \"table of optimal values\". Furthermore, it is important to note that the cost function used has weighted the term corresponding to the energy requirements at a high percentage compared to the other requirements, since energy savings is a fundamental factor to optimize the total energy consumption in a ship. The flow chart in Figure 3 shows the steps followed up to now, where the last one, corresponding to the application of an artificial intelligence technique, specifically a Genetic-Neuro Fuzzy process, will be described below. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Sample** & **Searwater pH** & **Searwater Conductivity (mS/cm)** & **Feed Flow Rate (m\%/h)** & **HPP Outlet Pressure (Bar)** & **Permeate Conductivity (\(\mu\)S/cm)** & **Permeate (m\%/h)** & **Total Energy Flow Rate (kWh)** \\ \hline
1 & 6.85 & 54.5 & 8.13 & 53.8 & 669 & 3.23 & 6.712 \\ \hline... &... &... &... &... &... &... \\ \hline
300 & 6.86 & 54.2 & 8.11 & 53.7 & 661 & 3.32 & 6.684 \\ \hline... &... &... &... &... &... &... \\ \hline
500 & 6.87 & 53.6 & 9.18 & 55.2 & 592 & 3.63 & 7.794 \\ \hline... &... &... &... &... &... &... \\ \hline
580 & 6.85 & 53.6 & 9.81 & 56.2 & 561 & 3.89 & 8.568 \\ \hline... &... &... &... &... &... &... \\ \hline
660 & 6.85 & 54.1 & 8.8 & 54.7 & 619 & 3.57 & 7.393 \\ \hline... &... &... &... &... &... &... \\ \hline
1149 & 6.85 & 54.6 & 8.13 & 53.6 & 658 & 3.24 & 6.678 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sample of the data recorded during a 24-h measurement. The last step shown in Figure 3 is to build an intelligent control system. The training-based technique chosen in this work is a Genetic Neuro-Fuzzy (GNF) system [21; 22]. As shown in Figure 4, a three-layer system with a structure equivalent to the one proposed by [PERSON] [23] has been implemented. The first layer of the system corresponds to GNF inputs and each one represents the membership functions. Equation (1) represents the outputs of this first layer.