$extrastylesheet
Dakota  Version 6.2
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Analyzer Class Reference

Base class for NonD, DACE, and ParamStudy branches of the iterator hierarchy. More...

Inheritance diagram for Analyzer:
Iterator NonD PStudyDACE Verification EfficientSubspaceMethod NonDCalibration NonDExpansion NonDIntegration NonDInterval NonDPOFDarts NonDReliability NonDSampling DDACEDesignCompExp FSUDesignCompExp ParamStudy PSUADEDesignCompExp RichExtrapVerification

List of all members.

Public Member Functions

const VariablesArray & all_variables ()
 return the complete set of evaluated variables
const RealMatrix & all_samples ()
 return the complete set of evaluated samples
const IntResponseMap & all_responses () const
 return the complete set of computed responses
int num_samples () const
virtual void vary_pattern (bool pattern_flag)
 sets varyPattern in derived classes that support it

Protected Member Functions

 Analyzer ()
 default constructor
 Analyzer (ProblemDescDB &problem_db, Model &model)
 standard constructor
 Analyzer (unsigned short method_name, Model &model)
 alternate constructor for instantiations "on the fly" with a Model
 Analyzer (unsigned short method_name)
 alternate constructor for instantiations "on the fly" without a Model
 ~Analyzer ()
 destructor
virtual void get_parameter_sets (Model &model)
 Returns one block of samples (ndim * num_samples)
virtual void update_model_from_sample (Model &model, const Real *sample_vars)
 update model's current variables with data from sample
virtual void update_model_from_variables (Model &model, const Variables &vars)
 update model's current variables with data from vars
virtual void sample_to_variables (const Real *sample_vars, Variables &vars)
 convert column of samples array to variables; derived classes may reimplement for more than active continuous variables
void update_from_model (const Model &model)
 set inherited data attributes based on extractions from incoming model
void initialize_run ()
 utility function to perform common operations prior to pre_run(); typically memory initialization; setting of instance pointers
void post_run (std::ostream &s)
 post-run portion of run (optional); verbose to print results; re-implemented by Iterators that can read all Variables/Responses and perform final analysis phase in a standalone way
void pre_output ()
void print_results (std::ostream &s)
 print the final iterator results
const Modelalgorithm_space_model () const
const Variablesvariables_results () const
 return a single final iterator solution (variables)
const Responseresponse_results () const
 return a single final iterator solution (response)
const VariablesArray & variables_array_results ()
 return multiple final iterator solutions (variables). This should only be used if returns_multiple_points() returns true.
const ResponseArray & response_array_results ()
 return multiple final iterator solutions (response). This should only be used if returns_multiple_points() returns true.
void response_results_active_set (const ActiveSet &set)
 set the requested data for the final iterator response results
bool compact_mode () const
 returns Analyzer::compactMode
bool returns_multiple_points () const
 indicates if this iterator returns multiple final points. Default return is false. Override to return true if appropriate.
void evaluate_parameter_sets (Model &model, bool log_resp_flag, bool log_best_flag)
 perform function evaluations to map parameter sets (allVariables) into response sets (allResponses)
void variance_based_decomp (int ncont, int ndiscint, int ndiscreal, int num_samples)
void read_variables_responses (int num_evals, size_t num_vars)
 convenience function for reading variables/responses (used in derived classes post_input)
void print_sobol_indices (std::ostream &s) const
 Printing of VBD results.
void samples_to_variables_array (const RealMatrix &sample_matrix, VariablesArray &vars_array)
 convert samples array to variables array; e.g., allSamples to allVariables
virtual void variables_to_sample (const Variables &vars, Real *sample_c_vars)
 convert the active continuous variables into a column of allSamples
void variables_array_to_samples (const VariablesArray &vars_array, RealMatrix &sample_matrix)
 convert variables array to samples array; e.g., allVariables to allSamples

Protected Attributes

size_t numFunctions
 number of response functions
size_t numContinuousVars
 number of active continuous vars
size_t numDiscreteIntVars
 number of active discrete integer vars
size_t numDiscreteStringVars
 number of active discrete string vars
size_t numDiscreteRealVars
 number of active discrete real vars
bool compactMode
 switch for allSamples (compact mode) instead of allVariables (normal mode)
VariablesArray allVariables
 array of all variables to be evaluated in evaluate_parameter_sets()
RealMatrix allSamples
 compact alternative to allVariables
IntResponseMap allResponses
 array of all responses to be computed in evaluate_parameter_sets()
StringArray allHeaders
 array of headers to insert into output while evaluating allVariables
size_t numObjFns
 number of objective functions
size_t numLSqTerms
 number of least squares terms
RealPairPRPMultiMap bestVarsRespMap
 map which stores best set of solutions

Private Member Functions

void compute_best_metrics (const Response &response, std::pair< Real, Real > &metrics)
 compares current evaluation to best evaluation and updates best
void update_best (const Variables &vars, int eval_id, const Response &response)
 compares current evaluation to best evaluation and updates best
void update_best (const Real *sample_c_vars, int eval_id, const Response &response)
 compares current evaluation to best evaluation and updates best

Private Attributes

int writePrecision
 write precision as specified by the user
Real vbdDropTol
 tolerance for omitting output of small VBD indices
RealVectorArray S4
 VBD main effect indices.
RealVectorArray T4
 VBD total effect indices.

Detailed Description

Base class for NonD, DACE, and ParamStudy branches of the iterator hierarchy.

The Analyzer class provides common data and functionality for various types of systems analysis, including nondeterministic analysis, design of experiments, and parameter studies.


Member Function Documentation

int num_samples ( ) const [inline, virtual]

Return current number of evaluation points. Since the calculation of samples, collocation points, etc. might be costly, provide a default implementation here that backs out from the maxEvalConcurrency.

Reimplemented from Iterator.

Reimplemented in NonDQuadrature, NonDSparseGrid, NonDSampling, NonDCubature, DDACEDesignCompExp, FSUDesignCompExp, and PSUADEDesignCompExp.

References Model::derivative_concurrency(), Iterator::iteratedModel, and Iterator::maxEvalConcurrency.

Referenced by NonDGlobalReliability::get_best_sample(), NonDPolynomialChaos::ratio_samples_to_order(), Analyzer::samples_to_variables_array(), Analyzer::variables_array_to_samples(), and Analyzer::variance_based_decomp().

void sample_to_variables ( const Real *  sample_c_vars,
Variables vars 
) [protected, virtual]
void initialize_run ( ) [protected, virtual]

utility function to perform common operations prior to pre_run(); typically memory initialization; setting of instance pointers

Perform initialization phases of run sequence, like allocating memory and setting instance pointers. Commonly used in sub-iterator executions. This is a virtual function; when re-implementing, a derived class must call its nearest parent's initialize_run(), typically _before_ performing its own implementation steps.

Reimplemented from Iterator.

Reimplemented in NonD.

References Model::is_null(), Iterator::iteratedModel, Model::set_evaluation_reference(), and Iterator::summaryOutputFlag.

void post_run ( std::ostream &  s) [protected, virtual]

post-run portion of run (optional); verbose to print results; re-implemented by Iterators that can read all Variables/Responses and perform final analysis phase in a standalone way

Post-run phase, which a derived iterator may optionally reimplement; when not present, post-run is likely integrated into run. This is a virtual function; when re-implementing, a derived class must call its nearest parent's post_run(), typically _after_ performing its own implementation steps.

Reimplemented from Iterator.

Reimplemented in NonDLHSSampling, DDACEDesignCompExp, ParamStudy, FSUDesignCompExp, and PSUADEDesignCompExp.

References Model::is_null(), Iterator::iteratedModel, Model::print_evaluation_summary(), Analyzer::print_results(), Iterator::resultsDB, Iterator::summaryOutputFlag, and ResultsManager::write_databases().

void pre_output ( ) [protected, virtual]
void print_results ( std::ostream &  s) [protected, virtual]
const Model & algorithm_space_model ( ) const [inline, protected, virtual]

default definition that gets redefined in selected derived Minimizers

Reimplemented from Iterator.

Reimplemented in NonDExpansion, NonDGlobalInterval, NonDBayesCalibration, and NonDReliability.

References Iterator::iteratedModel.

void evaluate_parameter_sets ( Model model,
bool  log_resp_flag,
bool  log_best_flag 
) [protected]
void variance_based_decomp ( int  ncont,
int  ndiscint,
int  ndiscreal,
int  num_samples 
) [protected]
void read_variables_responses ( int  num_evals,
size_t  num_vars 
) [protected]
void print_sobol_indices ( std::ostream &  s) const [protected]
void variables_to_sample ( const Variables vars,
Real *  sample_c_vars 
) [protected, virtual]

convert the active continuous variables into a column of allSamples

Default implementation maps active continuous variables only

Reimplemented in NonDSampling.

References Variables::continuous_variables(), and Analyzer::numContinuousVars.

Referenced by Analyzer::read_variables_responses(), and Analyzer::variables_array_to_samples().


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