65 const double tau1 = 0.012790605943772;
66 const double a1 = 0.047418203070092;
67 const double tau2 = 0.024695192379264;
68 const double a2 = 0.034087337273386;
69 const double g = 9.81;
77 aT = -1.0 / tau1 * vT + a1 / tau1 * uT;
78 aL = -1.0 / tau2 * vL + a2 / tau2 * uL;
84 f <<
dot(phi) == omega;
86 == -(g *
sin(phi) + a1 * duT *
cos(phi) + 2 * vL * omega) / xL;
93 OCP ocp(0.0, N * Ts, N);
100 h << xT << xL << phi << uT << uL << duT << duL;
114 hN << xT << xL << phi << uT << uL;
143 exit( EXIT_FAILURE );
USING_NAMESPACE_ACADO IntermediateState sin(const Expression &arg)
Allows to setup and evaluate a general function based on SymbolicExpressions.
#define USING_NAMESPACE_ACADO
virtual returnValue exportCode(const std::string &dirName, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16)
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
IntermediateState cos(const Expression &arg)
returnValue set(OptionsName name, int value)
returnValue minimizeLSQ(const DMatrix &S, const Function &h, const DVector &r)
returnValue minimizeLSQEndTerm(const DMatrix &S, const Function &m, const DVector &r)
Data class for defining optimal control problems.
Expression dot(const Expression &arg)
USING_NAMESPACE_ACADO int main(void)
A user class for auto-generation of OCP solvers.
returnValue printDimensionsQP()
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.