2.3.1. Coding

Each individual is randomly assigned a value of 0 or 1 to generate multiple sets of initial solutions. The decoding domains of all initial solutions must fit various design requirements (e.g., the frequency range for a water pump is between 40 and 60 Hz). The solutions are coded using a user operating model, as presented in Figure 3.


**Figure 3.** Individual gene coding in genetic algorithm.

#### 2.3.2. Fitness Value Calculation and Reproduction Mechanism

Individuals in an initial population are substituted into a target function to calculate a fitness value. The aim of the target function is to obtain the minimum total power consumption of the water system. The total power consumed by the water system is composed of the power consumed by the cooling machine, water pump, and cooling tower. The power consumed by the cooling tower and water pump can be calculated according to the operating frequency, whereas the power consumed by the cooling machine can be calculated using a multiple linear regression model. Such a model can be established by referring to various water system parameters, including chilled water input and output temperatures, chilled water flow, cooling water input and output temperatures, cooling water flow, cooling machine power consumption, water pump frequency, and outdoor temperature and humidity. Furthermore, such a model can be used to estimate the e ffects of control conditions in di fferent environments on the power consumption of the cooling machines. The reproduction mechanism involves the application of roulette wheel selection, in which each feasible solution is assigned a roulette wheel slot whose area is proportional to the fitness value of the solution. Thus, a solution with a high fitness value has a high probability of being selected. A power consumption model for chilled water systems applies principal component analysis to select the most influential parameters to establish a regression model for evaluating the power consumption of such systems. Such a model is presented in Equation (8):

$$k\mathcal{W}\_{\rm chi} = a(\textit{Tin}\_{\rm chi}) - b(\textit{Tout}\_{\rm chi}) + \varepsilon(\textit{Tin}\_{\rm cw}) - d(\textit{Tout}\_{\rm cw}) - \varepsilon(\textit{Tout}) - f(\textit{Hout}) \tag{8}$$

where *a*, *b*, *c*, *d*,*e*, and f represent regression parameters; *Tinchi* represents chilled water input temperature; *Toutchi* represents chilled water output temperature; *Tincw* represents cooling water input temperature; *Toutcw* represents cooling water output temperature; *Tout* represent outdoor temperature; and *Hout* represents outdoor humidity.
