00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00032 #ifndef ACADO_TOOLKIT_VARIABLE_TYPES_HPP
00033 #define ACADO_TOOLKIT_VARIABLE_TYPES_HPP
00034
00035 #include <acado/symbolic_expression/expression.hpp>
00036
00037 BEGIN_NAMESPACE_ACADO
00038
00040 class AlgebraicState : public ExpressionType<AlgebraicState, VT_ALGEBRAIC_STATE>
00041 {
00042 typedef ExpressionType<AlgebraicState, VT_ALGEBRAIC_STATE> Base;
00043
00044 public:
00045 AlgebraicState() : Base() {}
00046
00047 AlgebraicState(const std::string& _name, unsigned _nRows, unsigned _nCols)
00048 : Base(_name, _nRows, _nCols)
00049 {}
00050 };
00051
00053 class Control : public ExpressionType<Control, VT_CONTROL>
00054 {
00055 typedef ExpressionType<Control, VT_CONTROL> Base;
00056
00057 public:
00058 Control() : Base() {}
00059
00060 Control(const std::string& _name, unsigned _nRows, unsigned _nCols)
00061 : Base(_name, _nRows, _nCols)
00062 {}
00063 };
00064
00066 class DifferentialStateDerivative : public ExpressionType<DifferentialStateDerivative, VT_DDIFFERENTIAL_STATE>
00067 {
00068 typedef ExpressionType<DifferentialStateDerivative, VT_DDIFFERENTIAL_STATE> Base;
00069
00070 public:
00071 DifferentialStateDerivative() : Base() {}
00072
00073 DifferentialStateDerivative(const std::string& _name, unsigned _nRows, unsigned _nCols)
00074 : Base(_name, _nRows, _nCols)
00075 {}
00076 };
00077
00079 class DifferentialState: public ExpressionType<DifferentialState, VT_DIFFERENTIAL_STATE>
00080 {
00081 typedef ExpressionType<DifferentialState, VT_DIFFERENTIAL_STATE> Base;
00082
00083 public:
00084 DifferentialState() : Base() {}
00085
00086 DifferentialState(const std::string& _name, unsigned _nRows, unsigned _nCols)
00087 : Base(_name, _nRows, _nCols)
00088 {}
00089 };
00090
00092 class Disturbance : public ExpressionType<Disturbance, VT_DISTURBANCE>
00093 {
00094 typedef ExpressionType<Disturbance, VT_DISTURBANCE> Base;
00095
00096 public:
00097 Disturbance() : Base() {}
00098
00099 Disturbance(const std::string& _name, unsigned _nRows, unsigned _nCols)
00100 : Base(_name, _nRows, _nCols)
00101 {}
00102 };
00103
00105 class IntegerControl : public ExpressionType<IntegerControl, VT_INTEGER_CONTROL>
00106 {
00107 typedef ExpressionType<IntegerControl, VT_INTEGER_CONTROL> Base;
00108
00109 public:
00110 IntegerControl() : Base() {}
00111
00112 IntegerControl(const std::string& _name, unsigned _nRows, unsigned _nCols)
00113 : Base(_name, _nRows, _nCols)
00114 {}
00115 };
00116
00118 class IntegerParameter : public ExpressionType<IntegerParameter, VT_INTEGER_PARAMETER>
00119 {
00120 typedef ExpressionType<IntegerParameter, VT_INTEGER_PARAMETER> Base;
00121
00122 public:
00123 IntegerParameter() : Base() {}
00124
00125 IntegerParameter(const std::string& _name, unsigned _nRows, unsigned _nCols)
00126 : Base(_name, _nRows, _nCols)
00127 {}
00128 };
00129
00131 class OnlineData : public ExpressionType<OnlineData, VT_ONLINE_DATA>
00132 {
00133 typedef ExpressionType<OnlineData, VT_ONLINE_DATA> Base;
00134
00135 public:
00136 OnlineData() : Base() {}
00137
00138 OnlineData(const std::string& _name, unsigned _nRows, unsigned _nCols)
00139 : Base(_name, _nRows, _nCols)
00140 {}
00141 };
00142
00144 class Output : public ExpressionType<Output, VT_OUTPUT>
00145 {
00146 typedef ExpressionType<Output, VT_OUTPUT> Base;
00147
00148 public:
00149 Output() : Base() {}
00150
00151 Output(const std::string& _name, unsigned _nRows, unsigned _nCols)
00152 : Base(_name, _nRows, _nCols)
00153 {}
00154
00156 Output(const Expression& _expression, unsigned _componentIdx = 0)
00157 : Base(_expression, _componentIdx)
00158 {}
00159 };
00160
00162 class Parameter : public ExpressionType<Parameter, VT_PARAMETER>
00163 {
00164 typedef ExpressionType<Parameter, VT_PARAMETER> Base;
00165
00166 public:
00167 Parameter() : Base() {}
00168
00169 Parameter(const std::string& _name, unsigned _nRows, unsigned _nCols)
00170 : Base(_name, _nRows, _nCols)
00171 {}
00172 };
00173
00175 class TIME : public ExpressionType<TIME, VT_TIME, false>
00176 {
00177 typedef ExpressionType<TIME, VT_TIME, false> Base;
00178
00179 public:
00180 TIME() : Base() {}
00181 };
00182
00184 class IntermediateState : public ExpressionType<IntermediateState, VT_INTERMEDIATE_STATE>
00185 {
00186 typedef ExpressionType<IntermediateState, VT_INTERMEDIATE_STATE> Base;
00187
00188 public:
00189 IntermediateState() : Base() {}
00190
00192 explicit IntermediateState(const std::string& _name, uint _nRows, uint _nCols)
00193 : Base(_name, _nRows, _nCols)
00194 {}
00195
00197 explicit IntermediateState(const std::string& _name)
00198 : Base(_name, 1, 1)
00199 {}
00200
00202 explicit IntermediateState( unsigned _nRows, unsigned _nCols = 1)
00203 : Base("", _nRows, _nCols)
00204 {}
00205
00207 explicit IntermediateState( int _nRows, int _nCols = 1)
00208 : Base("", _nRows, _nCols)
00209 {}
00210
00212 IntermediateState( const double& _arg )
00213 : Base( )
00214 {
00215 assignmentSetup( _arg );
00216 }
00217
00218 IntermediateState( const DVector& _arg )
00219 : Base( )
00220 {
00221 assignmentSetup( _arg );
00222 }
00223
00224 IntermediateState( const DMatrix& _arg )
00225 : Base( )
00226 {
00227 assignmentSetup( _arg );
00228 }
00229
00230 IntermediateState( const Operator& _arg )
00231 : Base( )
00232 {
00233 assignmentSetup( _arg );
00234 }
00235
00236 IntermediateState( const Expression& _arg )
00237 : Base( )
00238 {
00239 assignmentSetup( _arg );
00240 }
00241 };
00242
00243 CLOSE_NAMESPACE_ACADO
00244
00245 #endif // ACADO_TOOLKIT_VARIABLE_TYPES_HPP