**2.1. Objective function**

The search for the optimal control settings of pumps in a real drinking network system is seen as a problem of high complexity, due to the fact that it involves a high number of deci‐ sion variables and several constraints, particular to each system. The decision variables are the operational states of the pumps xt (x 1t, x 2t, …, x Nt), where N represents the number of pumps and t is the time-step throughout the operational time.

To represent the states of the decision variables in each time-step, the binary notation was used. The configuration of each pump is represented by a bit where 0 and 1 stated switch‐ ed on and off, respectively. The main goal of the model is to find the configuration of the pumps' status which proceeds to the lowest energy cost scenario for the operational time duration. To calculate this cost, several variables must be considered, in each time-step, such as the variation of consumption, energy tariff pattern and the operational status of each pump.

The objective function is the sum of energy consumed by the pumps, in every operational time, due to the water consumption and tanks' storage capacity. It can be expressed accord‐ ing to the following equation:

$$\text{Minimize } \sum\_{n=1}^{N} \sum\_{t=1}^{24} \mathbb{C}\_{nt} E\_{nt}(X\_{nt}) [1] \tag{1}$$

where E and C stated the consumed energy (kWh) and the energy costs by pumps' opera‐ tion in the time-step t.
