Dakota  Version 6.15
Explore and Predict with Confidence
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
FSUDesignCompExp Class Reference

Wrapper class for the FSUDace QMC/CVT library. More...

Inheritance diagram for FSUDesignCompExp:
PStudyDACE Analyzer Iterator

Public Member Functions

 FSUDesignCompExp (ProblemDescDB &problem_db, Model &model)
 primary constructor for building a standard DACE iterator More...
 
 FSUDesignCompExp (Model &model, int samples, int seed, unsigned short sampling_method)
 alternate constructor for building a DACE iterator on-the-fly More...
 
 ~FSUDesignCompExp ()
 destructor
 
bool resize ()
 reinitializes iterator based on new variable size
 

Protected Member Functions

void pre_run ()
 pre-run portion of run (optional); re-implemented by Iterators which can generate all Variables (parameter sets) a priori More...
 
void core_run ()
 core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post More...
 
void post_input ()
 read tabular data for post-run mode
 
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 More...
 
int num_samples () const
 
void sampling_reset (int min_samples, bool all_data_flag, bool stats_flag)
 reset sampling iterator to use at least min_samples
 
unsigned short sampling_scheme () const
 return sampling name
 
void vary_pattern (bool pattern_flag)
 sets varyPattern in derived classes that support it
 
void get_parameter_sets (Model &model)
 Generate one block of numSamples samples (ndim * num_samples), populating allSamples; ParamStudy is the only class that specializes to use allVariables.
 
void get_parameter_sets (Model &model, const int num_samples, RealMatrix &design_matrix)
 Generate one block of numSamples samples (ndim * num_samples), populating design_matrix.
 
- Protected Member Functions inherited from PStudyDACE
 PStudyDACE (ProblemDescDB &problem_db, Model &model)
 constructor
 
 PStudyDACE (unsigned short method_name, Model &model)
 alternate constructor for instantiations "on the fly"
 
 ~PStudyDACE ()
 destructor
 
void print_results (std::ostream &s, short results_state=FINAL_RESULTS)
 print the final iterator results More...
 
void volumetric_quality (int ndim, int num_samples, double *sample_points)
 Calculation of volumetric quality measures. More...
 
- Protected Member Functions inherited from Analyzer
 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 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 More...
 
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 More...
 
void finalize_run ()
 utility function to perform common operations following post_run(); deallocation and resetting of instance pointers More...
 
void pre_output ()
 
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) More...
 
void get_vbd_parameter_sets (Model &model, int num_samples)
 generate replicate parameter sets for use in variance-based decomposition More...
 
void compute_vbd_stats (const int num_samples, const IntResponseMap &resp_samples)
 compute VBD-based Sobol indices More...
 
void archive_sobol_indices () const
 archive VBD-based Sobol indices More...
 
virtual void archive_model_variables (const Model &, size_t idx) const
 archive model evaluation points
 
virtual void archive_model_response (const Response &, size_t idx) const
 archive model evaluation responses
 
void read_variables_responses (int num_evals, size_t num_vars)
 convenience function for reading variables/responses (used in derived classes post_input) More...
 
void print_sobol_indices (std::ostream &s) const
 Printing of VBD results. More...
 
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 More...
 
void variables_array_to_samples (const VariablesArray &vars_array, RealMatrix &sample_matrix)
 convert variables array to samples array; e.g., allVariables to allSamples
 
- Protected Member Functions inherited from Iterator
 Iterator (BaseConstructor, ProblemDescDB &problem_db, std::shared_ptr< TraitsBase > traits=std::shared_ptr< TraitsBase >(new TraitsBase()))
 constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
 Iterator (NoDBBaseConstructor, unsigned short method_name, Model &model, std::shared_ptr< TraitsBase > traits=std::shared_ptr< TraitsBase >(new TraitsBase()))
 alternate constructor for base iterator classes constructed on the fly More...
 
 Iterator (NoDBBaseConstructor, unsigned short method_name, std::shared_ptr< TraitsBase > traits=std::shared_ptr< TraitsBase >(new TraitsBase()))
 alternate constructor for base iterator classes constructed on the fly More...
 
virtual void derived_init_communicators (ParLevLIter pl_iter)
 derived class contributions to initializing the communicators associated with this Iterator instance
 
virtual const VariablesArray & initial_points () const
 gets the multiple initial points for this iterator. This will only be meaningful after a call to initial_points mutator.
 
StrStrSizet run_identifier () const
 get the unique run identifier based on method name, id, and number of executions
 
void initialize_model_graphics (Model &model, int iterator_server_id)
 helper function that encapsulates initialization operations, modular on incoming Model instance More...
 
void export_final_surrogates (Model &data_fit_surr_model)
 export final surrogates generated, e.g., GP in EGO and friends More...
 

Private Member Functions

void enforce_input_rules ()
 enforce sanity checks/modifications for the user input specification More...
 

Private Attributes

int samplesSpec
 initial specification of number of samples
 
int numSamples
 current number of samples to be evaluated
 
bool allDataFlag
 flag which triggers the update of allVars/allResponses for use by Iterator::all_variables() and Iterator::all_responses()
 
size_t numDACERuns
 counter for number of executions for this object
 
bool latinizeFlag
 flag which specifies latinization of QMC or CVT sample sets
 
IntVector sequenceStart
 Integer vector defining a starting index into the sequence for random variable sampled. Default is 0 0 0 (e.g. for three random variables).
 
IntVector sequenceLeap
 Integer vector defining the leap number for each sequence being generated. Default is 1 1 1 (e.g. for three random vars.)
 
IntVector primeBase
 Integer vector defining the prime base for each sequence being generated. Default is 2 3 5 (e.g., for three random vars.)
 
int seedSpec
 the user seed specification for the random number generator (allows repeatable results)
 
int randomSeed
 current seed for the random number generator
 
bool varyPattern
 flag for continuing the random number or QMC sequence from a previous execution (e.g., for surrogate-based optimization) so that multiple executions are repeatable but not identical.
 
int numCVTTrials
 specifies the number of sample points taken at internal CVT iteration
 
int trialType
 Trial type in CVT. Specifies where the points are placed for consideration relative to the centroids. Choices are grid (2), halton (1), uniform (0), or random (-1). Default is random.
 

Additional Inherited Members

- Static Protected Member Functions inherited from Iterator
static void gnewton_set_recast (const Variables &recast_vars, const ActiveSet &recast_set, ActiveSet &sub_model_set)
 conversion of request vector values for the Gauss-Newton Hessian approximation More...
 
- Protected Attributes inherited from PStudyDACE
SensAnalysisGlobal pStudyDACESensGlobal
 initialize statistical post processing
 
bool volQualityFlag
 flag which specifies evaluation of volumetric quality measures
 
bool varBasedDecompFlag
 flag which specifies calculating variance based decomposition sensitivity analysis metrics
 

Detailed Description

Wrapper class for the FSUDace QMC/CVT library.

The FSUDesignCompExp class provides a wrapper for FSUDace, a C++ design of experiments library from Florida State University. This class uses quasi Monte Carlo (QMC) and Centroidal Voronoi Tesselation (CVT) methods to uniformly sample the parameter space spanned by the active bounds of the current Model. It returns all generated samples and their corresponding responses as well as the best sample found.

Constructor & Destructor Documentation

FSUDesignCompExp ( ProblemDescDB problem_db,
Model model 
)
FSUDesignCompExp ( Model model,
int  samples,
int  seed,
unsigned short  sampling_method 
)

Member Function Documentation

void pre_run ( )
protectedvirtual

pre-run portion of run (optional); re-implemented by Iterators which can generate all Variables (parameter sets) a priori

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

Reimplemented from Analyzer.

References FSUDesignCompExp::enforce_input_rules(), FSUDesignCompExp::get_parameter_sets(), Analyzer::get_vbd_parameter_sets(), Iterator::iteratedModel, FSUDesignCompExp::numSamples, Analyzer::pre_run(), and PStudyDACE::varBasedDecompFlag.

void core_run ( )
protectedvirtual

core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post

Virtual run function for the iterator class hierarchy. All derived classes need to redefine it.

Reimplemented from Iterator.

References FSUDesignCompExp::allDataFlag, Analyzer::evaluate_parameter_sets(), Iterator::iteratedModel, Analyzer::numLSqTerms, Analyzer::numObjFns, and Iterator::subIteratorFlag.

void post_run ( std::ostream &  s)
protectedvirtual

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

References Analyzer::allResponses, Analyzer::allSamples, SensAnalysisGlobal::compute_correlations(), Analyzer::compute_vbd_stats(), FSUDesignCompExp::enforce_input_rules(), FSUDesignCompExp::numSamples, Analyzer::post_run(), PStudyDACE::pStudyDACESensGlobal, Iterator::subIteratorFlag, and PStudyDACE::varBasedDecompFlag.

int num_samples ( ) const
inlineprotectedvirtual

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

References FSUDesignCompExp::numSamples.

Referenced by FSUDesignCompExp::get_parameter_sets().

void enforce_input_rules ( )
private

enforce sanity checks/modifications for the user input specification

Users may input a variety of quantities, but this function must enforce any restrictions imposed by the sampling algorithms.

References Dakota::abort_handler(), Iterator::methodName, Analyzer::numContinuousVars, FSUDesignCompExp::numSamples, and FSUDesignCompExp::primeBase.

Referenced by FSUDesignCompExp::post_input(), FSUDesignCompExp::post_run(), and FSUDesignCompExp::pre_run().


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