model_container.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00033 #ifndef ACADO_TOOLKIT_MODELCONTAINER_HPP
00034 #define ACADO_TOOLKIT_MODELCONTAINER_HPP
00035 
00036 #include <acado/ocp/model_data.hpp>
00037 
00038 
00039 BEGIN_NAMESPACE_ACADO
00040 
00041 
00052 class ModelContainer {
00053 
00054 
00055 //
00056 // PUBLIC MEMBER FUNCTIONS:
00057 //
00058 public:
00059 
00060 
00064     ModelContainer( );
00065 
00066 
00082     returnValue setDimensions( uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NDX3, uint _NXA, uint _NXA3, uint _NU, uint _NOD, uint _NP );
00083 
00084 
00098     returnValue setDimensions( uint _NX1, uint _NX2, uint _NX3, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP );
00099 
00100 
00112     returnValue setDimensions( uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NOD, uint _NP );
00113 
00114 
00124     returnValue setDimensions( uint _NX, uint _NU, uint _NOD, uint _NP );
00125 
00133     returnValue setModel( const DifferentialEquation& _f );
00134 
00135 
00143         returnValue setNARXmodel( const uint _delay, const DMatrix& _parms );
00144 
00145 
00152     returnValue setLinearInput( const DMatrix& A1_, const DMatrix& B1_ );
00153 
00154 
00161     returnValue setLinearInput( const DMatrix& M1_, const DMatrix& A1_, const DMatrix& B1_ );
00162 
00163 
00170     returnValue setLinearOutput( const DMatrix& A3_, const OutputFcn& rhs_ );
00171 
00172 
00179     returnValue setLinearOutput( const DMatrix& M3_, const DMatrix& A3_, const OutputFcn& rhs_ );
00180 
00181 
00188     returnValue setLinearOutput( const DMatrix& A3_, const std::string& _rhs3, const std::string& _diffs_rhs3 );
00189 
00190 
00197     returnValue setLinearOutput( const DMatrix& M3_, const DMatrix& A3_, const std::string& _rhs3, const std::string& _diffs_rhs3 );
00198 
00199 
00208     returnValue setModel(       const std::string& fileName,
00209                                                         const std::string& _rhs_ODE,
00210                                                         const std::string& _diffs_rhs_ODE );
00211 
00212 
00220         uint addOutput( const OutputFcn& outputEquation_, const DVector& measurements );
00221 
00222 
00230         uint addOutput( const OutputFcn& outputEquation_, const uint numberMeasurements );
00231 
00232 
00242         uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim, const DVector& measurements );
00243 
00244 
00254         uint addOutput( const std::string& output, const std::string& diffs_output, const uint dim, const uint numberMeasurements );
00255 
00256 
00268         uint addOutput(         const std::string& output, const std::string& diffs_output, const uint dim,
00269                                                 const DVector& measurements, const std::string& colInd, const std::string& rowPtr       );
00270 
00271 
00283         uint addOutput(         const std::string& output, const std::string& diffs_output, const uint dim,
00284                                                 const uint numberMeasurements, const std::string& colInd, const std::string& rowPtr     );
00285 
00286 
00294     returnValue setIntegrationGrid(     const Grid& _ocpGrid,
00295                                                                         const uint _numSteps    );
00296 
00297 
00304     returnValue setupOutput( const DVector& numberMeasurements );
00305 
00306 
00311     returnValue getModel( DifferentialEquation& _f ) const;
00312 
00313 
00314     BooleanType hasOutputs() const;
00315     BooleanType hasDifferentialEquation() const;
00316     BooleanType modelDimensionsSet() const;
00317     BooleanType hasEquidistantControlGrid               () const;
00318     BooleanType exportRhs() const;
00319 
00320 
00325     uint getNX( ) const;
00326 
00327 
00332     uint getNDX( ) const;
00333 
00334 
00339     uint getNXA( ) const;
00340 
00345     uint getNU( ) const;
00346 
00351     uint getNP( ) const;
00352 
00354     uint getNOD( ) const;
00355 
00360     uint getN( ) const;
00361 
00368     returnValue setN( const uint N_ );
00369 
00370 
00375     DVector getDimOutputs( ) const;
00376 
00377 
00382     DVector getNumMeas( ) const;
00383 
00384 
00389     ModelData& getModelData( );
00390 
00391 
00398     returnValue setModelData( const ModelData& data );
00399 
00400 
00401     const std::string getFileNameModel() const;
00402 
00403 
00404     //
00405     // PROTECTED FUNCTIONS:
00406     //
00407     protected:
00408 
00409 
00410     //
00411     // DATA MEMBERS:
00412     //
00413     protected:
00414 
00415          ModelData modelData;                   
00416 };
00417 
00418 
00419 CLOSE_NAMESPACE_ACADO
00420 
00421 
00422 
00423 #endif  // ACADO_TOOLKIT_MODELCONTAINER_HPP
00424 
00425 /*
00426  *   end of file
00427  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:59:22