33 #ifndef ROCKET_WITH_TEMPLATES_HPP 34 #define ROCKET_WITH_TEMPLATES_HPP 48 const char*
xd_names[
nxd] = {
"DifferentialState s",
"DifferentialState v",
"DifferentialState m"};
58 const double xd_0[
nxd] = { 0.0 , 0.0 , 1.0 };
59 const double xd_f[
nxd] = { 10.0 , 0.0 , 0.0 };
64 const double xd_lb[
nxd] = { 0.0 , -0.01, 0.0 };
69 template <
class DifferentialStateType,
class ControlType,
class ReturnType>
70 void eval_F(
const DifferentialStateType *xd,
79 template <
class DifferentialStateType,
class ControlType,
class ReturnType>
80 void eval_G(
const DifferentialStateType *xd,
85 rhs[1] = (
U-0.02*
V*
V)/
M;
97 #endif // ROCKET_WITH_TEMPLATES_HPP return ReturnType(abs2(x.value()), x.derivatives()*(Scalar(2)*x.value()))
const bool xd_0_fixed[nxd]
void eval_G(const DifferentialStateType *xd, const ControlType *u, ReturnType *rhs)
void eval_F(const DifferentialStateType *xd, const ControlType *u, ReturnType &lfun)
const bool xd_has_lb[nxd]
void rhs(const real_t *x, real_t *f)
const bool xd_has_ub[nxd]
const bool xd_f_fixed[nxd]
const char * xd_names[nxd]