Although it is possible to have singular subarcs in time-optimal contr
ol, in most of the time interval the control is bang-bang in nature. W
e therefore apply iterative dynamic programming to search simultaneous
ly for the switching times and for the values for control. Instead of
using stages of equal length, we use stages of varying length so that
switching times can be accurately determined. Computations based on th
ree examples show that the optimal control policy can be obtained with
out difficulty even when the system equations are highly nonlinear. Th
e computational procedure is straightforward. and the computations can
be readily carried out on a personal computer.