scp_evaluation.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 
34 #ifndef ACADO_TOOLKIT_SCP_EVALUATION_HPP
35 #define ACADO_TOOLKIT_SCP_EVALUATION_HPP
36 
37 
40 
44 
47 
48 
49 
51 
52 
64 {
65 
66 
67  //
68  // PUBLIC MEMBER FUNCTIONS:
69  //
70  public:
71 
73  SCPevaluation( );
74 
75  SCPevaluation( UserInteraction* _userInteraction,
76  const Objective* const objective_,
77  const DynamicDiscretization* const dynamic_discretization_,
78  const Constraint* const constraint_,
79  BooleanType _isCP = BT_FALSE
80  );
81 
84 
86  virtual ~SCPevaluation( );
87 
89  SCPevaluation& operator=( const SCPevaluation& rhs );
90 
91  virtual SCPevaluation* clone() const;
92 
93 
94  virtual returnValue init( const OCPiterate& iter
95  );
96 
97 
101  virtual returnValue evaluate( OCPiterate& iter, BandedCP& cp );
102 
103 
108  virtual returnValue evaluateSensitivities( const OCPiterate& iter,
109  BandedCP& cp
110  );
111 
117  const OCPiterate& iter,
118  const BandedCP& cp,
119  BlockMatrix &nablaL
120  );
121 
122 
123 
128  virtual double getKKTtolerance( const OCPiterate& iter,
129  const BandedCP& cp,
130  double KKTmultiplierRegularisation = 0.0
131  );
132 
133 
134  virtual double getObjectiveValue( ) const;
135 
136 
137 
138 
139 
140 
142  );
143 
144 
146 
147 
148  inline BooleanType hasLSQobjective( ) const;
149 
150  inline BooleanType isDynamicNLP( ) const;
151  inline BooleanType isStaticNLP( ) const;
152 
153  inline uint getNumConstraints( ) const;
154  inline uint getNumConstraintBlocks( ) const;
155  inline DVector getConstraintBlockDims( ) const;
156 
157 
158  virtual returnValue freezeSensitivities( );
159 
161 
162 
163 
164  //
165  // PROTECTED MEMBER FUNCTIONS:
166  //
167  protected:
168 
169  virtual returnValue setupOptions( );
170  virtual returnValue setupLogging( );
171 
172 
173  //
174  // DATA MEMBERS:
175  //
176  protected:
177 
182  double objectiveValue;
186 };
187 
188 
190 
191 
192 
193 #include <acado/nlp_solver/scp_evaluation.ipp>
194 
195 
196 #endif // ACADO_TOOLKIT_SCP_EVALUATION_HPP
197 
198 /*
199  * end of file
200  */
#define N
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
virtual SCPevaluation * clone() const
DVector getConstraintBlockDims() const
returnValue setReference(const VariablesGrid &ref)
returnValue clearDynamicDiscretization()
Stores and evaluates the constraints of optimal control problems.
Definition: constraint.hpp:60
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
Base class for all algorithmic modules within the ACADO Toolkit providing some basic functionality...
virtual returnValue evaluate(OCPiterate &iter, BandedCP &cp)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
virtual returnValue evaluateLagrangeGradient(uint N, const OCPiterate &iter, const BandedCP &cp, BlockMatrix &nablaL)
#define CLOSE_NAMESPACE_ACADO
uint getNumConstraintBlocks() const
Base class for discretizing a DifferentialEquation for use in optimal control algorithms.
BooleanType areSensitivitiesFrozen
virtual double getObjectiveValue() const
virtual double getKKTtolerance(const OCPiterate &iter, const BandedCP &cp, double KKTmultiplierRegularisation=0.0)
SCPevaluation & operator=(const SCPevaluation &rhs)
BooleanType isDynamicNLP() const
virtual returnValue evaluateSensitivities(const OCPiterate &iter, BandedCP &cp)
BooleanType isCP
Objective * objective
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
BooleanType hasLSQobjective() const
Constraint * constraint
virtual returnValue init(const OCPiterate &iter)
virtual returnValue freezeSensitivities()
virtual returnValue setupLogging()
virtual returnValue unfreezeSensitivities()
Base class for different ways to evaluate functions and derivatives within an SCPmethod for solving N...
#define BEGIN_NAMESPACE_ACADO
DynamicDiscretization * dynamicDiscretization
#define BT_FALSE
Definition: acado_types.hpp:49
uint getNumConstraints() const
virtual ~SCPevaluation()
BooleanType isStaticNLP() const
Stores and evaluates the objective function of optimal control problems.
Definition: objective.hpp:123
virtual returnValue setupOptions()
Data class for storing conic programs arising from optimal control.
Definition: banded_cp.hpp:56


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