Prev Next Index-> contents reference index search external Up-> CppAD Appendix deprecated cppad_ipopt_nlp ipopt_nlp_ode ipopt_nlp_ode_simple deprecated-> include_deprecated FunDeprecated CompareChange omp_max_thread TrackNewDel omp_alloc memory_leak epsilon test_vector cppad_ipopt_nlp old_atomic zdouble autotools cppad_ipopt_nlp-> ipopt_nlp_get_started.cpp ipopt_nlp_ode ipopt_ode_speed.cpp ipopt_nlp_ode-> ipopt_nlp_ode_problem ipopt_nlp_ode_simple ipopt_nlp_ode_fast ipopt_nlp_ode_run.hpp ipopt_nlp_ode_check.cpp ipopt_nlp_ode_simple-> ipopt_nlp_ode_simple.hpp Headings-> Purpose Argument Vector Objective Function Initial Condition Constraint Trapezoidal Approximation Constraint Source

ODE Fitting Using Simple Representation

Purpose
In this section we represent the objective and constraint functions, (in the simultaneous forward and reverse optimization problem) using the simple representation in the sense of cppad_ipopt_nlp.

Argument Vector
The argument vector that we are optimizing with respect to ( $x$ in cppad_ipopt_nlp ) has the following structure $$x = ( y^0 , \cdots , y^{S(Nz)} , a )$$ Note that $x \in \B{R}^{S(Nz) + Na}$ and $$\begin{array}{rcl} y^i & = & ( x_{Ny * i} , \ldots , x_{Ny * i + Ny - 1} ) \\ a & = & ( x_{Ny *S(Nz) + Ny} , \ldots , x_{Ny * S(Nz) + Na - 1} ) \end{array}$$

Objective Function
The objective function ( $fg_0 (x)$ in cppad_ipopt_nlp ) has the following representation, $$fg_0 (x) = \sum_{i=1}^{Nz} H_i ( y^{S(i)} , a )$$

Initial Condition Constraint
For $i = 1 , \ldots , Ny$, we define the component functions $fg_i (x)$, and corresponding constraint equations, by $$0 = fg_i ( x ) = y_i^0 - F_i (a)$$

Trapezoidal Approximation Constraint
For $i = 1, \ldots , S(Nz)$, and for $j = 1 , \ldots , Ny$, we define the component functions $fg_{Ny*i + j} (x)$, and corresponding constraint equations, by $$0 = fg_{Ny*i + j } = y_j^{i} - y_j^{i-1} - \left[ G_j ( y^i , a ) + G_j ( y^{i-1} , a ) \right] * \frac{t_i - t_{i-1} }{ 2 }$$

Source
The file ipopt_nlp_ode_simple.hpp contains source code for this representation of the objective and constraints.