JEGAOptimizer::Evaluator Class Reference

An evaluator specialization that knows how to interact with Dakota. More...

List of all members.

Public Member Functions

virtual bool Evaluate (DesignGroup &group)
 Does evaluation of each design in group.
virtual bool Evaluate (EvaluationJob &eJob)
 This method cannot be used!!
virtual std::string GetName () const
 Returns the proper name of this operator.
virtual std::string GetDescription () const
 Returns a full description of what this operator does and how.
virtual GeneticAlgorithmOperator * Clone (GeneticAlgorithm &algorithm) const
 Creates and returns a pointer to an exact duplicate of this operator.
 Evaluator (GeneticAlgorithm &algorithm, Model &model)
 Constructs a Evaluator for use by algorithm.
 Evaluator (const Evaluator &copy)
 Copy constructs a Evaluator.
 Evaluator (const Evaluator &copy, GeneticAlgorithm &algorithm, Model &model)
 Copy constructs a Evaluator for use by algorithm.

Static Public Member Functions

static const std::string & Name ()
 Returns the proper name of this operator.
static const std::string & Description ()
 Returns a full description of what this operator does and how.

Protected Member Functions

RealVector GetContinuumVariableValues (const Design &from) const
 Returns the continuous Design variable values held in Design from.
IntVector GetDiscreteVariableValues (const Design &from) const
 Returns the discrete Design variable values held in Design from.
void GetContinuumVariableValues (const Design &from, RealVector &into) const
 Places the continuous Design variable values from Design from into RealVector into.
void GetDiscreteVariableValues (const Design &from, IntVector &into) const
 Places the discrete Design variable values from Design from into IntVector into.
void SeparateVariables (const Design &from, IntVector &intoDisc, RealVector &intoCont) const
 This method fills intoDisc and intoCont appropriately using the values of from.
void RecordResponses (const RealVector &from, Design &into) const
 Records the computed objective and constraint function values into into.
std::size_t GetNumberNonLinearConstraints () const
 Returns the number of non-linear constraints for the problem.
std::size_t GetNumberLinearConstraints () const
 Returns the number of linear constraints for the problem.

Private Member Functions

 Evaluator (GeneticAlgorithm &algorithm)
 This constructor has no implementation and cannot be used.

Private Attributes

Model_model
 The Model known by this evaluator.


Detailed Description

An evaluator specialization that knows how to interact with Dakota.

This evaluator knows how to use the model to do evaluations both in synchronous and asynchronous modes.


Constructor & Destructor Documentation

Evaluator ( GeneticAlgorithm &  algorithm,
Model model 
) [inline]

Constructs a Evaluator for use by algorithm.

The optimizer is needed for purposes of variable scaling.

Parameters:
algorithm The GA for which the new evaluator is to be used.
model The model through which evaluations will be done.

Evaluator ( const Evaluator copy  )  [inline]

Copy constructs a Evaluator.

Parameters:
copy The evaluator from which properties are to be duplicated into this.

Evaluator ( const Evaluator copy,
GeneticAlgorithm &  algorithm,
Model model 
) [inline]

Copy constructs a Evaluator for use by algorithm.

The optimizer is needed for purposes of variable scaling.

Parameters:
copy The existing Evaluator from which to retrieve properties.
algorithm The GA for which the new evaluator is to be used.
model The model through which evaluations will be done.

Evaluator ( GeneticAlgorithm &  algorithm  )  [private]

This constructor has no implementation and cannot be used.

This constructor can never be used. It is provided so that this operator can still be registered in an operator registry even though it can never be instantiated from there.

Parameters:
algorithm The GA for which the new evaluator is to be used.


Member Function Documentation

static const std::string& Name (  )  [inline, static]

Returns the proper name of this operator.

Returns:
The string "DAKOTA JEGA Evaluator".

static const std::string& Description (  )  [inline, static]

Returns a full description of what this operator does and how.

The returned text is:

            This evaluator uses Sandia's DAKOTA optimization
            software to evaluate the passed in Designs.  This
            makes it possible to take advantage of the fact that
            DAKOTA is designed to run on massively parallel machines.
           
.

Returns:
A description of the operation of this operator.

RealVector GetContinuumVariableValues ( const Design &  from  )  const [inline, protected]

Returns the continuous Design variable values held in Design from.

It returns them as a RealVector for use in the Dakota interface. The values in the returned vector will be the actual values intended for use in the evaluation functions.

Parameters:
from The Design class object from which to extract the continuous design variable values.
Returns:
A vector of the continuous design variable values associated with from.

IntVector GetDiscreteVariableValues ( const Design &  from  )  const [inline, protected]

Returns the discrete Design variable values held in Design from.

It returns them as a IntVector for use in the Dakota interface. The values in the returned vector will be the values for the design variables as far as JEGA knows. However, in actuality, the values are the representations due to the way that Dakota manages discrete variables.

Parameters:
from The Design class object from which to extract the discrete design variable values.
Returns:
A vector of the discrete design variable values associated with from.

void GetContinuumVariableValues ( const Design &  from,
RealVector into 
) const [protected]

Places the continuous Design variable values from Design from into RealVector into.

The values in the returned vector will be the actual values intended for use in the evaluation functions.

Parameters:
from The Design class object from which to extract the continuous design variable values.
into The vector into which to place the extracted values.

void GetDiscreteVariableValues ( const Design &  from,
IntVector into 
) const [protected]

Places the discrete Design variable values from Design from into IntVector into.

The values placed in the vector will be the values for the design variables as far as JEGA knows. However, in actuality, the values are the representations due to the way that Dakota manages discrete variables.

Parameters:
from The Design class object from which to extract the discrete design variable values.
into The vector into which to place the extracted values.

void SeparateVariables ( const Design &  from,
IntVector intoDisc,
RealVector intoCont 
) const [protected]

This method fills intoDisc and intoCont appropriately using the values of from.

The discrete design variable values are placed in intoDisc and the continuum are placed into intoCont.

It is more efficient to use this method than to use GetDiscreateVariableValues and GetContinuumVariableValues separately if you want both.

Parameters:
from The Design class object from which to extract the discrete design variable values.
intoDisc The vector into which to place the extracted discrete values.
intoCont The vector into which to place the extracted continuous values.

void RecordResponses ( const RealVector from,
Design &  into 
) const [protected]

Records the computed objective and constraint function values into into.

This method takes the response values stored in from and properly transfers them into the into design.

The response vector from is expected to contain values for each objective function followed by values for each non-linear constraint in the order in which the info objects were loaded into the target by the optimizer class.

Parameters:
from The vector of responses to install into into.
into The Design to which the responses belong and into which they must be written.

std::size_t GetNumberNonLinearConstraints (  )  const [inline, protected]

Returns the number of non-linear constraints for the problem.

This is computed by adding the number of non-linear equality constraints to the number of non-linear inequality constraints. These values are obtained from the model.

Returns:
The total number of non-linear constraints.

std::size_t GetNumberLinearConstraints (  )  const [inline, protected]

Returns the number of linear constraints for the problem.

This is computed by adding the number of linear equality constraints to the number of linear inequality constraints. These values are obtained from the model.

Returns:
The total number of linear constraints.

bool Evaluate ( DesignGroup &  group  )  [virtual]

Does evaluation of each design in group.

This method uses the Model known by this class to get Designs evaluated. It properly formats the Design class information in a way that Dakota will understand and then interprets the Dakota results and puts them back into the Design class object. It respects the asynchronous flag in the Model so evaluations may occur synchronously or asynchronously.

Prior to evaluating a Design, this class checks to see if it is marked as already evaluated. If it is, then the evaluation of that Design is not carried out. This is not strictly necessary because Dakota keeps track of evaluated designs and does not re-evaluate. An exception is the case of a population read in from a file complete with responses where Dakota is unaware of the evaluations.

Parameters:
group The group of Design class objects to be evaluated.
Returns:
true if all evaluations completed and false otherwise.

virtual bool Evaluate ( EvaluationJob &  eJob  )  [inline, virtual]

This method cannot be used!!

This method does nothing and cannot be called. This is because in the case of asynchronous evaluation, this method would be unable to conform. It would require that each evaluation be done in a synchronous fashion.

Parameters:
eJob A job holding the Design that would be evaluated if this method worked.
Returns:
Would return true if the Design were evaluated and false otherwise. Never actually returns here. Issues a fatal error. Otherwise, it would always return false.

virtual std::string GetName (  )  const [inline, virtual]

Returns the proper name of this operator.

Returns:
See Name().

virtual std::string GetDescription (  )  const [inline, virtual]

Returns a full description of what this operator does and how.

Returns:
See Description().

virtual GeneticAlgorithmOperator* Clone ( GeneticAlgorithm &  algorithm  )  const [inline, virtual]

Creates and returns a pointer to an exact duplicate of this operator.

Parameters:
algorithm The GA for which the clone is being created.
Returns:
A clone of this operator.


Member Data Documentation

Model& _model [private]

The Model known by this evaluator.

It is through this model that evaluations will take place.


The documentation for this class was generated from the following file:
Generated on Wed Nov 5 19:54:06 2008 for DAKOTA by  doxygen 1.5.1