export_gauss_newton_forces.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 
32 #ifndef ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_FORCES_HPP
33 #define ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_FORCES_HPP
34 
36 
38 
41 
54 {
55 public:
56 
62  ExportGaussNewtonForces( UserInteraction* _userInteraction = 0,
63  const std::string& _commonHeaderName = ""
64  );
65 
69  {}
70 
75  virtual returnValue setup( );
76 
85  ExportStruct dataStruct = ACADO_ANY
86  ) const;
87 
96  ) const;
97 
98 
107  );
108 
109 
114  unsigned getNumQPvars( ) const;
115 
116  unsigned getNumLowerBounds( ) const;
117 
118  unsigned getNumUpperBounds( ) const;
119 
120 protected:
121 
128  virtual returnValue setupObjectiveEvaluation( void );
129 
135  virtual returnValue setupConstraintsEvaluation( void );
136 
141  virtual returnValue setupVariables( );
142 
148 
153  virtual returnValue setupEvaluation( );
154 
155  virtual returnValue setupQPInterface( );
156 
157 private:
160 
164 
165  std::vector< ExportVariable > objHessians;
166  std::vector< ExportVariable > objGradients;
167 
170 
175 
176  bool diagH;
177  bool diagHN;
182  std::vector< ExportVariable > conLB;
183  std::vector< ExportVariable > conUB;
185 
186  unsigned numLB;
187  unsigned numUB;
188 
189  std::vector< std::vector< unsigned > > conLBIndices, conUBIndices;
190  std::vector< unsigned > conABDimensions;
191  std::vector< std::vector< double > > conLBValues, conUBValues;
192 
196 
197  std::vector< ExportVariable > conC;
198  std::vector< ExportVariable > cond;
206 
217  std::string qpModuleName;
218  std::string qpObjPrefix;
219 
220  std::shared_ptr< ExportForcesInterface > qpInterface;
221  std::shared_ptr< ExportForcesGenerator > qpGenerator;
223 };
224 
226 
227 #endif // ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_FORCES_HPP
std::vector< ExportVariable > cond
virtual returnValue setupObjectiveEvaluation(void)
std::vector< std::vector< unsigned > > conLBIndices
std::vector< ExportVariable > conUB
Allows to pass back messages to the calling function.
Generator of the FORCES interface, the to, be called from MATLAB.
A class for export of an OCP solver using sparse QP solver FORCES.
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
std::vector< unsigned > conABDimensions
#define CLOSE_NAMESPACE_ACADO
std::vector< std::vector< double > > conLBValues
Base class for export of NLP/OCP solvers.
std::vector< ExportVariable > objGradients
ExportStruct
virtual returnValue getFunctionDeclarations(ExportStatementBlock &declarations) const
ExportGaussNewtonForces(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
std::vector< ExportVariable > conLB
virtual returnValue getCode(ExportStatementBlock &code)
A class for configuration and export for interface to the FORCES QP solver.
virtual returnValue setupMultiplicationRoutines()
Encapsulates all user interaction for setting options, logging data and plotting results.
Allows to export code of an arbitrary function.
std::vector< ExportVariable > conC
std::shared_ptr< ExportForcesInterface > qpInterface
std::vector< std::vector< unsigned > > conUBIndices
std::vector< ExportVariable > objHessians
#define BEGIN_NAMESPACE_ACADO
virtual returnValue setupConstraintsEvaluation(void)
std::shared_ptr< ExportForcesGenerator > qpGenerator
Allows to export code for a block of statements.
std::vector< std::vector< double > > conUBValues
Defines a matrix-valued variable to be used for exporting code.


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