multi_objective_algorithm.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 
33 #ifndef ACADO_TOOLKIT_MULTI_OBJECTIVE_ALGORITHM_HPP
34 #define ACADO_TOOLKIT_MULTI_OBJECTIVE_ALGORITHM_HPP
35 
36 
39 
40 
42 
43 
55 {
56  //
57  // PUBLIC MEMBER FUNCTIONS:
58  //
59  public:
60 
63 
65  MultiObjectiveAlgorithm( const OCP& ocp_ );
66 
69 
71  virtual ~MultiObjectiveAlgorithm( );
72 
75 
76 
77 
79  virtual returnValue solve( );
80 
81 
91  virtual returnValue solveSingleObjective( const int &number );
92 
93 
94 
102  inline returnValue setParetoFrontDiscretization( const int &N_ );
103 
104 
105 
113  inline returnValue getParetoFront( VariablesGrid &paretoFront ) const;
114 
115 
116 
124  inline returnValue getParetoFrontWithFilter( VariablesGrid &paretoFront ) const;
125 
126 
127 
132  inline DMatrix getPayOffMatrix( ) const;
133 
134 
139  inline DMatrix getNormalizedPayOffMatrix( ) const;
140 
141 
142 
147  inline DVector getUtopiaVector( ) const;
148 
149 
150 
155  inline DVector getNadirVector( ) const;
156 
157 
158 
164  inline DVector getNormalizationVector( ) const;
165 
166 
167 
172  inline DMatrix getUtopiaPlaneVectors( ) const;
173 
174 
175 
180  inline returnValue printInfo();
181 
182 
187  inline DMatrix getWeights() const;
188 
189 
194  inline returnValue getWeights( const char*fileName ) const;
195 
196 
202  inline returnValue getWeightsWithFilter( const char*fileName ) const;
203 
204 
205  inline returnValue getAllDifferentialStates( const char*fileName ) const;
206  inline returnValue getAllAlgebraicStates ( const char*fileName ) const;
207  inline returnValue getAllParameters ( const char*fileName ) const;
208  inline returnValue getAllControls ( const char*fileName ) const;
209  inline returnValue getAllDisturbances ( const char*fileName ) const;
210 
211 
212 
213  //
214  // PROTECTED MEMBER FUNCTIONS:
215  //
216  protected:
217 
218  virtual returnValue setupOptions( );
219 
220  virtual returnValue initializeNlpSolver( const OCPiterate& _userInit
221  );
222 
224  );
225 
226 
231  returnValue formulateOCP( double *idx ,
232  OCP *ocp_,
233  Expression **arg );
234 
235 
241  VariablesGrid &xa_ ,
242  VariablesGrid &p_ ,
243  VariablesGrid &u_ ,
244  VariablesGrid &w_ ,
245  Expression **arg1 );
246 
247 
248 
249 
250  inline returnValue printAuxiliaryRoutine( const char*fileName, VariablesGrid *x_ ) const;
251 
252 
253  //
254  // DATA MEMBERS:
255  //
256  protected:
257 
258  int N ; // number of discretization intervals
259  int m ; // number of objectives
260  DMatrix vertices ; // result for the objective values at the
261  // vertices of the simplex.
262 
263  DMatrix result ; // the result stored in a matrix
264  int count ; // counter for the results being stored
265 
266 
272 
273 
274  private:
275 
277  double totalCPUtime ;
278 };
279 
280 
281 
282 
284 
285 
286 #include <acado/optimization_algorithm/multi_objective_algorithm.ipp>
287 
288 
289 #endif // ACADO_TOOLKIT_MULTI_OBJECTIVE_ALGORITHM_HPP
290 
291 /*
292  * end of file
293  */
returnValue printAuxiliaryRoutine(const char *fileName, VariablesGrid *x_) const
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
DMatrix getWeights() const
MultiObjectiveAlgorithm & operator=(const MultiObjectiveAlgorithm &arg)
DVector getNormalizationVector() const
User-interface to formulate and solve optimal control problems and static NLPs.
DMatrix getPayOffMatrix() const
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
returnValue getAllAlgebraicStates(const char *fileName) const
returnValue printInfo()
returnValue getParetoFrontWithFilter(VariablesGrid &paretoFront) const
#define CLOSE_NAMESPACE_ACADO
returnValue evaluateObjectives(VariablesGrid &xd_, VariablesGrid &xa_, VariablesGrid &p_, VariablesGrid &u_, VariablesGrid &w_, Expression **arg1)
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
DVector getUtopiaVector() const
returnValue getAllControls(const char *fileName) const
returnValue getWeightsWithFilter(const char *fileName) const
returnValue getParetoFront(VariablesGrid &paretoFront) const
Data class for defining optimal control problems.
Definition: ocp.hpp:89
returnValue setParetoFrontDiscretization(const int &N_)
virtual returnValue initializeObjective(Objective *F)
DMatrix getUtopiaPlaneVectors() const
virtual returnValue initializeNlpSolver(const OCPiterate &_userInit)
virtual returnValue solveSingleObjective(const int &number)
returnValue formulateOCP(double *idx, OCP *ocp_, Expression **arg)
returnValue getAllDisturbances(const char *fileName) const
DMatrix getNormalizedPayOffMatrix() const
#define BEGIN_NAMESPACE_ACADO
User-interface to formulate and solve optimal control problems with multiple objectives.
returnValue getAllDifferentialStates(const char *fileName) const
returnValue getAllParameters(const char *fileName) const
DVector getNadirVector() const
Stores and evaluates the objective function of optimal control problems.
Definition: objective.hpp:123


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