33 #ifndef DART_OPTIMIZER_MULTIOBJECTIVESOLVER_HPP_
34 #define DART_OPTIMIZER_MULTIOBJECTIVESOLVER_HPP_
40 #include <Eigen/Dense>
47 class MultiObjectiveProblem;
67 std::shared_ptr<MultiObjectiveProblem>
mProblem;
93 std::shared_ptr<MultiObjectiveProblem> problem =
nullptr,
94 std::size_t numPopulations = 1u,
95 std::size_t populationSize = 100u,
96 double tolerance = 1e-9,
97 std::size_t numMaxIterations = 500u,
98 std::size_t iterationsPerPrint = 0u,
99 std::ostream* ostream = &std::cout,
100 bool printFinalResult =
false);
110 virtual bool solve(std::size_t numEvolutions = 1u) = 0;
116 virtual std::shared_ptr<MultiObjectiveSolver>
clone()
const = 0;
124 virtual void setProblem(std::shared_ptr<MultiObjectiveProblem> problem);
127 std::shared_ptr<MultiObjectiveProblem>
getProblem()
const;
BodyPropPtr properties
Definition: SdfParser.cpp:80
std::size_t index
Definition: SkelParser.cpp:1617
Abstract class that provides a common interface for different multi-objective optimization solvers.
Definition: MultiObjectiveSolver.hpp:58
const std::vector< Population > & getPopulations() const
Returns all the populations.
Definition: MultiObjectiveSolver.cpp:137
virtual void setProblem(std::shared_ptr< MultiObjectiveProblem > problem)
Definition: MultiObjectiveSolver.cpp:92
void setNumIterationsPerEvolution(std::size_t maxIterations)
Sets the number of iterations per evolution.
Definition: MultiObjectiveSolver.cpp:143
std::size_t getNumIterationsPerEvolution() const
Returns the number of iterations per evolution.
Definition: MultiObjectiveSolver.cpp:150
virtual std::shared_ptr< MultiObjectiveSolver > clone() const =0
Creates an identical clone of this Solver.
virtual std::string getType() const =0
Returns the type (implementation) of this Solver.
const Properties & getSolverProperties() const
Get the generic Properties of this Solver.
Definition: MultiObjectiveSolver.cpp:86
void setNumPopulations(std::size_t size)
Sets the number of populations.
Definition: MultiObjectiveSolver.cpp:117
std::size_t getPopulationSize() const
Return sthe number of decision vectors in one population.
Definition: MultiObjectiveSolver.cpp:111
void setPopulationSize(std::size_t size)
Sets the number of decision vectors in one population.
Definition: MultiObjectiveSolver.cpp:105
virtual bool solve(std::size_t numEvolutions=1u)=0
Solve optimization problem.
MultiObjectiveSolver(const Properties &properties=Properties())
Default constructor.
Definition: MultiObjectiveSolver.cpp:65
void setProperties(const Properties &properties)
Set the generic Properties of this Solver.
Definition: MultiObjectiveSolver.cpp:71
virtual ~MultiObjectiveSolver()=default
Destructor.
std::shared_ptr< MultiObjectiveProblem > getProblem() const
Get nonlinear optimization problem.
Definition: MultiObjectiveSolver.cpp:99
std::size_t getNumPopulations() const
Returns the number of populations.
Definition: MultiObjectiveSolver.cpp:124
const Population & getPopulation(std::size_t index) const
Returns a population at index.
Definition: MultiObjectiveSolver.cpp:131
Properties mProperties
Properties.
Definition: MultiObjectiveSolver.hpp:159
std::vector< Population > mPopulations
Populations.
Definition: MultiObjectiveSolver.hpp:162
Definition: Population.hpp:50
Definition: BulletCollisionDetector.cpp:63
The MultiObjectiveSolver::Properties class contains Solver parameters that are common to all MultiObj...
Definition: MultiObjectiveSolver.hpp:65
std::size_t mNumPopulations
Number of populations.
Definition: MultiObjectiveSolver.hpp:70
std::shared_ptr< MultiObjectiveProblem > mProblem
Multi-objective optimization problem to be solved.
Definition: MultiObjectiveSolver.hpp:67
std::size_t mIterationsPerPrint
How many iterations between printing the Solver's progress to the terminal.
Definition: MultiObjectiveSolver.hpp:83
std::ostream * mOutStream
Stream for printing the Solver's progress. Default is std::cout.
Definition: MultiObjectiveSolver.hpp:86
std::size_t mIterationsPerEvolution
How many iterations per evolution.
Definition: MultiObjectiveSolver.hpp:79
std::size_t mPopulationSize
Number of decision vectors in one population.
Definition: MultiObjectiveSolver.hpp:73
bool mPrintFinalResult
Set to true if the final result should be printed to the terminal.
Definition: MultiObjectiveSolver.hpp:89
Properties(std::shared_ptr< MultiObjectiveProblem > problem=nullptr, std::size_t numPopulations=1u, std::size_t populationSize=100u, double tolerance=1e-9, std::size_t numMaxIterations=500u, std::size_t iterationsPerPrint=0u, std::ostream *ostream=&std::cout, bool printFinalResult=false)
Constructor.
Definition: MultiObjectiveSolver.cpp:43
double mTolerance
The maximum step size allowed for the Problem to be considered converged.
Definition: MultiObjectiveSolver.hpp:76