  A new stochastic control problem of a dam-reservoir system installed in a
river is analyzed both mathematically and numerically. Water balance dynamics
of the reservoir are piece-wise deterministic and are driven by a stochastic
regime-switching inflow process. The system is controlled to balance among the
operation purpose and the internal and downstream environmental conditions.
Finding the optimal operation policy of the system reduces to solving an
optimality equation with a discontinuous Hamiltonian, which is a system of
nonlinear degenerate parabolic (or hyperbolic) equations. We show that the
optimality equation has at most one constrained viscosity solution and find the
solution explicitly under certain conditions. The model is applied to numerical
computation of the operation policy of an existing dam-reservoir system using a
high-order finite difference scheme. The computational results can suggest how
the operation policy should be adapted according to the environmental concerns
of the river.
