$extrastylesheet
Dakota
Version 6.2
|
A version of Dakota::Optimizer for instantiation of John Eddy's Genetic Algorithms (JEGA). More...
Classes | |
class | Driver |
A subclass of the JEGA front end driver that exposes the individual protected methods to execute the algorithm. More... | |
class | Evaluator |
An evaluator specialization that knows how to interact with Dakota. More... | |
class | EvaluatorCreator |
A specialization of the JEGA::FrontEnd::EvaluatorCreator that creates a new instance of a Evaluator. More... | |
Public Member Functions | |
virtual void | find_optimum () |
Performs the iterations to determine the optimal set of solutions. | |
virtual bool | accepts_multiple_points () const |
Overridden to return true since JEGA algorithms can accept multiple initial points. | |
virtual bool | returns_multiple_points () const |
Overridden to return true since JEGA algorithms can return multiple final points. | |
virtual void | initial_points (const VariablesArray &pts) |
Overridden to assign the _initPts member variable to the passed in collection of Dakota::Variables. | |
virtual const VariablesArray & | initial_points () const |
Overridden to return the collection of initial points for the JEGA algorithm created and run by this JEGAOptimizer. | |
JEGAOptimizer (ProblemDescDB &problem_db, Model &model) | |
Constructs a JEGAOptimizer class object. | |
~JEGAOptimizer () | |
Destructs a JEGAOptimizer. | |
Protected Member Functions | |
void | LoadDakotaResponses (const JEGA::Utilities::Design &from, Variables &vars, Response &resp) const |
Loads the JEGA-style Design class into equivolent Dakota-style Variables and Response objects. | |
void | ReCreateTheParameterDatabase () |
Destroys the current parameter database and creates a new empty one. | |
void | LoadTheParameterDatabase () |
Reads information out of the known Dakota::ProblemDescDB and puts it into the current parameter database. | |
void | LoadAlgorithmConfig (JEGA::FrontEnd::AlgorithmConfig &aConfig) |
Completely initializes the supplied algorithm configuration. | |
void | LoadProblemConfig (JEGA::FrontEnd::ProblemConfig &pConfig) |
Completely initializes the supplied problem configuration. | |
void | LoadTheDesignVariables (JEGA::FrontEnd::ProblemConfig &pConfig) |
Adds DesignVariableInfo objects into the problem configuration object. | |
void | LoadTheObjectiveFunctions (JEGA::FrontEnd::ProblemConfig &pConfig) |
Adds ObjectiveFunctionInfo objects into the problem configuration object. | |
void | LoadTheConstraints (JEGA::FrontEnd::ProblemConfig &pConfig) |
Adds ConstraintInfo objects into the problem configuration object. | |
void | GetBestSolutions (const JEGA::Utilities::DesignOFSortSet &from, const JEGA::Algorithms::GeneticAlgorithm &theGA, std::multimap< RealRealPair, JEGA::Utilities::Design * > &designSortMap) |
Returns up to _numBest designs sorted by DAKOTA's fitness (L2 constraint violation, then utopia or objective), taking into account the algorithm type. The front of the returned map can be viewed as a single "best". | |
void | GetBestMOSolutions (const JEGA::Utilities::DesignOFSortSet &from, const JEGA::Algorithms::GeneticAlgorithm &theGA, std::multimap< RealRealPair, JEGA::Utilities::Design * > &designSortMap) |
Retreive the best Designs from a set of solutions assuming that they are generated by a multi objective algorithm. | |
void | GetBestSOSolutions (const JEGA::Utilities::DesignOFSortSet &from, const JEGA::Algorithms::GeneticAlgorithm &theGA, std::multimap< RealRealPair, JEGA::Utilities::Design * > &designSortMap) |
Retreive the best Designs from a set of solutions assuming that they are generated by a single objective algorithm. | |
JEGA::DoubleMatrix | ToDoubleMatrix (const VariablesArray &variables) const |
Converts the items in a VariablesArray into a DoubleMatrix whereby the items in the matrix are the design variables. | |
Private Attributes | |
EvaluatorCreator * | _theEvalCreator |
A pointer to an EvaluatorCreator used to create the evaluator used by JEGA in Dakota (a JEGAEvaluator). | |
JEGA::Utilities::ParameterDatabase * | _theParamDB |
A pointer to the ParameterDatabase from which all parameters are retrieved by the created algorithms. | |
VariablesArray | _initPts |
An array of initial points to use as an initial population. |
A version of Dakota::Optimizer for instantiation of John Eddy's Genetic Algorithms (JEGA).
This class encapsulates the necessary functionality for creating and properly initializing the JEGA algorithms (MOGA and SOGA).
JEGAOptimizer | ( | ProblemDescDB & | problem_db, |
Model & | model | ||
) |
Constructs a JEGAOptimizer class object.
This method does some of the initialization work for the algorithm. In particular, it initialized the JEGA core.
problem_db | The Dakota::ProblemDescDB with information on how the algorithm controls should be set. |
model | The Dakota::Model that will be used by this optimizer for problem information, etc. |
References JEGAOptimizer::_theEvalCreator, ProblemDescDB::get_int(), ProblemDescDB::get_short(), Iterator::iteratedModel, JEGAOptimizer::LoadTheParameterDatabase(), Iterator::maxEvalConcurrency, Iterator::methodName, Iterator::numFinalSolutions, and Iterator::probDescDB.
void LoadDakotaResponses | ( | const JEGA::Utilities::Design & | from, |
Dakota::Variables & | vars, | ||
Dakota::Response & | resp | ||
) | const [protected] |
Loads the JEGA-style Design class into equivolent Dakota-style Variables and Response objects.
This version is meant for the case where a Variables and a Response object exist and just need to be loaded.
from | The JEGA Design class object from which to extract the variable and response information for Dakota. |
vars | The Dakota::Variables object into which to load the design variable values of from. |
resp | The Dakota::Response object into which to load the objective function and constraint values of from. |
References Variables::continuous_variables(), Variables::discrete_int_variables(), Variables::discrete_real_variables(), and Response::function_values().
void LoadTheParameterDatabase | ( | ) | [protected] |
Reads information out of the known Dakota::ProblemDescDB and puts it into the current parameter database.
This should be called from the JEGAOptimizer constructor since it is the only time when the problem description database is certain to be configured to supply data for this optimizer.
Referenced by JEGAOptimizer::JEGAOptimizer().
void LoadAlgorithmConfig | ( | JEGA::FrontEnd::AlgorithmConfig & | aConfig | ) | [protected] |
Completely initializes the supplied algorithm configuration.
This loads the supplied configuration object with appropriate data retrieved from the parameter database.
aConfig | The algorithm configuration object to load. |
void LoadProblemConfig | ( | JEGA::FrontEnd::ProblemConfig & | pConfig | ) | [protected] |
Completely initializes the supplied problem configuration.
This loads the fresh configuration object using the LoadTheDesignVariables, LoadTheObjectiveFunctions, and LoadTheConstraints methods.
pConfig | The problem configuration object to load. |
void LoadTheDesignVariables | ( | JEGA::FrontEnd::ProblemConfig & | pConfig | ) | [protected] |
Adds DesignVariableInfo objects into the problem configuration object.
This retrieves design variable information from the ParameterDatabase and creates DesignVariableInfo's from it.
pConfig | The problem configuration object to load. |
References Model::continuous_lower_bounds().
void LoadTheObjectiveFunctions | ( | JEGA::FrontEnd::ProblemConfig & | pConfig | ) | [protected] |
Adds ObjectiveFunctionInfo objects into the problem configuration object.
This retrieves objective function information from the ParameterDatabase and creates ObjectiveFunctionInfo's from it.
pConfig | The problem configuration object to load. |
void LoadTheConstraints | ( | JEGA::FrontEnd::ProblemConfig & | pConfig | ) | [protected] |
Adds ConstraintInfo objects into the problem configuration object.
This retrieves constraint function information from the ParameterDatabase and creates ConstraintInfo's from it.
pConfig | The problem configuration object to load. |
References Dakota::asstring(), Dakota::copy_row_vector(), and Model::nonlinear_ineq_constraint_lower_bounds().
void GetBestSolutions | ( | const JEGA::Utilities::DesignOFSortSet & | from, |
const JEGA::Algorithms::GeneticAlgorithm & | theGA, | ||
std::multimap< RealRealPair, JEGA::Utilities::Design * > & | designSortMap | ||
) | [protected] |
Returns up to _numBest designs sorted by DAKOTA's fitness (L2 constraint violation, then utopia or objective), taking into account the algorithm type. The front of the returned map can be viewed as a single "best".
from | The full set of designs returned by the solver. |
theGA | The GA used to generate this set; needed for its weights in the SO case, provided to both for consistency |
designSortMap | Map of best solutions with key pair<constraintViolation, fitness> |
eventually this functionality must be moved into a separate post-processing application for MO datasets.
void GetBestMOSolutions | ( | const JEGA::Utilities::DesignOFSortSet & | from, |
const JEGA::Algorithms::GeneticAlgorithm & | theGA, | ||
std::multimap< RealRealPair, JEGA::Utilities::Design * > & | designSortMap | ||
) | [protected] |
Retreive the best Designs from a set of solutions assuming that they are generated by a multi objective algorithm.
eventually this functionality must be moved into a separate post-processing application for MO datasets.
void GetBestSOSolutions | ( | const JEGA::Utilities::DesignOFSortSet & | from, |
const JEGA::Algorithms::GeneticAlgorithm & | theGA, | ||
std::multimap< RealRealPair, JEGA::Utilities::Design * > & | designSortMap | ||
) | [protected] |
Retreive the best Designs from a set of solutions assuming that they are generated by a single objective algorithm.
eventually this functionality must be moved into a separate post-processing application for MO datasets.
References Dakota::abort_handler().
JEGA::DoubleMatrix ToDoubleMatrix | ( | const VariablesArray & | variables | ) | const [protected] |
Converts the items in a VariablesArray into a DoubleMatrix whereby the items in the matrix are the design variables.
The matrix will not contain responses but when being used by Dakota, this doesn't matter. JEGA will attempt to re-evaluate these points but Dakota will recognize that they do not require re-evaluation and thus it will be a cheap operation.
variables | The array of DakotaVariables objects to use as the contents of the returned matrix. |
void find_optimum | ( | ) | [virtual] |
Performs the iterations to determine the optimal set of solutions.
Override of pure virtual method in Optimizer base class.
The extraction of parameter values actually occurs in this method when the JEGA::FrontEnd::Driver::ExecuteAlgorithm is called. Also the loading of the problem and algorithm configurations occurs in this method. That way, if it is called more than once and the algorithm or problem has changed, it will be accounted for.
Implements Optimizer.
References JEGAOptimizer::Driver::DestroyAlgorithm(), JEGAOptimizer::Driver::ExtractAllData(), and JEGAOptimizer::Driver::PerformIterations().
bool accepts_multiple_points | ( | ) | const [virtual] |
Overridden to return true since JEGA algorithms can accept multiple initial points.
Reimplemented from Iterator.
bool returns_multiple_points | ( | ) | const [virtual] |
Overridden to return true since JEGA algorithms can return multiple final points.
Reimplemented from Iterator.
void initial_points | ( | const VariablesArray & | pts | ) | [virtual] |
Overridden to assign the _initPts member variable to the passed in collection of Dakota::Variables.
pts | The array of initial points for the JEGA algorithm created and run by this JEGAOptimizer. |
Reimplemented from Iterator.
const VariablesArray & initial_points | ( | ) | const [virtual] |
Overridden to return the collection of initial points for the JEGA algorithm created and run by this JEGAOptimizer.
Reimplemented from Iterator.
VariablesArray _initPts [private] |
An array of initial points to use as an initial population.
This member is here to help support the use of JEGA algorithms in Dakota strategies. If this array is populated, then whatever initializer is specified will be ignored and the DoubleMatrix initializer will be used instead on a matrix created from the data in this array.