Go to the documentation of this file.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
00026
00027
00034 #ifndef ACADO_TOOLKIT_CONSTRAINT_COMPONENT_HPP
00035 #define ACADO_TOOLKIT_CONSTRAINT_COMPONENT_HPP
00036
00037
00038 #include <acado/symbolic_expression/symbolic_expression.hpp>
00039 #include <acado/variables_grid/variables_grid.hpp>
00040
00041
00042 BEGIN_NAMESPACE_ACADO
00043
00044
00056 class ConstraintComponent{
00057
00058 public:
00059
00061 ConstraintComponent();
00062
00063
00064
00065
00067 ConstraintComponent( const ConstraintComponent &arg );
00068
00070 ~ConstraintComponent();
00071
00073 ConstraintComponent& operator=( const ConstraintComponent &arg );
00074
00075
00077 ConstraintComponent operator()( const uint &index ) const;
00078
00079
00081 returnValue initialize( const DVector& lb, Expression arg, const DVector& ub );
00082
00083
00085 returnValue initialize( const VariablesGrid& lb, Expression arg, const VariablesGrid& ub );
00086
00087
00088
00089
00090
00091
00092
00093 friend ConstraintComponent operator<=( double lb_, const ConstraintComponent &arg );
00094 friend ConstraintComponent operator>=( double ub_, const ConstraintComponent &arg );
00095
00096 friend ConstraintComponent operator<=( DVector lb_, const ConstraintComponent &arg );
00097 friend ConstraintComponent operator>=( DVector ub_, const ConstraintComponent &arg );
00098
00099 friend ConstraintComponent operator<=( VariablesGrid lb_, const ConstraintComponent &arg );
00100 friend ConstraintComponent operator>=( VariablesGrid ub_, const ConstraintComponent &arg );
00101
00102
00103
00104
00105
00106
00107
00108 inline ConstraintComponent operator<=( const double& ub ) const;
00109 inline ConstraintComponent operator>=( const double& lb ) const;
00110 inline ConstraintComponent operator==( const double& b ) const;
00111
00112 inline ConstraintComponent operator<=( const DVector& ub ) const;
00113 inline ConstraintComponent operator>=( const DVector& lb ) const;
00114 inline ConstraintComponent operator==( const DVector& b ) const;
00115
00116 inline ConstraintComponent operator<=( const VariablesGrid& ub ) const;
00117 inline ConstraintComponent operator>=( const VariablesGrid& lb ) const;
00118 inline ConstraintComponent operator==( const VariablesGrid& b ) const;
00119
00120
00121
00122
00123 inline const DVector& getLB() const;
00124 inline const DVector& getUB() const;
00125
00126 inline returnValue setLB( const double& lb_ );
00127 inline returnValue setLB( const DVector& lb_ );
00128 inline returnValue setLB( const VariablesGrid& lb_ );
00129
00130 inline returnValue setUB( const double& lb_ );
00131 inline returnValue setUB( const DVector& lb_ );
00132 inline returnValue setUB( const VariablesGrid& lb_ );
00133
00134 inline Expression getExpression( ) const;
00135
00136 inline BooleanType hasUBgrid( ) const;
00137 inline BooleanType hasLBgrid( ) const;
00138
00139 inline const VariablesGrid& getLBgrid() const;
00140 inline const VariablesGrid& getUBgrid() const;
00141
00142 inline uint getDim( ) const;
00143
00144
00145
00146
00147
00148
00149 protected:
00150
00151 Expression expression ;
00152
00153 DVector lb ;
00154 DVector ub ;
00155
00156 VariablesGrid lbGrid ;
00157 VariablesGrid ubGrid ;
00158 };
00159
00160 ConstraintComponent operator<=( const Expression& arg, const double& ub );
00161 ConstraintComponent operator>=( const Expression& arg, const double& lb );
00162 ConstraintComponent operator==( const Expression& arg, const double& b );
00163
00164 ConstraintComponent operator<=( const Expression& arg, const DVector& ub );
00165 ConstraintComponent operator>=( const Expression& arg, const DVector& lb );
00166 ConstraintComponent operator==( const Expression& arg, const DVector& b );
00167
00168 ConstraintComponent operator<=( const Expression& arg, const VariablesGrid& ub );
00169 ConstraintComponent operator>=( const Expression& arg, const VariablesGrid& lb );
00170 ConstraintComponent operator==( const Expression& arg, const VariablesGrid& b );
00171
00172 ConstraintComponent operator<=( double lb, const Expression &arg );
00173 ConstraintComponent operator==( double b, const Expression &arg );
00174 ConstraintComponent operator>=( double ub, const Expression &arg );
00175
00176 ConstraintComponent operator<=( DVector lb, const Expression &arg );
00177 ConstraintComponent operator==( DVector b, const Expression &arg );
00178 ConstraintComponent operator>=( DVector ub, const Expression &arg );
00179
00180 ConstraintComponent operator<=( VariablesGrid lb, const Expression &arg );
00181 ConstraintComponent operator==( VariablesGrid b, const Expression &arg );
00182 ConstraintComponent operator>=( VariablesGrid ub, const Expression &arg );
00183
00184 CLOSE_NAMESPACE_ACADO
00185
00186 #include <acado/symbolic_expression/constraint_component.ipp>
00187
00188 #endif