bfgs_update.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 
34 #ifndef ACADO_TOOLKIT_BFGS_UPDATE_HPP
35 #define ACADO_TOOLKIT_BFGS_UPDATE_HPP
36 
37 
40 
41 
43 
44 
49 
53 };
54 
55 
56 
68 {
69 
70  //
71  // PUBLIC MEMBER FUNCTIONS:
72  //
73  public:
74 
76  BFGSupdate( );
77 
79  BFGSupdate( UserInteraction* _userInteraction,
80  uint _nBlocks = 0
81  );
82 
84  BFGSupdate( const BFGSupdate& rhs );
85 
87  virtual ~BFGSupdate( );
88 
90  BFGSupdate& operator=( const BFGSupdate& rhs );
91 
92  virtual NLPderivativeApproximation* clone( ) const;
93 
94 
95 
96  virtual returnValue initHessian( BlockMatrix& B,
97  uint N,
98  const OCPiterate& iter
99  );
100 
113  virtual returnValue initScaling( BlockMatrix& B,
114  const BlockMatrix& x,
115  const BlockMatrix& y
116  );
117 
118 
123  virtual returnValue apply( BlockMatrix &B,
124  const BlockMatrix &x,
125  const BlockMatrix &y );
126 
127 
128 
129  inline returnValue setBFGSModification( const BFGSModificationType &modification_
130  );
131 
132 
133  inline BooleanType performsBlockUpdates( ) const;
134 
135 
136 
137 
138 
139  //
140  // PROTECTED MEMBER FUNCTIONS:
141  //
142  protected:
143 
144 
145 
152  virtual returnValue applyUpdate( BlockMatrix &B,
153  const BlockMatrix &x,
154  const BlockMatrix &y
155  );
156 
157 
158 
167  const BlockMatrix &x,
168  const BlockMatrix &y
169  );
170 
171 
172 
173  returnValue getSubBlockLine( const int &N ,
174  const int &line1 ,
175  const int &line2 ,
176  const int &offset,
177  const BlockMatrix &M ,
178  BlockMatrix &x );
179 
180  returnValue setSubBlockLine( const int &N ,
181  const int &line1 ,
182  const int &line2 ,
183  const int &offset,
184  BlockMatrix &M ,
185  const BlockMatrix &x );
186 
187 
188  //
189  // PROTECTED DATA MEMBERS:
190  //
191  protected:
192 
194 
196 
197 };
198 
199 
201 
202 #include <acado/nlp_derivative_approximation/bfgs_update.ipp>
203 
204 
205 #endif // ACADO_TOOLKIT_BFGS_UPDATE_HPP
206 
207 /*
208  * end of file
209  */
#define N
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
virtual returnValue initScaling(BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
Implements a very rudimentary block sparse matrix class.
BFGSupdate & operator=(const BFGSupdate &rhs)
Definition: bfgs_update.cpp:73
virtual ~BFGSupdate()
Definition: bfgs_update.cpp:68
virtual NLPderivativeApproximation * clone() const
Definition: bfgs_update.cpp:87
Allows to pass back messages to the calling function.
virtual returnValue apply(BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
#define CLOSE_NAMESPACE_ACADO
returnValue setSubBlockLine(const int &N, const int &line1, const int &line2, const int &offset, BlockMatrix &M, const BlockMatrix &x)
Implements a constant Hessian as approximation of second-order derivatives within NLPsolvers...
BFGSModificationType
Definition: bfgs_update.hpp:48
virtual returnValue initHessian(BlockMatrix &B, uint N, const OCPiterate &iter)
Definition: bfgs_update.cpp:94
Encapsulates all user interaction for setting options, logging data and plotting results.
returnValue setBFGSModification(const BFGSModificationType &modification_)
void rhs(const real_t *x, real_t *f)
Implements BFGS updates for approximating second-order derivatives within NLPsolvers.
Definition: bfgs_update.hpp:67
#define BEGIN_NAMESPACE_ACADO
BFGSModificationType modification
BooleanType performsBlockUpdates() const
virtual returnValue applyUpdate(BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
virtual returnValue applyBlockDiagonalUpdate(BlockMatrix &B, const BlockMatrix &x, const BlockMatrix &y)
returnValue getSubBlockLine(const int &N, const int &line1, const int &line2, const int &offset, const BlockMatrix &M, BlockMatrix &x)
Base class for techniques of approximating second-order derivatives within NLPsolvers.


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