model_container.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 
33 #ifndef ACADO_TOOLKIT_MODELCONTAINER_HPP
34 #define ACADO_TOOLKIT_MODELCONTAINER_HPP
35 
36 #include <acado/ocp/model_data.hpp>
37 
38 
40 
41 
53 
54 
55 //
56 // PUBLIC MEMBER FUNCTIONS:
57 //
58 public:
59 
60 
64  ModelContainer( );
65 
66 
82  returnValue setDimensions( uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NOD, uint _NP );
83 
84 
98  returnValue setDimensions( uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP );
99 
100 
112  returnValue setDimensions( uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP );
113 
114 
124  returnValue setDimensions( uint _NX, uint _NU, uint _NOD, uint _NP );
125 
134 
135 
143  returnValue setNARXmodel( const uint _delay, const DMatrix& _parms );
144 
145 
152  returnValue setLinearInput( const DMatrix& A1_, const DMatrix& B1_ );
153 
154 
161  returnValue setLinearInput( const DMatrix& M1_, const DMatrix& A1_, const DMatrix& B1_ );
162 
163 
170  returnValue setLinearOutput( const DMatrix& A3_, const OutputFcn& rhs_ );
171 
172 
179  returnValue setLinearOutput( const DMatrix& M3_, const DMatrix& A3_, const OutputFcn& rhs_ );
180 
181 
188  returnValue setLinearOutput( const DMatrix& A3_, const std::string& _rhs3, const std::string& _diffs_rhs3 );
189 
190 
197  returnValue setLinearOutput( const DMatrix& M3_, const DMatrix& A3_, const std::string& _rhs3, const std::string& _diffs_rhs3 );
198 
199 
206  returnValue setNonlinearFeedback( const DMatrix& C_, const OutputFcn& feedb_ );
207 
208 
217  returnValue setModel( const std::string& fileName,
218  const std::string& _rhs_ODE,
219  const std::string& _diffs_rhs_ODE );
220 
221 
229  uint addOutput( const OutputFcn& outputEquation_, const DVector& measurements );
230 
231 
239  uint addOutput( const OutputFcn& outputEquation_, const uint numberMeasurements );
240 
241 
251  uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim, const DVector& measurements );
252 
253 
263  uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim, const uint numberMeasurements );
264 
265 
277  uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim,
278  const DVector& measurements, const std::string& colInd, const std::string& rowPtr );
279 
280 
292  uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim,
293  const uint numberMeasurements, const std::string& colInd, const std::string& rowPtr );
294 
295 
302  returnValue getIntegrationGrid( Grid& _grid ) const;
303 
304 
312  returnValue setIntegrationGrid( const Grid& _ocpGrid,
313  const uint _numSteps );
314 
315 
322  returnValue setupOutput( const DVector& numberMeasurements );
323 
324 
330 
331 
332  BooleanType hasOutputs() const;
336  BooleanType exportRhs() const;
337 
338 
343  uint getNX( ) const;
344 
345 
350  uint getNDX( ) const;
351 
352 
357  uint getNXA( ) const;
358 
363  uint getNU( ) const;
364 
369  uint getNP( ) const;
370 
372  uint getNOD( ) const;
373 
378  uint getN( ) const;
379 
386  returnValue setN( const uint N_ );
387 
388 
389  returnValue setNU( const uint NU_ );
390  returnValue setNP( const uint NP_ );
391  returnValue setNOD( const uint NOD_ );
392 
393 
398  DVector getDimOutputs( ) const;
399 
400 
405  DVector getNumMeas( ) const;
406 
407 
413 
414 
421  returnValue setModelData( const ModelData& data );
422 
423 
424  const std::string getFileNameModel() const;
425 
426 
427  //
428  // PROTECTED FUNCTIONS:
429  //
430  protected:
431 
432 
433  //
434  // DATA MEMBERS:
435  //
436  protected:
437 
443 };
444 
445 
447 
448 
449 
450 #endif // ACADO_TOOLKIT_MODELCONTAINER_HPP
451 
452 /*
453  * end of file
454  */
returnValue setLinearInput(const DMatrix &A1_, const DMatrix &B1_)
BooleanType exportRhs() const
uint getN() const
uint addOutput(const OutputFcn &outputEquation_, const DVector &measurements)
Allows to setup and evaluate output functions based on SymbolicExpressions.
Definition: output_fcn.hpp:55
returnValue setLinearOutput(const DMatrix &A3_, const OutputFcn &rhs_)
uint getNOD() const
Allows to pass back messages to the calling function.
BooleanType modelDimensionsSet() const
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
uint getNU() const
DVector getDimOutputs() const
uint getNP() const
returnValue setModelData(const ModelData &data)
#define CLOSE_NAMESPACE_ACADO
uint getNXA() const
Data class for defining models and everything that is related, to be passed to the integrator...
Definition: model_data.hpp:52
returnValue setModel(const DifferentialEquation &_f)
returnValue getModel(DifferentialEquation &_f) const
returnValue setN(const uint N_)
returnValue setNARXmodel(const uint _delay, const DMatrix &_parms)
Container class to store and pass data to the ModelData class.
BooleanType hasEquidistantControlGrid() const
BooleanType hasOutputs() const
returnValue setIntegrationGrid(const Grid &_ocpGrid, const uint _numSteps)
returnValue setDimensions(uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NOD, uint _NP)
returnValue getIntegrationGrid(Grid &_grid) const
uint getNDX() const
returnValue setupOutput(const DVector &numberMeasurements)
DVector getNumMeas() const
#define BEGIN_NAMESPACE_ACADO
USING_NAMESPACE_ACADO void output(const char *name, const Expression &e)
returnValue setNOD(const uint NOD_)
ModelData & getModelData()
const std::string getFileNameModel() const
returnValue setNonlinearFeedback(const DMatrix &C_, const OutputFcn &feedb_)
BooleanType hasDifferentialEquation() const
returnValue setNP(const uint NP_)
returnValue setNU(const uint NU_)
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.
uint getNX() const


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