  We consider a general class of Dynamic Programming (DP) problems with
non-separable objective functions. We show that for any problem in this class,
there exists an augmented-state DP problem which satisfies the Principle of
Optimality and the solutions to which yield solutions to the original problem.
Furthermore, we identify a subclass of DP problems with Naturally Forward
Separable (NFS) objective functions for which this state-augmentation scheme is
tractable. We extend this framework to stochastic DP problems, proposing a
suitable definition of the Principle of Optimality. We then apply the resulting
algorithms to the problem of optimal battery scheduling with demand charges
using a data-based stochastic model for electricity usage and solar generation
by the consumer.
