constraint_component.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
27 
34 #ifndef ACADO_TOOLKIT_CONSTRAINT_COMPONENT_HPP
35 #define ACADO_TOOLKIT_CONSTRAINT_COMPONENT_HPP
36 
37 
40 
41 
43 
44 
57 
58 public:
59 
62 
63  // --------------------------------------------------------------------------------------------
64 
65 
68 
71 
74 
75 
77  ConstraintComponent operator()( const uint &index ) const;
78 
79 
81  returnValue initialize( const DVector& lb, Expression arg, const DVector& ub );
82 
83 
85  returnValue initialize( const VariablesGrid& lb, Expression arg, const VariablesGrid& ub );
86 
87 
88  // --------------------------------------------------------------------------------------------
89 
90 
91  // Friend Functions:
92  // -----------------
93  friend ConstraintComponent operator<=( double lb_, const ConstraintComponent &arg );
94  friend ConstraintComponent operator>=( double ub_, const ConstraintComponent &arg );
95 
98 
101 
102 
103  // --------------------------------------------------------------------------------------------
104 
105 
106  // Operators:
107  // ----------
108  inline ConstraintComponent operator<=( const double& ub ) const;
109  inline ConstraintComponent operator>=( const double& lb ) const;
110  inline ConstraintComponent operator==( const double& b ) const;
111 
112  inline ConstraintComponent operator<=( const DVector& ub ) const;
113  inline ConstraintComponent operator>=( const DVector& lb ) const;
114  inline ConstraintComponent operator==( const DVector& b ) const;
115 
116  inline ConstraintComponent operator<=( const VariablesGrid& ub ) const;
117  inline ConstraintComponent operator>=( const VariablesGrid& lb ) const;
118  inline ConstraintComponent operator==( const VariablesGrid& b ) const;
119 
120 
121  // --------------------------------------------------------------------------------------------
122 
123  inline const DVector& getLB() const;
124  inline const DVector& getUB() const;
125 
126  inline returnValue setLB( const double& lb_ );
127  inline returnValue setLB( const DVector& lb_ );
128  inline returnValue setLB( const VariablesGrid& lb_ );
129 
130  inline returnValue setUB( const double& lb_ );
131  inline returnValue setUB( const DVector& lb_ );
132  inline returnValue setUB( const VariablesGrid& lb_ );
133 
134  inline Expression getExpression( ) const;
135 
136  inline BooleanType hasUBgrid( ) const;
137  inline BooleanType hasLBgrid( ) const;
138 
139  inline const VariablesGrid& getLBgrid() const;
140  inline const VariablesGrid& getUBgrid() const;
141 
142  inline uint getDim( ) const;
143 
144 
145 //
146 // PROTECTED MEMBERS:
147 //
148 
149 protected:
150 
152 
155 
158 };
159 
160 ConstraintComponent operator<=( const Expression& arg, const double& ub );
161 ConstraintComponent operator>=( const Expression& arg, const double& lb );
162 ConstraintComponent operator==( const Expression& arg, const double& b );
163 
164 ConstraintComponent operator<=( const Expression& arg, const DVector& ub );
165 ConstraintComponent operator>=( const Expression& arg, const DVector& lb );
166 ConstraintComponent operator==( const Expression& arg, const DVector& b );
167 
171 
172 ConstraintComponent operator<=( double lb, const Expression &arg );
173 ConstraintComponent operator==( double b, const Expression &arg );
174 ConstraintComponent operator>=( double ub, const Expression &arg );
175 
179 
183 
185 
186 #include <acado/symbolic_expression/constraint_component.ipp>
187 
188 #endif
const DVector & getLB() const
returnValue initialize(const DVector &lb, Expression arg, const DVector &ub)
friend ConstraintComponent operator<=(double lb_, const ConstraintComponent &arg)
Expression getExpression() const
ConstraintComponent operator==(const double &b) const
const VariablesGrid & getLBgrid() const
friend ConstraintComponent operator>=(double ub_, const ConstraintComponent &arg)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
BooleanType hasLBgrid() const
#define CLOSE_NAMESPACE_ACADO
Data class for symbolically formulating constraints within optimal control problems.
const DVector & getUB() const
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
BooleanType hasUBgrid() const
ConstraintComponent & operator=(const ConstraintComponent &arg)
returnValue setLB(const double &lb_)
returnValue setUB(const double &lb_)
ConstraintComponent operator()(const uint &index) const
uint getDim() const
const VariablesGrid & getUBgrid() const
#define BEGIN_NAMESPACE_ACADO


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:31