  This paper proposes a new indirect solution method for solving
state-constrained optimal control problems by revisiting the well-established
optimal control theory and addressing the long-standing issue of discontinuous
control and costate due to pure state inequality constraints. It is well-known
that imposing pure state path constraints in optimal control problems
introduces discontinuities in the control and costate, rendering the classical
indirect solution methods ineffective to numerically solve state-constrained
problems. This study re-examines the necessary conditions of optimality for a
class of state-constrained optimal control problems, and shows the uniqueness
of the optimal control input that minimizes the Hamiltonian on constrained
arcs. This analysis leads to a unifying form of optimality necessary conditions
and thereby address the issue of discontinuities in control and costate by
modeling them via smooth functions, transforming the originally discontinuous
problems to smooth two-point boundary value problems (TPBVPs), which can be
readily solved by existing nonlinear root-finding algorithms. The proposed
solution method is shown to have favorable properties, including its anytime
algorithm-like property, which is often a desirable property for
safety-critical applications, and numerically demonstrated by an optimal
orbital transfer problem.
