Initially, the process starts from a swarm of particles, in which each of them contains a solution to the hydraulic problem that is generated randomly, and then one searches the optimal solution by iteration. The i -th particle is associated with a position in an s-dimensional space, where s is the number of variables involved in the problem; the
values of the s variables which determine the position of the particle represent a possible solution of the optimization problem. Each particle i is completely determined by three vectors: its current position Xi , its best position reached in previous cycles Yi , and its velocity Vi