algebraic_consistency_constraint.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_ALGEBRAIC_CONSISTENCY_CONSTRAINT_HPP
36 #define ACADO_TOOLKIT_ALGEBRAIC_CONSISTENCY_CONSTRAINT_HPP
37 
38 
40 
41 
43 
44 
66 
67  //
68  // PUBLIC MEMBER FUNCTIONS:
69  //
70  public:
71 
74 
76  AlgebraicConsistencyConstraint( const Grid& grid_ ,
77  const uint& numberOfStages );
78 
81 
84 
87 
88 
89 // =======================================================================================
90 
95  inline returnValue add( const uint& endOfStage_ ,
96  const DifferentialEquation& dae );
97 
98 
99 // =======================================================================================
100 //
101 // EVALUATION ROUTINES
102 //
103 // =======================================================================================
104 
105 
111  returnValue evaluate( const OCPiterate& iter );
112 
113 
121 
122 
123 
128  returnValue evaluateSensitivities( int &count, const BlockMatrix &seed, BlockMatrix &hessian );
129 
130 
131 // =========================================================================
132 
134  inline int getNC() const;
135 
137  inline int getDim( const int& idx_ );
138 
139 
140  // PROOTECTED MEMBER FUNCIONS:
141  // ---------------------------
142  protected:
143 
145  );
146 
147 
150  inline returnValue computeForwardSensitivityBlock( int offset1, int offset2, int offset3, int stageIdx, DMatrix *seed );
151 
152 
153 
154 
155  //
156  // DATA MEMBERS:
157  //
158  protected:
159 
161  int counter ;
164  int *breakPoints ;
165 };
166 
167 
169 
170 
171 
172 #include <acado/constraint/algebraic_consistency_constraint.ipp>
173 
174 
175 #endif // ACADO_TOOLKIT_ALGEBRAIC_CONSISTENCY_CONSTRAINT_HPP
176 
177 /*
178  * end of file
179  */
virtual returnValue initializeEvaluationPoints(const OCPiterate &iter)
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
returnValue evaluate(const OCPiterate &iter)
returnValue computeForwardSensitivityBlock(int offset1, int offset2, int offset3, int stageIdx, DMatrix *seed)
Allows to pass back messages to the calling function.
AlgebraicConsistencyConstraint & operator=(const AlgebraicConsistencyConstraint &rhs)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Definition: grid.hpp:58
#define CLOSE_NAMESPACE_ACADO
Deals with algebraic consistency constraints within optimal control problems.
Base class for all kind of constraints (except for bounds) within optimal control problems...
void rhs(const real_t *x, real_t *f)
#define BEGIN_NAMESPACE_ACADO
int getDim(const int &idx_)
returnValue add(const uint &endOfStage_, const DifferentialEquation &dae)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.


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