Optimal management of pumped hydroelectric production with state constrained optimal control