In this paper, we consider a class of optimal control problems in whic
h the dynamical system involves a finite number of switching times tog
ether with a state jump at each of these switching times. The location
s of these switching times and a parameter vector representing the sta
te jumps are taken as decision variables. We show that this class of o
ptimal control problems is equivalent to a special class of optimal pa
rameter selection problems. Gradient formulas for the cost functional
and the constraint functional are derived. On this basis, a computatio
nal algorithm is proposed. For illustration, a numerical example is in
cluded.