Dakota  Version
Explore and Predict with Confidence
Public Member Functions | List of all members
JEGAOptimizer::Driver Class Reference

A subclass of the JEGA front end driver that exposes the individual protected methods to execute the algorithm. More...

Inherits Driver.

Public Member Functions

GeneticAlgorithm * ExtractAllData (const AlgorithmConfig &algConfig)
 Reads all required data from the problem description database stored in the supplied algorithm config. More...
 
DesignOFSortSet PerformIterations (GeneticAlgorithm *theGA)
 Performs the required iterations on the supplied GA. More...
 
void DestroyAlgorithm (GeneticAlgorithm *theGA)
 Deletes the supplied GA. More...
 
 Driver (const ProblemConfig &probConfig)
 Default constructs a Driver. More...
 

Detailed Description

A subclass of the JEGA front end driver that exposes the individual protected methods to execute the algorithm.

This is necessary because DAKOTA requires that all problem information be extracted from the problem description DB at the time of Optimizer construction and the front end does it all in the execute algorithm method which must be called in core_run.

Constructor & Destructor Documentation

◆ Driver()

Driver ( const ProblemConfig &  probConfig)
inline

Default constructs a Driver.

Parameters
probConfigThe definition of the problem to be solved by this Driver whenever ExecuteAlgorithm is called.

The problem can be solved in multiple ways by multiple algorithms even using multiple different evaluators by issuing multiple calls to ExecuteAlgorithm with different AlgorithmConfigs.

Member Function Documentation

◆ ExtractAllData()

GeneticAlgorithm* ExtractAllData ( const AlgorithmConfig &  algConfig)
inline

Reads all required data from the problem description database stored in the supplied algorithm config.

The returned GA is fully configured and ready to be run. It must also be destroyed at some later time. You MUST call DestroyAlgorithm for this purpose. Failure to do so could result in a memory leak and an eventual segmentation fault! Be sure to call DestroyAlgorithm prior to destroying the algorithm config that was used to create it!

This is just here to expose the base class method to users.

Parameters
algConfigThe fully loaded configuration object containing the database of parameters for the algorithm to be run on the known problem.
Returns
The fully configured and loaded GA ready to be run using the PerformIterations method.

Referenced by JEGAOptimizer::core_run().

◆ PerformIterations()

DesignOFSortSet PerformIterations ( GeneticAlgorithm *  theGA)
inline

Performs the required iterations on the supplied GA.

This includes the calls to AlgorithmInitialize and AlgorithmFinalize and logs some information if appropriate.

This is just here to expose the base class method to users.

Parameters
theGAThe GA on which to perform iterations. This parameter must be non-null.
Returns
The final solutions reported by the supplied GA after all iterations and call to AlgorithmFinalize.

Referenced by JEGAOptimizer::core_run().

◆ DestroyAlgorithm()

void DestroyAlgorithm ( GeneticAlgorithm *  theGA)
inline

Deletes the supplied GA.

Use this method to destroy a GA after all iterations have been run. This method knows if the log associated with the GA was created here and needs to be destroyed as well or not.

This is just here to expose the base class method to users.

Be sure to use this prior to destoying the algorithm config object which contains the target. The GA destructor needs the target to be in tact.

Parameters
theGAThe algorithm that is no longer needed and thus must be destroyed.

Referenced by JEGAOptimizer::core_run().


The documentation for this class was generated from the following file: