The Extended Ritz Method Versus Dynamic Programming in Water Reservoirs Management Under Uncertainty