lsq_term.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_LSQ_TERM_HPP
36 #define ACADO_TOOLKIT_LSQ_TERM_HPP
37 
38 
40 
41 
43 
44 
45 
61 class LSQTerm : public ObjectiveElement{
62 
63  //
64  // PUBLIC MEMBER FUNCTIONS:
65  //
66  public:
67 
69  LSQTerm( );
70 
72  LSQTerm( const MatrixVariablesGrid *S_,
73  const Function& h ,
74  const VariablesGrid *r_ );
75 
77  LSQTerm( const LSQTerm& rhs );
78 
80  virtual ~LSQTerm( );
81 
83  LSQTerm& operator=( const LSQTerm& rhs );
84 
85 
86 
87 // =======================================================================================
88 //
89 // INITIALIZATION ROUTINES
90 //
91 // =======================================================================================
92 
93 
98  inline returnValue setGrid( const Grid &grid_ );
99 
100 
101 // =======================================================================================
102 //
103 // EVALUATION ROUTINES
104 //
105 // =======================================================================================
106 
107 
108  returnValue evaluate( const OCPiterate &x );
109 
110 
117 
118 
119 
127 
128 
129 
130 
132  inline BooleanType isAffine();
133 
134 
136  inline BooleanType isQuadratic();
137 
138 
140  inline BooleanType isConvex();
141 
142 
147  returnValue setReference( const VariablesGrid &ref );
148 
149 
150 // =======================================================================================
151 
152  returnValue getWeigthingtMatrix( const unsigned _index, DMatrix& _matrix ) const;
153 
154 
155  //
156  // PROTECTED FUNCTIONS:
157  //
158  protected:
159 
160 
161  //
162  // DATA MEMBERS:
163  //
164  protected:
165 
169  DMatrix *S ;
170  DVector *r ;
172  double **S_h_res ;
176 };
177 
178 
180 
181 
182 
183 #include <acado/objective/lsq_term.ipp>
184 
185 #endif // ACADO_TOOLKIT_LSQ_TERM_HPP
186 
187 /*
188  * end of file
189  */
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
Base class for all kind of objective function terms within optimal control problems.
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition: function_.hpp:59
BooleanType isAffine()
BooleanType isConvex()
returnValue setReference(const VariablesGrid &ref)
Provides a time grid consisting of vector-valued optimization variables at each grid point...
returnValue getWeigthingtMatrix(const unsigned _index, DMatrix &_matrix) const
Allows to pass back messages to the calling function.
returnValue evaluateSensitivitiesGN(BlockMatrix *GNhessian)
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Definition: grid.hpp:58
#define CLOSE_NAMESPACE_ACADO
returnValue evaluateSensitivities(BlockMatrix *hessian)
MatrixVariablesGrid * S_temp
Definition: lsq_term.hpp:166
Provides a time grid consisting of matrix-valued optimization variables at each grid point...
returnValue setGrid(const Grid &grid_)
DVector * r
Definition: lsq_term.hpp:170
DMatrix * S
Definition: lsq_term.hpp:169
returnValue evaluate(const OCPiterate &x)
void rhs(const real_t *x, real_t *f)
double ** S_h_res
Definition: lsq_term.hpp:172
#define BEGIN_NAMESPACE_ACADO
Stores and evaluates LSQ terms within optimal control problems.
Definition: lsq_term.hpp:61
VariablesGrid * r_temp
Definition: lsq_term.hpp:167
LSQTerm & operator=(const LSQTerm &rhs)
BooleanType isQuadratic()


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