Class for vector, list, centered, and multidimensional parameter studies. More...
Public Member Functions | |
ParamStudy (Model &model) | |
constructor | |
~ParamStudy () | |
destructor | |
void | pre_run () |
pre-run portion of run_iterator (optional); re-implemented by Iterators which can generate all Variables (parameter sets) a priori | |
void | extract_trends () |
Redefines the run_iterator virtual function for the PStudy/DACE branch. | |
void | post_input () |
read tabular data for post-run mode | |
void | post_run (std::ostream &s) |
post-run portion of run_iterator (optional); verbose to print results; re-implemented by Iterators that can read all Variables/Responses and perform final analysis phase in a standalone way | |
Private Member Functions | |
void | sample () |
performs the parameter study by sampling from a list of points | |
void | vector_loop () |
performs the parameter study by sampling along a vector, starting from an initial point followed by numSteps increments along continous/discrete step vectors | |
void | centered_loop () |
performs a number of plus and minus offsets for each parameter centered about an initial point | |
void | multidim_loop () |
performs a full factorial combination for all intersections defined by a set of multidimensional partitions | |
bool | distribute_list_of_points (const RealVector &list_of_pts) |
distributes incoming list_of_pts among listCVPoints, listDIVPoints, and listDRVPoints | |
bool | distribute_step_vector (const RealVector &step_vector) |
distributes incoming step_vector among contStepVector and discStepVector | |
void | final_point_to_step_vector () |
compute step vectors from finalPoint, initial points, and numSteps | |
void | distribute_partitions () |
compute step vectors from variablePartitions and global bounds | |
bool | check_num_steps (int num_steps) |
perform error checks on numSteps | |
bool | check_final_point (const RealVector &final_pt) |
perform error checks on finalPoint | |
bool | check_steps_per_variable (const IntVector &steps_per_var) |
perform error checks on stepsPerVariable | |
bool | check_variable_partitions (const UShortArray &partitions) |
perform error checks on variablePartitions | |
bool | check_finite_bounds () |
check for finite variable bounds within iteratedModel, as required for computing partitions of finite ranges | |
bool | check_ranges_sets (int num_steps) |
sanity check for vector parameter study | |
bool | check_ranges_sets (const IntVector &steps) |
sanity check for centered parameter study | |
bool | check_sets (const IntVector &steps) |
sanity check for increments along int/real set dimensions | |
int | truncate (const Real &value) const |
cast Real to int and ensure no resulting change in value | |
int | integer_step (int range, int num_steps) const |
check for integer remainder and return step | |
int | index_step (size_t start, size_t end, int num_steps) const |
check for out of bounds and index remainder and return step | |
void | write_ordered (std::ostream &s, const RealVector &c_vector, const IntVector &di_vector, const RealVector &dr_vector) |
reorder CV/DIV/DRV into standard output order | |
void | write_ordered (std::ostream &s, const RealVector &c_vector, const IntVector &d_vector) |
reorder CV/DV into standard output order | |
void | c_step (size_t c_index, int increment, Variables &vars) |
helper function for performing a continuous step in one variable | |
void | dri_step (size_t d_index, size_t di_index, int increment, Variables &vars) |
helper function for performing a discrete step in an integer range variable | |
void | dsi_step (size_t d_index, size_t di_index, int increment, const IntSet &values, Variables &vars) |
helper function for performing a discrete step in an integer set variable | |
void | dsr_step (size_t d_index, size_t dr_index, int increment, const RealSet &values, Variables &vars) |
helper function for performing a discrete step in a real set variable | |
Private Attributes | |
short | pStudyType |
internal code for parameter study type: LIST, VECTOR_SV, VECTOR_FP, CENTERED, or MULTIDIM | |
size_t | numEvals |
total number of parameter study evaluations computed from specification | |
RealVectorArray | listCVPoints |
array of continuous evaluation points for the list_parameter_study | |
IntVectorArray | listDIVPoints |
array of discrete int evaluation points for the list_parameter_study | |
RealVectorArray | listDRVPoints |
array of discrete real evaluation points for the list_parameter_study | |
RealVector | initialCVPoint |
the continuous starting point for vector and centered parameter studies | |
IntVector | initialDIVPoint |
the continuous starting point for vector and centered parameter studies | |
RealVector | initialDRVPoint |
the continuous starting point for vector and centered parameter studies | |
RealVector | finalPoint |
the ending point for vector_parameter_study (a specification option) | |
RealVector | contStepVector |
the n-dimensional continuous increment in vector_parameter_study | |
IntVector | discStepVector |
the n-dimensional discrete increment in vector_parameter_study | |
int | numSteps |
the number of times stepVector is applied in vector_parameter_study | |
IntVector | stepsPerVariable |
number of offsets in the plus and the minus direction for each variable in a centered_parameter_study | |
UShortArray | variablePartitions |
number of partitions for each variable in a multidim_parameter_study |
Class for vector, list, centered, and multidimensional parameter studies.
The ParamStudy class contains several algorithms for performing parameter studies of different types. The vector parameter study steps along an n-dimensional vector from an arbitrary initial point to an arbitrary final point in a specified number of steps. The centered parameter study performs a number of plus and minus offsets in each coordinate direction around a center point. A multidimensional parameter study fills an n-dimensional hypercube based on bounds and a specified number of partitions for each dimension. And the list parameter study provides for a user specification of a list of points to evaluate, which allows general parameter investigations not fitting the structure of vector, centered, or multidim parameter studies.
void pre_run | ( | ) | [virtual] |
pre-run portion of run_iterator (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 Iterator.
References Dakota::abort_handler(), Analyzer::allHeaders, Analyzer::allVariables, ParamStudy::centered_loop(), Model::continuous_variables(), ParamStudy::contStepVector, Dakota::copy_data(), Model::current_variables(), Model::discrete_int_variables(), Model::discrete_real_variables(), ParamStudy::discStepVector, ParamStudy::distribute_partitions(), ParamStudy::final_point_to_step_vector(), ParamStudy::finalPoint, ParamStudy::initialCVPoint, ParamStudy::initialDIVPoint, ParamStudy::initialDRVPoint, Iterator::iteratedModel, ParamStudy::multidim_loop(), ParamStudy::numEvals, ParamStudy::numSteps, Iterator::outputLevel, ParamStudy::pStudyType, ParamStudy::sample(), Variables::shared_data(), ParamStudy::stepsPerVariable, ParamStudy::variablePartitions, ParamStudy::vector_loop(), Dakota::write_data(), and ParamStudy::write_ordered().
void post_run | ( | std::ostream & | s | ) | [virtual] |
post-run portion of run_iterator (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.
References Analyzer::allResponses, Analyzer::allVariables, SensAnalysisGlobal::compute_correlations(), PStudyDACE::pStudyDACESensGlobal, ParamStudy::pStudyType, and Iterator::subIteratorFlag.