This article concerns the problem of computing solutions to state-constrained
optimal control problems whose trajectory is affected by a flow field. This
general mathematical framework is particularly pertinent to the requirements
underlying the control of Autonomous Underwater Vehicles in realistic scenarii.
The key contribution consists in devising a computational indirect method which
becomes effective in the numerical computation of extremals to optimal control
problems with state constraints by using the maximum principle in Gamkrelidze's
form in which the measure Lagrange multiplier is ensured to be continuous. The
specific problem of time-optimal control of an Autonomous Underwater Vehicle in
a bounded space set, subject to the effect of a flow field and with bounded
actuation, is used to illustrate the proposed approach. The corresponding
numerical results are presented and discussed.