algorithmic_base.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_ALGORITHMIC_BASE_HPP
00034 #define ACADO_TOOLKIT_ALGORITHMIC_BASE_HPP
00035 
00036 
00037 #include <acado/utils/acado_utils.hpp>
00038 #include <acado/user_interaction/user_interaction.hpp>
00039 
00040 
00041 
00042 BEGIN_NAMESPACE_ACADO
00043 
00044 
00078 class AlgorithmicBase
00079 {
00080         //
00081         // PUBLIC MEMBER FUNCTIONS:
00082         //
00083         public:
00084 
00087                 AlgorithmicBase( );
00088 
00095                 AlgorithmicBase(        UserInteraction* _userInteraction
00096                                                         );
00097 
00102                 AlgorithmicBase(        const AlgorithmicBase& rhs
00103                                                         );
00104 
00106                 virtual ~AlgorithmicBase( );
00107 
00112                 AlgorithmicBase& operator=(     const AlgorithmicBase& rhs
00113                                                                         );
00114 
00115 
00120                 returnValue addOptionsList( );
00121 
00122 
00132                 returnValue set(        OptionsName name,
00133                                                         int value
00134                                                         );
00135 
00145                 returnValue set(        OptionsName name,
00146                                                         double value
00147                                                         );
00148 
00158                 returnValue set(        OptionsName name,
00159                                                         const std::string& value
00160                                                         );
00161 
00174                 returnValue set(        uint idx,
00175                                                         OptionsName name,
00176                                                         int value
00177                                                         );
00178 
00191                 returnValue set(        uint idx,
00192                                                         OptionsName name,
00193                                                         double value
00194                                                         );
00195 
00196 
00206         returnValue setOptions( const Options &arg
00207                                                                 );
00208 
00217                 returnValue setOptions( uint idx,
00218                                                                 const Options &arg
00219                                                                 );
00220 
00227                 Options getOptions(     uint idx
00228                                                         ) const;
00229 
00230 
00242                 inline returnValue getAll(      LogName _name,
00243                                                                         MatrixVariablesGrid& values
00244                                                                         ) const;
00245 
00246 
00258                 inline returnValue getFirst(    LogName _name,
00259                                                                                 DMatrix& firstValue
00260                                                                                 ) const;
00261 
00273                 inline returnValue getFirst(    LogName _name,
00274                                                                                 VariablesGrid& firstValue
00275                                                                                 ) const;
00276 
00277 
00289                 inline returnValue getLast(     LogName _name,
00290                                                                         DMatrix& lastValue
00291                                                                         ) const;
00292 
00304                 inline returnValue getLast(     LogName _name,
00305                                                                         VariablesGrid& lastValue
00306                                                                         ) const;
00307 
00308 
00317                 inline returnValue get( OptionsName name,
00318                                                                 int& value
00319                                                                 ) const;
00320 
00329                 inline returnValue get( OptionsName name,
00330                                                                 double& value
00331                                                                 ) const;
00332 
00341                 inline returnValue get( OptionsName name,
00342                                                                 std::string& value
00343                                                                 ) const;
00344 
00356                 inline returnValue get( uint idx,
00357                                                                 OptionsName name,
00358                                                                 int& value
00359                                                                 ) const;
00360 
00372                 inline returnValue get( uint idx,
00373                                                                 OptionsName name,
00374                                                                 double& value
00375                                                                 ) const;
00376 
00377 
00387                 inline returnValue addOption(   OptionsName name,
00388                                                                                 int value
00389                                                                                 );
00390 
00400                 inline returnValue addOption(   OptionsName name,
00401                                                                                 double value
00402                                                                                 );
00403 
00415                 inline returnValue addOption(   uint idx,
00416                                                                                 OptionsName name,
00417                                                                                 int value
00418                                                                                 );
00419 
00431                 inline returnValue addOption(   uint idx,
00432                                                                                 OptionsName name,
00433                                                                                 double value
00434                                                                                 );
00435 
00436 
00442                 inline BooleanType haveOptionsChanged( ) const;
00443 
00451                 inline BooleanType haveOptionsChanged(  uint idx
00452                                                                                                 ) const;
00453 
00454 
00464                 inline returnValue setAll(      LogName _name,
00465                                                                         const MatrixVariablesGrid& values
00466                                                                         );
00467 
00468 
00479                 inline returnValue setLast(     LogName _name,
00480                                                                         int lastValue,
00481                                                                         double time = -INFTY
00482                                                                         );
00483 
00494                 inline returnValue setLast(     LogName _name,
00495                                                                         double lastValue,
00496                                                                         double time = -INFTY
00497                                                                         );
00498 
00509                 inline returnValue setLast(     LogName _name,
00510                                                                         const DVector& lastValue,
00511                                                                         double time = -INFTY
00512                                                                         );
00513 
00524                 inline returnValue setLast(     LogName _name,
00525                                                                         const DMatrix& lastValue,
00526                                                                         double time = -INFTY
00527                                                                         );
00528 
00539                 inline returnValue setLast(     LogName _name,
00540                                                                         const VariablesGrid& lastValue,
00541                                                                         double time = -INFTY
00542                                                                         );
00543 
00544 
00552                 inline int addLogRecord(        LogRecord& _record
00553                                                                         );
00554 
00555 
00567                 inline returnValue printLogRecord(      std::ostream& _stream,
00568                                                                                         int idx,
00569                                                                                         LogPrintMode _mode = PRINT_ITEM_BY_ITEM
00570                                                                                         ) const;
00571 
00572 
00579                 inline returnValue plot(        PlotFrequency _frequency = PLOT_IN_ANY_CASE
00580                                                                         );
00581 
00589                 inline returnValue replot(      PlotFrequency _frequency = PLOT_IN_ANY_CASE
00590                                                                         );
00591 
00592 
00593     //
00594     // DATA MEMBERS:
00595     //
00596         protected:
00597                 UserInteraction* userInteraction;                               
00598                 BooleanType useModuleStandalone;                                
00600                 int outputLoggingIdx;                                                   
00601 };
00602 
00603 
00604 CLOSE_NAMESPACE_ACADO
00605 
00606 
00607 #include <acado/user_interaction/algorithmic_base.ipp>
00608 
00609 
00610 #endif  // ACADO_TOOLKIT_ALGORITHMIC_BASE_HPP
00611 
00612 
00613 /*
00614  *      end of file
00615  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:36:41