Prev Next rec_objective

@(@\newcommand{\B}[1]{{\bf #1}} \newcommand{\R}[1]{{\rm #1}}@)@
Record the Control Objective

Syntax
control::rec_objective(F_funJdelta_tq)

Prototype

template <class Base> void
rec_objective(
     CppAD::ADFun<Base>&             F_fun   ,
     size_t                          J       ,
     const Base                      delta_t ,
     const VECTOR(Base)&             q       )

F_fun
The objective function @(@ F : \B{R}^{2 \times J} \times \B{R}^{4 \times J} \rightarrow \B{R} @)@ is stored in F_fun . We use u to denote an F_fun argument vector (size 6*J ) and v a result vector (size one); e.g.,
     
v = F_fun.Forward(0, u)

J
is the number of time points in the control problem.

delta_t
is the step size between time points.

q
Is the objective weights for the components of the final state vector in the control problem.

x
For @(@ i = 0, 1 @)@ and @(@ j = 0, \ldots , J-1 @)@, @[@ u_{j * 2 + i} = x_{i,j} @]@

y
For @(@ i = 0, \ldots, 3 @)@ and @(@ j = 0, \ldots , J-1 @)@, @[@ u_{2 * J + j * 4 + i} = y_{i,j} @]@

L
For @(@ i = 0, \ldots, 3 @)@ and @(@ j = 0, \ldots , J-1 @)@, @[@ v_{j * 4 + i} = L_{i,j} @]@
Input File: src/control.hpp