scp_evaluation.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 
00034 #ifndef ACADO_TOOLKIT_SCP_EVALUATION_HPP
00035 #define ACADO_TOOLKIT_SCP_EVALUATION_HPP
00036 
00037 
00038 #include <acado/utils/acado_utils.hpp>
00039 #include <acado/user_interaction/algorithmic_base.hpp>
00040 
00041 #include <acado/objective/objective.hpp>
00042 #include <acado/dynamic_discretization/dynamic_discretization.hpp>
00043 #include <acado/constraint/constraint.hpp>
00044 
00045 #include <acado/function/ocp_iterate.hpp>
00046 #include <acado/conic_program/banded_cp.hpp>
00047 
00048 
00049 
00050 BEGIN_NAMESPACE_ACADO
00051 
00052 
00063 class SCPevaluation : public AlgorithmicBase
00064 {
00065 
00066 
00067     //
00068     // PUBLIC MEMBER FUNCTIONS:
00069     //
00070     public:
00071 
00073         SCPevaluation( );
00074 
00075                 SCPevaluation(  UserInteraction* _userInteraction,
00076                                                 const Objective* const objective_,
00077                                                 const DynamicDiscretization* const dynamic_discretization_,
00078                                                 const Constraint* const constraint_,
00079                                                 BooleanType _isCP = BT_FALSE
00080                                                 );
00081 
00083         SCPevaluation( const SCPevaluation& rhs );
00084 
00086         virtual ~SCPevaluation( );
00087 
00089         SCPevaluation& operator=( const SCPevaluation& rhs );
00090 
00091         virtual SCPevaluation* clone() const;
00092 
00093 
00094                 virtual returnValue init(       const OCPiterate& iter
00095                                                                         );
00096 
00097 
00101         virtual returnValue evaluate( OCPiterate& iter, BandedCP& cp );
00102 
00103 
00108         virtual returnValue evaluateSensitivities(      const OCPiterate& iter,
00109                                                                                                 BandedCP& cp
00110                                                                                                 );
00111 
00116         virtual returnValue evaluateLagrangeGradient(   uint N,
00117                                                                                                                 const OCPiterate& iter,
00118                                                                                                         const BandedCP& cp,
00119                                                                                                                 BlockMatrix &nablaL
00120                                                                                                                 );
00121 
00122 
00123 
00128         virtual double getKKTtolerance( const OCPiterate& iter,
00129                                                                         const BandedCP& cp,
00130                                                                         double KKTmultiplierRegularisation = 0.0
00131                                                                         );
00132 
00133 
00134         virtual double getObjectiveValue( ) const;
00135 
00136 
00137 
00138 
00139 
00140 
00141         returnValue setReference(       const VariablesGrid& ref
00142                                                                 );
00143 
00144 
00145                 returnValue clearDynamicDiscretization( );
00146 
00147 
00148                 inline BooleanType hasLSQobjective( ) const;
00149 
00150                 inline BooleanType isDynamicNLP( ) const;
00151                 inline BooleanType isStaticNLP( ) const;
00152 
00153                 inline uint getNumConstraints( ) const;
00154                 inline uint getNumConstraintBlocks( ) const;
00155                 inline DVector getConstraintBlockDims( ) const;
00156 
00157 
00158                 virtual returnValue freezeSensitivities( );
00159 
00160                 virtual returnValue unfreezeSensitivities( );
00161 
00162 
00163 
00164     //
00165     // PROTECTED MEMBER FUNCTIONS:
00166     //
00167     protected:
00168 
00169                 virtual returnValue setupOptions( );
00170                 virtual returnValue setupLogging( );
00171 
00172 
00173     //
00174     // DATA MEMBERS:
00175     //
00176     protected:
00177 
00178         Objective*             objective            ;  
00179         DynamicDiscretization* dynamicDiscretization;  
00180         Constraint*            constraint           ;  
00182         double objectiveValue;     
00184                 BooleanType isCP;
00185                 BooleanType areSensitivitiesFrozen;
00186 };
00187 
00188 
00189 CLOSE_NAMESPACE_ACADO
00190 
00191 
00192 
00193 #include <acado/nlp_solver/scp_evaluation.ipp>
00194 
00195 
00196 #endif  // ACADO_TOOLKIT_SCP_EVALUATION_HPP
00197 
00198 /*
00199  *  end of file
00200  */


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