constraint_element.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 
35 #ifndef ACADO_TOOLKIT_CONSTRAINT_ELEMENT_HPP
36 #define ACADO_TOOLKIT_CONSTRAINT_ELEMENT_HPP
37 
38 
42 
43 
45 
46 
58 
59  //
60  // PUBLIC MEMBER FUNCTIONS:
61  //
62  public:
63 
66 
68  ConstraintElement( const Grid& grid_, int nFcn_, int nB_ );
69 
72 
74  virtual ~ConstraintElement( );
75 
78 
79 
80 
81 // ==========================================================================
82 //
83 // INITIALIZATION
84 //
85 // ==========================================================================
86 
87 
92  returnValue init( const OCPiterate& iter );
93 
94 
95 
96 // =======================================================================================
97 //
98 // DEFINITION OF SEEDS:
99 //
100 // =======================================================================================
101 
102 
103 
109  virtual returnValue setForwardSeed( BlockMatrix *xSeed_ ,
110  BlockMatrix *xaSeed_,
111  BlockMatrix *pSeed_ ,
112  BlockMatrix *uSeed_ ,
113  BlockMatrix *wSeed_ ,
114  int order );
115 
116 
117 
124  virtual returnValue setUnitForwardSeed( );
125 
126 
127 
133  virtual returnValue setBackwardSeed( BlockMatrix *seed,
134  int order );
135 
136 
137 
138 
139 
140 
141 // =======================================================================================
142 //
143 // RESULTS OF THE EVALUATION
144 //
145 // =======================================================================================
146 
147 
152  virtual returnValue getResiduum( BlockMatrix &lower_residuum,
153  BlockMatrix &upper_residuum );
154 
155 
156 
165  int order );
166 
167 
168 
177  int order );
178 
179 
180 
181 
182 // =========================================================================
183 //
184 // MISCELLANEOUS:
185 //
186 // =========================================================================
187 
188 
190  inline Grid& getGrid();
191 
195  inline int getNX () const;
196 
200  inline int getNXA () const;
201 
205  inline int getNU () const;
206 
210  inline int getNP () const;
211 
215  inline int getNW () const;
216 
217 
218 
220  inline BooleanType isAffine() const;
221 
222  returnValue get(Function& function_, DMatrix& lb_, DMatrix& ub_);
223 
224 // ==========================================================================
225 //
226 // PROTECTED MEMBER FUNCTIONS:
227 //
228 // ==========================================================================
229 
230  protected:
231 
233  );
234 
235 
236 
237  //
238  // DATA MEMBERS:
239  //
240  protected:
241 
242 
243  // DEFINITIONS OF THE CONSTRAINT FUNCTION, GRID, AND BOUNDS:
244  // ---------------------------------------------------------
245 
248  double **lb ;
249  double **ub ;
253 
254 
255  // LOW_LEVEL EVALUATION INDICES:
256  // -----------------------------
257 
258  int **y_index;
259  int *t_index;
262  // DIMENSIONS:
263  // ----------------------
264 
265  int nx ;
266  int na ;
267  int nu ;
268  int np ;
269  int nw ;
270  int ny ;
272  int nFcn ;
273  int nB ;
276  // INPUT STORAGE:
277  // ------------------------
295  // RESULTS:
296  // ------------------------
305 };
306 
307 
309 
310 
311 
312 #include <acado/constraint/constraint_element.ipp>
313 
314 
315 #endif // ACADO_TOOLKIT_CONSTRAINT_ELEMENT_HPP
316 
317 /*
318  * end of file
319  */
int getNU() const
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition: function_.hpp:59
EvaluationPoint * z
returnValue init(const OCPiterate &iter)
ConstraintElement & operator=(const ConstraintElement &rhs)
Allows to pass back messages to the calling function.
Allows to setup function evaluation points.
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Definition: grid.hpp:58
#define CLOSE_NAMESPACE_ACADO
BooleanType isAffine() const
virtual returnValue setBackwardSeed(BlockMatrix *seed, int order)
virtual returnValue setUnitForwardSeed()
Base class for all kind of constraints (except for bounds) within optimal control problems...
virtual returnValue getResiduum(BlockMatrix &lower_residuum, BlockMatrix &upper_residuum)
virtual returnValue setForwardSeed(BlockMatrix *xSeed_, BlockMatrix *xaSeed_, BlockMatrix *pSeed_, BlockMatrix *uSeed_, BlockMatrix *wSeed_, int order)
EvaluationPoint * JJ
virtual returnValue initializeEvaluationPoints(const OCPiterate &iter)
virtual returnValue getBackwardSensitivities(BlockMatrix *D, int order)
int getNP() const
void rhs(const real_t *x, real_t *f)
int getNW() const
int getNX() const
CondensingType
#define BEGIN_NAMESPACE_ACADO
virtual returnValue getForwardSensitivities(BlockMatrix *D, int order)
int getNXA() const


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