- 3.0.2 optimal control module.
TermLoadMacros.hpp
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "TermLinear.hpp"
5 #include "TermQuadratic.hpp"
6 #include "TermQuadMult.hpp"
7 #include "TermMixed.hpp"
8 #include "TermSmoothAbs.hpp"
9 
10 #define CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TERM, TERMNAME) \
11  if (termKind == TERMNAME) \
12  { \
13  term = std::shared_ptr<TERM<STATE_DIM, CONTROL_DIM, SCALAR_EVAL, SCALAR>>( \
14  new TERM<STATE_DIM, CONTROL_DIM, SCALAR_EVAL, SCALAR>()); \
15  term->setName(TERMNAME); \
16  }
17 
18 #define CT_LOADABLE_TERMS(SCALAR_EVAL, SCALAR) \
19  CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TermLinear, "linear") \
20  CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TermQuadratic, "quadratic") \
21  CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TermMixed, "mixed") \
22  CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TermQuadMult, "quadratic-multiplicative") \
23  CT_LOADABLE_TERM(SCALAR_EVAL, SCALAR, TermSmoothAbs, "smooth-abs")