multi_objective_algorithm.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_MULTI_OBJECTIVE_ALGORITHM_HPP
00034 #define ACADO_TOOLKIT_MULTI_OBJECTIVE_ALGORITHM_HPP
00035 
00036 
00037 #include <acado/optimization_algorithm/optimization_algorithm.hpp>
00038 #include <acado/optimization_algorithm/weight_generation.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00054 class MultiObjectiveAlgorithm : public OptimizationAlgorithm
00055 {
00056     //
00057     // PUBLIC MEMBER FUNCTIONS:
00058     //
00059     public:
00060 
00062         MultiObjectiveAlgorithm();
00063 
00065         MultiObjectiveAlgorithm( const OCP& ocp_ );
00066 
00068         MultiObjectiveAlgorithm( const MultiObjectiveAlgorithm& arg );
00069 
00071         virtual ~MultiObjectiveAlgorithm( );
00072 
00074         MultiObjectiveAlgorithm& operator=( const MultiObjectiveAlgorithm& arg );
00075 
00076 
00077 
00079         virtual returnValue solve( );
00080 
00081 
00091         virtual returnValue solveSingleObjective( const int &number );
00092 
00093 
00094 
00102         inline returnValue setParetoFrontDiscretization( const int &N_ );
00103 
00104 
00105 
00113         inline returnValue getParetoFront( VariablesGrid &paretoFront ) const;
00114 
00115 
00116 
00124         inline returnValue getParetoFrontWithFilter( VariablesGrid &paretoFront ) const;
00125 
00126 
00127 
00132         inline DMatrix getPayOffMatrix( ) const;
00133 
00134 
00139         inline DMatrix getNormalizedPayOffMatrix( ) const;
00140 
00141 
00142 
00147         inline DVector getUtopiaVector( ) const;
00148 
00149 
00150 
00155         inline DVector getNadirVector( ) const;
00156 
00157 
00158 
00164         inline DVector getNormalizationVector( ) const;
00165 
00166 
00167 
00172         inline DMatrix getUtopiaPlaneVectors( ) const;
00173 
00174 
00175 
00180         inline returnValue printInfo();
00181 
00182 
00187         inline DMatrix getWeights() const;
00188 
00189 
00194         inline returnValue getWeights( const char*fileName ) const;
00195 
00196 
00202         inline returnValue getWeightsWithFilter( const char*fileName ) const;
00203 
00204 
00205         inline returnValue getAllDifferentialStates( const char*fileName ) const;
00206         inline returnValue getAllAlgebraicStates   ( const char*fileName ) const;
00207         inline returnValue getAllParameters        ( const char*fileName ) const;
00208         inline returnValue getAllControls          ( const char*fileName ) const;
00209         inline returnValue getAllDisturbances      ( const char*fileName ) const;
00210 
00211 
00212 
00213     //
00214     // PROTECTED MEMBER FUNCTIONS:
00215     //
00216     protected:
00217 
00218                 virtual returnValue setupOptions( );
00219 
00220         virtual returnValue initializeNlpSolver(        const OCPiterate& _userInit
00221                                                                                                         );
00222 
00223         virtual returnValue initializeObjective(        Objective* F
00224                                                                                                         );
00225 
00226 
00231         returnValue formulateOCP( double      *idx ,
00232                                   OCP         *ocp_,
00233                                   Expression **arg   );
00234 
00235 
00240         returnValue evaluateObjectives( VariablesGrid    &xd_ ,
00241                                         VariablesGrid    &xa_ ,
00242                                         VariablesGrid    &p_  ,
00243                                         VariablesGrid    &u_  ,
00244                                         VariablesGrid    &w_  ,
00245                                         Expression      **arg1  );
00246 
00247 
00248 
00249 
00250         inline returnValue printAuxiliaryRoutine( const char*fileName, VariablesGrid *x_ ) const;
00251 
00252 
00253     //
00254     // DATA MEMBERS:
00255     //
00256     protected:
00257 
00258         int            N           ;   // number of discretization intervals
00259         int            m           ;   // number of objectives
00260         DMatrix         vertices    ;   // result for the objective values at the
00261                                        // vertices of the simplex.
00262 
00263         DMatrix         result      ;   // the result stored in a matrix
00264         int            count       ;   // counter for the results being stored
00265 
00266 
00267         VariablesGrid *xResults    ;
00268         VariablesGrid *xaResults   ;
00269         VariablesGrid *pResults    ;
00270         VariablesGrid *uResults    ;
00271         VariablesGrid *wResults    ;
00272 
00273 
00274      private:
00275 
00276         int     totalNumberOfSQPiterations;
00277         double  totalCPUtime              ;
00278 };
00279 
00280 
00281 
00282 
00283 CLOSE_NAMESPACE_ACADO
00284 
00285 
00286 #include <acado/optimization_algorithm/multi_objective_algorithm.ipp>
00287 
00288 
00289 #endif  // ACADO_TOOLKIT_MULTI_OBJECTIVE_ALGORITHM_HPP
00290 
00291 /*
00292  *   end of file
00293  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:59:22