On the optimal control of a hydroelectric power plant