Dynamic Programming: Reservoir operation problem