Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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
00166
00167 protected:
00168
00169 virtual returnValue setupOptions( );
00170 virtual returnValue setupLogging( );
00171
00172
00173
00174
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
00200