Nonlinear chance-constrained problems with applications to hydro scheduling