At present, meta-heuristic algorithms are the most popular methods for the optimization of the operations of reservoirs. In order to avoid inappropriate solutions, i.e. spills occurring when the reservoir is not full, a modified method is proposed that can adjust the trajectories of the particles, using the particle swarm algorithm, according to the operation rule of the reservoir. The method was tested in a case study, and was compared to two commonly used methods for generating particle position vectors. These included the direct method, which uses water supply and water spills as the iteration variables, and the indirect method, which uses water storages (water levels) as the iteration variables. The results showed that the three methods could achieve similar solutions at the 75% probability of exceedance. There was no difference in the convergence speeds or the final objective function values of the three models. However, at the 50% probability of exceedance, the modified method produced results that followed the operation rule of the reservoir, whereas the other two methods could lead to inappropriate water spills. This new method may provide a reference for other meta-heuristic algorithms in models of the optimal operation of reservoirs.