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 (Design &des)
 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

void SeparateVariables (const Design &from, RealVector &intoCont, IntVector &intoDiscInt, RealVector &intoDiscReal) const
 This method fills intoCont, intoDiscInt and intoDiscReal 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.

Referenced by Evaluator::Clone().

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".

Referenced by Evaluator::GetName().

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.

Referenced by Evaluator::GetDescription().

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

This method fills intoCont, intoDiscInt and intoDiscReal appropriately using the values of from.

The discrete integer design variable values are placed in intoDiscInt, the discrete real design variable values are placed in intoDiscReal, and the continuum are placed into intoCont. The values are written into the vectors from the beginning so any previous contents of the vectors will be overwritten.

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

References Evaluator::_model, Model::cv(), Model::discrete_design_set_int_values(), Model::discrete_design_set_real_values(), Model::div(), and Model::drv().

Referenced by Evaluator::Evaluate().

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.

References Evaluator::GetNumberNonLinearConstraints().

Referenced by Evaluator::Evaluate().

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.

References Evaluator::_model, Model::num_nonlinear_eq_constraints(), and Model::num_nonlinear_ineq_constraints().

Referenced by Evaluator::Evaluate(), and Evaluator::RecordResponses().

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.

References Evaluator::_model, Model::num_linear_eq_constraints(), and Model::num_linear_ineq_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.

References Evaluator::_model, Model::asynch_compute_response(), Model::asynch_flag(), Model::compute_response(), Model::continuous_variables(), Model::current_response(), Model::discrete_int_variables(), Model::discrete_real_variables(), Response::function_values(), Evaluator::GetName(), Evaluator::GetNumberNonLinearConstraints(), Evaluator::RecordResponses(), Evaluator::SeparateVariables(), and Model::synchronize().

virtual bool Evaluate ( Design &  des  )  [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:
des A 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.

References Evaluator::GetName().

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

Returns the proper name of this operator.

Returns:
See Name().

References Evaluator::Name().

Referenced by Evaluator::Evaluate().

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

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

Returns:
See Description().

References Evaluator::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.

References Evaluator::_model, and Evaluator::Evaluator().


Member Data Documentation

Model& _model [private]

The Model known by this evaluator.

It is through this model that evaluations will take place.

Referenced by Evaluator::Clone(), Evaluator::Evaluate(), Evaluator::GetNumberLinearConstraints(), Evaluator::GetNumberNonLinearConstraints(), and Evaluator::SeparateVariables().


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

Generated on 15 May 2012 for DAKOTA by  doxygen 1.6.1