$extrastylesheet
Dakota
Version 6.2
|
Base class for the model class hierarchy. More...
Public Member Functions | |
Model () | |
default constructor | |
Model (ProblemDescDB &problem_db) | |
standard constructor for envelope | |
Model (const Model &model) | |
copy constructor | |
virtual | ~Model () |
destructor | |
Model | operator= (const Model &model) |
assignment operator | |
virtual Iterator & | subordinate_iterator () |
return the sub-iterator in nested and surrogate models | |
virtual Model & | subordinate_model () |
return a single sub-model defined from subModel in nested and recast models and truth_model() in surrogate models; used for a directed dive through model recursions that may bypass some components. | |
virtual Model & | surrogate_model () |
return the approximation sub-model in surrogate models | |
virtual Model & | truth_model () |
return the truth sub-model in surrogate models | |
virtual void | derived_subordinate_models (ModelList &ml, bool recurse_flag) |
portion of subordinate_models() specific to derived model classes | |
virtual void | update_from_subordinate_model (bool recurse_flag=true) |
propagate vars/labels/bounds/targets from the bottom up | |
virtual Interface & | derived_interface () |
return the interface employed by the derived model class, if present: SingleModel::userDefinedInterface, DataFitSurrModel::approxInterface, or NestedModel::optionalInterface | |
virtual void | primary_response_fn_weights (const RealVector &wts, bool recurse_flag=true) |
set the relative weightings for multiple objective functions or least squares terms | |
virtual void | surrogate_function_indices (const IntSet &surr_fn_indices) |
set the (currently active) surrogate function index set | |
virtual void | build_approximation () |
build a new SurrogateModel approximation | |
virtual bool | build_approximation (const Variables &vars, const IntResponsePair &response_pr) |
build a new SurrogateModel approximation using/enforcing response at vars | |
virtual void | update_approximation (bool rebuild_flag) |
replace the approximation data within an existing surrogate based on data updates propagated elsewhere | |
virtual void | update_approximation (const Variables &vars, const IntResponsePair &response_pr, bool rebuild_flag) |
replace the anchor point data within an existing surrogate | |
virtual void | update_approximation (const VariablesArray &vars_array, const IntResponseMap &resp_map, bool rebuild_flag) |
replace the data points within an existing surrogate | |
virtual void | update_approximation (const RealMatrix &samples, const IntResponseMap &resp_map, bool rebuild_flag) |
replace the data points within an existing surrogate | |
virtual void | append_approximation (bool rebuild_flag) |
append to the existing approximation data within a surrogate based on data updates propagated elsewhere | |
virtual void | append_approximation (const Variables &vars, const IntResponsePair &response_pr, bool rebuild_flag) |
append a single point to an existing surrogate's data | |
virtual void | append_approximation (const VariablesArray &vars_array, const IntResponseMap &resp_map, bool rebuild_flag) |
append multiple points to an existing surrogate's data | |
virtual void | append_approximation (const RealMatrix &samples, const IntResponseMap &resp_map, bool rebuild_flag) |
append multiple points to an existing surrogate's data | |
virtual void | pop_approximation (bool save_surr_data, bool rebuild_flag=false) |
remove the previous data set addition to a surrogate (e.g., due to a previous append_approximation() call); flag manages storing of surrogate data for use in a subsequent restore_approximation() | |
virtual void | restore_approximation () |
restore a previous approximation data state within a surrogate | |
virtual bool | restore_available () |
query for whether a trial increment is restorable within a surrogate | |
virtual void | finalize_approximation () |
finalize an approximation by applying all previous trial increments | |
virtual void | store_approximation () |
move the current approximation into storage for later combination | |
virtual void | combine_approximation (short corr_type) |
combine the current approximation with one previously stored | |
virtual bool | force_rebuild () |
determine whether a surrogate model rebuild should be forced based on changes in the inactive data | |
virtual SharedApproxData & | shared_approximation () |
retrieve the shared approximation data within the ApproximationInterface of a DataFitSurrModel | |
virtual std::vector < Approximation > & | approximations () |
retrieve the set of Approximations within the ApproximationInterface of a DataFitSurrModel | |
virtual const Pecos::SurrogateData & | approximation_data (size_t index) |
retrieve the approximation data from a particular Approximation instance within the ApproximationInterface of a DataFitSurrModel | |
virtual const RealVectorArray & | approximation_coefficients (bool normalized=false) |
retrieve the approximation coefficients from each Approximation within a DataFitSurrModel | |
virtual void | approximation_coefficients (const RealVectorArray &approx_coeffs, bool normalized=false) |
set the approximation coefficients for each Approximation within a DataFitSurrModel | |
virtual const RealVector & | approximation_variances (const Variables &vars) |
retrieve the approximation variances from each Approximation within a DataFitSurrModel | |
virtual void | surrogate_response_mode (short mode) |
set response computation mode used in SurrogateModels for forming currentResponse | |
virtual short | surrogate_response_mode () const |
return response computation mode used in SurrogateModels for forming currentResponse | |
virtual DiscrepancyCorrection & | discrepancy_correction () |
return the DiscrepancyCorrection object used by SurrogateModels | |
virtual void | component_parallel_mode (short mode) |
update component parallel mode for supporting parallelism in a model's interface component, sub-model component, or neither component [componentParallelMode = 0 (none), 1 (INTERFACE/APPROX_INTERFACE/OPTIONAL_INTERFACE/LF_MODEL/SURROGATE_MODEL), or 2 (SUB_MODEL/ACTUAL_MODEL/HF_MODEL/TRUTH_MODEL)]. | |
virtual IntIntPair | estimate_partition_bounds (int max_eval_concurrency) |
estimate the minimum and maximum partition sizes that can be utilized by this Model | |
virtual size_t | mi_parallel_level_index () const |
return the index for the metaiterator-iterator parallelism level within ParallelConfiguration::miPLIters that is active for use in a particular Model at runtime | |
virtual short | local_eval_synchronization () |
return derived model synchronization setting | |
virtual int | local_eval_concurrency () |
return derived model asynchronous evaluation concurrency | |
virtual void | serve_run (ParLevLIter pl_iter, int max_eval_concurrency) |
Service job requests received from the master. Completes when a termination message is received from stop_servers(). | |
virtual void | stop_servers () |
Executed by the master to terminate all server operations for a particular model when iteration on the model is complete. | |
virtual bool | derived_master_overload () const |
Return a flag indicating the combination of multiprocessor evaluations and a dedicated master iterator scheduling. Used in synchronous compute_response functions to prevent the error of trying to run a multiprocessor job on the master. | |
virtual void | inactive_view (short view, bool recurse_flag=true) |
update the Model's inactive view based on higher level (nested) context | |
virtual const String & | interface_id () const |
return the interface identifier | |
virtual int | evaluation_id () const |
Return the value of the evaluation id counter for the Model. | |
virtual bool | evaluation_cache () const |
Indicates the usage of an evaluation cache by the Model. | |
virtual void | set_evaluation_reference () |
Set the reference points for the evaluation counters within the Model. | |
virtual void | fine_grained_evaluation_counters () |
Request fine-grained evaluation reporting within the Model. | |
virtual void | print_evaluation_summary (std::ostream &s, bool minimal_header=false, bool relative_count=true) const |
Print an evaluation summary for the Model. | |
virtual void | eval_tag_prefix (const String &eval_id_str) |
set the hierarchical eval ID tag prefix | |
virtual bool | db_lookup (const Variables &search_vars, const ActiveSet &search_set, Response &found_resp) |
search the eval database (during derivative estimation); derived may need to reimplement due to problem transformations (RecastModel); return true if found in DB | |
ModelList & | subordinate_models (bool recurse_flag=true) |
return the sub-models in nested and surrogate models | |
void | compute_response () |
Compute the Response at currentVariables (default ActiveSet). | |
void | compute_response (const ActiveSet &set) |
Compute the Response at currentVariables (specified ActiveSet). | |
void | asynch_compute_response () |
Spawn an asynchronous job (or jobs) that computes the value of the Response at currentVariables (default ActiveSet). | |
void | asynch_compute_response (const ActiveSet &set) |
Spawn an asynchronous job (or jobs) that computes the value of the Response at currentVariables (specified ActiveSet). | |
const IntResponseMap & | synchronize () |
Execute a blocking scheduling algorithm to collect the complete set of results from a group of asynchronous evaluations. | |
const IntResponseMap & | synchronize_nowait () |
Execute a nonblocking scheduling algorithm to collect all available results from a group of asynchronous evaluations. | |
void | init_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
allocate communicator partitions for a model and store configuration in modelPCIterMap | |
void | init_serial () |
for cases where init_communicators() will not be called, modify some default settings to behave properly in serial. | |
void | set_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
set active parallel configuration for the model (set modelPCIter from modelPCIterMap) | |
void | free_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
deallocate communicator partitions for a model | |
MPI_Comm | analysis_comm () const |
retrieve the MPI communicator on which this model is configured to conduct function evaluation analyses (provided for library clients) | |
void | stop_init (ParLevLIter pl_iter) |
called from IteratorScheduler::init_iterator() for iteratorComm rank 0 to terminate serve_init() on other iteratorComm processors | |
int | serve_init (ParLevLIter pl_iter) |
called from IteratorScheduler::init_iterator() for iteratorComm rank != 0 to balance init_communicators() calls on iteratorComm rank 0 | |
void | estimate_message_lengths () |
estimate messageLengths for a model | |
void | assign_rep (Model *model_rep, bool ref_count_incr=true) |
replaces existing letter with a new one | |
size_t | tv () const |
returns total number of vars | |
size_t | cv () const |
returns number of active continuous variables | |
size_t | div () const |
returns number of active discrete integer vars | |
size_t | dsv () const |
returns number of active discrete string vars | |
size_t | drv () const |
returns number of active discrete real vars | |
size_t | icv () const |
returns number of inactive continuous variables | |
size_t | idiv () const |
returns number of inactive discrete integer vars | |
size_t | idsv () const |
returns number of inactive discrete string vars | |
size_t | idrv () const |
returns number of inactive discrete real vars | |
size_t | acv () const |
returns total number of continuous variables | |
size_t | adiv () const |
returns total number of discrete integer vars | |
size_t | adsv () const |
returns total number of discrete string vars | |
size_t | adrv () const |
returns total number of discrete real vars | |
void | active_variables (const Variables &vars) |
set the active variables in currentVariables | |
const RealVector & | continuous_variables () const |
return the active continuous variables from currentVariables | |
void | continuous_variables (const RealVector &c_vars) |
set the active continuous variables in currentVariables | |
void | continuous_variable (Real c_var, size_t i) |
set an active continuous variable in currentVariables | |
const IntVector & | discrete_int_variables () const |
return the active discrete integer variables from currentVariables | |
void | discrete_int_variables (const IntVector &d_vars) |
set the active discrete integer variables in currentVariables | |
void | discrete_int_variable (int d_var, size_t i) |
set an active discrete integer variable in currentVariables | |
StringMultiArrayConstView | discrete_string_variables () const |
return the active discrete string variables from currentVariables | |
void | discrete_string_variables (StringMultiArrayConstView d_vars) |
set the active discrete string variables in currentVariables | |
void | discrete_string_variable (const String &d_var, size_t i) |
set an active discrete string variable in currentVariables | |
const RealVector & | discrete_real_variables () const |
return the active discrete real variables from currentVariables | |
void | discrete_real_variables (const RealVector &d_vars) |
set the active discrete real variables in currentVariables | |
void | discrete_real_variable (Real d_var, size_t i) |
set an active discrete real variable in currentVariables | |
UShortMultiArrayConstView | continuous_variable_types () const |
return the active continuous variable types from currentVariables | |
void | continuous_variable_types (UShortMultiArrayConstView cv_types) |
set the active continuous variable types in currentVariables | |
void | continuous_variable_type (unsigned short cv_type, size_t i) |
set an active continuous variable type in currentVariables | |
UShortMultiArrayConstView | discrete_int_variable_types () const |
return the active discrete variable types from currentVariables | |
void | discrete_int_variable_types (UShortMultiArrayConstView div_types) |
set the active discrete variable types in currentVariables | |
void | discrete_int_variable_type (unsigned short div_type, size_t i) |
set an active discrete variable type in currentVariables | |
UShortMultiArrayConstView | discrete_string_variable_types () const |
return the active discrete variable types from currentVariables | |
void | discrete_string_variable_types (UShortMultiArrayConstView div_types) |
set the active discrete variable types in currentVariables | |
void | discrete_string_variable_type (unsigned short div_type, size_t i) |
set an active discrete variable type in currentVariables | |
UShortMultiArrayConstView | discrete_real_variable_types () const |
return the active discrete variable types from currentVariables | |
void | discrete_real_variable_types (UShortMultiArrayConstView drv_types) |
set the active discrete variable types in currentVariables | |
void | discrete_real_variable_type (unsigned short drv_type, size_t i) |
set an active discrete variable type in currentVariables | |
SizetMultiArrayConstView | continuous_variable_ids () const |
return the active continuous variable identifiers from currentVariables | |
void | continuous_variable_ids (SizetMultiArrayConstView cv_ids) |
set the active continuous variable identifiers in currentVariables | |
void | continuous_variable_id (size_t cv_id, size_t i) |
set an active continuous variable identifier in currentVariables | |
const RealVector & | inactive_continuous_variables () const |
return the inactive continuous variables in currentVariables | |
void | inactive_continuous_variables (const RealVector &i_c_vars) |
set the inactive continuous variables in currentVariables | |
const IntVector & | inactive_discrete_int_variables () const |
return the inactive discrete variables in currentVariables | |
void | inactive_discrete_int_variables (const IntVector &i_d_vars) |
set the inactive discrete variables in currentVariables | |
StringMultiArrayConstView | inactive_discrete_string_variables () const |
return the inactive discrete variables in currentVariables | |
void | inactive_discrete_string_variables (StringMultiArrayConstView i_d_vars) |
set the inactive discrete variables in currentVariables | |
const RealVector & | inactive_discrete_real_variables () const |
return the inactive discrete variables in currentVariables | |
void | inactive_discrete_real_variables (const RealVector &i_d_vars) |
set the inactive discrete variables in currentVariables | |
UShortMultiArrayConstView | inactive_continuous_variable_types () const |
return the inactive continuous variable types from currentVariables | |
SizetMultiArrayConstView | inactive_continuous_variable_ids () const |
return the inactive continuous variable identifiers from currentVariables | |
const RealVector & | all_continuous_variables () const |
return all continuous variables in currentVariables | |
void | all_continuous_variables (const RealVector &a_c_vars) |
set all continuous variables in currentVariables | |
void | all_continuous_variable (Real a_c_var, size_t i) |
set a variable within the all continuous variables in currentVariables | |
const IntVector & | all_discrete_int_variables () const |
return all discrete variables in currentVariables | |
void | all_discrete_int_variables (const IntVector &a_d_vars) |
set all discrete variables in currentVariables | |
void | all_discrete_int_variable (int a_d_var, size_t i) |
set a variable within the all discrete variables in currentVariables | |
StringMultiArrayConstView | all_discrete_string_variables () const |
return all discrete variables in currentVariables | |
void | all_discrete_string_variables (StringMultiArrayConstView a_d_vars) |
set all discrete variables in currentVariables | |
void | all_discrete_string_variable (const String &a_d_var, size_t i) |
set a variable within the all discrete variables in currentVariables | |
const RealVector & | all_discrete_real_variables () const |
return all discrete variables in currentVariables | |
void | all_discrete_real_variables (const RealVector &a_d_vars) |
set all discrete variables in currentVariables | |
void | all_discrete_real_variable (Real a_d_var, size_t i) |
set a variable within the all discrete variables in currentVariables | |
UShortMultiArrayConstView | all_continuous_variable_types () const |
return all continuous variable types from currentVariables | |
UShortMultiArrayConstView | all_discrete_int_variable_types () const |
return all discrete variable types from currentVariables | |
UShortMultiArrayConstView | all_discrete_string_variable_types () const |
return all discrete variable types from currentVariables | |
UShortMultiArrayConstView | all_discrete_real_variable_types () const |
return all discrete variable types from currentVariables | |
SizetMultiArrayConstView | all_continuous_variable_ids () const |
return all continuous variable identifiers from currentVariables | |
const IntSetArray & | discrete_design_set_int_values () const |
return the sets of values available for each of the discrete design set integer variables | |
void | discrete_design_set_int_values (const IntSetArray &isa) |
define the sets of values available for each of the discrete design set integer variables | |
const StringSetArray & | discrete_design_set_string_values () const |
return the sets of values available for each of the discrete design set string variables | |
void | discrete_design_set_string_values (const StringSetArray &ssa) |
define the sets of values available for each of the discrete design set string variables | |
const RealSetArray & | discrete_design_set_real_values () const |
return the sets of values available for each of the discrete design set real variables | |
void | discrete_design_set_real_values (const RealSetArray &rsa) |
define the sets of values available for each of the discrete design set real variables | |
const IntSetArray & | discrete_state_set_int_values () const |
return the sets of values available for each of the discrete state set integer variables | |
void | discrete_state_set_int_values (const IntSetArray &isa) |
define the sets of values available for each of the discrete state set integer variables | |
const StringSetArray & | discrete_state_set_string_values () const |
return the sets of values available for each of the discrete state set string variables | |
void | discrete_state_set_string_values (const StringSetArray &ssa) |
define the sets of values available for each of the discrete state set string variables | |
const RealSetArray & | discrete_state_set_real_values () const |
return the sets of values available for each of the discrete state set real variables | |
void | discrete_state_set_real_values (const RealSetArray &rsa) |
define the sets of values available for each of the discrete state set real variables | |
const BitArray & | discrete_int_sets () |
define and return discreteIntSets using active view from currentVariables | |
const BitArray & | discrete_int_sets (short active_view) |
define and return discreteIntSets using passed active view | |
const IntSetArray & | discrete_set_int_values () |
return the sets of values available for each of the active discrete set integer variables (aggregated in activeDiscSetIntValues) | |
const IntSetArray & | discrete_set_int_values (short active_view) |
return the sets of values available for each of the active discrete set integer variables (aggregated in activeDiscSetIntValues) | |
const StringSetArray & | discrete_set_string_values () |
return the sets of values available for each of the active discrete set string variables (aggregated in activeDiscSetStringValues) | |
const StringSetArray & | discrete_set_string_values (short active_view) |
return the sets of values available for each of the active discrete set string variables (aggregated in activeDiscSetStringValues) | |
const RealSetArray & | discrete_set_real_values () |
return the sets of values available for each of the active discrete set real variables (aggregated in activeDiscSetRealValues) | |
const RealSetArray & | discrete_set_real_values (short active_view) |
return the sets of values available for each of the active discrete set real variables (aggregated in activeDiscSetRealValues) | |
Pecos::AleatoryDistParams & | aleatory_distribution_parameters () |
return aleatDistParams | |
const Pecos::AleatoryDistParams & | aleatory_distribution_parameters () const |
return aleatDistParams | |
void | aleatory_distribution_parameters (const Pecos::AleatoryDistParams &adp) |
set aleatDistParams | |
Pecos::EpistemicDistParams & | epistemic_distribution_parameters () |
return epistDistParams | |
const Pecos::EpistemicDistParams & | epistemic_distribution_parameters () const |
return epistDistParams | |
void | epistemic_distribution_parameters (const Pecos::EpistemicDistParams &edp) |
set epistDistParams | |
Real | continuous_probability_density () const |
compute a multivariate probability density from the marginals for the aleatory random variables within the current active continuous variables (must be uncorrelated) | |
Real | continuous_probability_density (const RealVector &c_vars) const |
compute a multivariate probability density from the marginals for the aleatory random variables within the provided active continuous variables (must be uncorrelated) | |
Real | continuous_probability_density (size_t cv_index) const |
compute a univariate probability density for a particular active continuous variable at the current value | |
Real | continuous_probability_density (Real c_var, size_t cv_index) const |
compute a univariate probability density for a particular active continuous variable at the provided value | |
Real | continuous_probability_density (Real c_var, unsigned short cv_type, size_t dist_index) const |
compute a univariate probability density for a particular active continuous variable at the provided value | |
RealRealPair | continuous_distribution_bounds (size_t cv_index) const |
return a set of distribution bounds for a particular index within the active continuous variables | |
Real | continuous_distribution_moment (size_t cv_index, unsigned short int moment_id) const |
return a distribution moment for a particular index within the active continuous variables | |
StringMultiArrayConstView | continuous_variable_labels () const |
return the active continuous variable labels from currentVariables | |
void | continuous_variable_labels (StringMultiArrayConstView c_v_labels) |
set the active continuous variable labels in currentVariables | |
StringMultiArrayConstView | discrete_int_variable_labels () const |
return the active discrete variable labels from currentVariables | |
void | discrete_int_variable_labels (StringMultiArrayConstView d_v_labels) |
set the active discrete variable labels in currentVariables | |
StringMultiArrayConstView | discrete_string_variable_labels () const |
return the active discrete variable labels from currentVariables | |
void | discrete_string_variable_labels (StringMultiArrayConstView d_v_labels) |
set the active discrete variable labels in currentVariables | |
StringMultiArrayConstView | discrete_real_variable_labels () const |
return the active discrete variable labels from currentVariables | |
void | discrete_real_variable_labels (StringMultiArrayConstView d_v_labels) |
set the active discrete variable labels in currentVariables | |
StringMultiArrayConstView | inactive_continuous_variable_labels () const |
return the inactive continuous variable labels in currentVariables | |
void | inactive_continuous_variable_labels (StringMultiArrayConstView i_c_v_labels) |
set the inactive continuous variable labels in currentVariables | |
StringMultiArrayConstView | inactive_discrete_int_variable_labels () const |
return the inactive discrete variable labels in currentVariables | |
void | inactive_discrete_int_variable_labels (StringMultiArrayConstView i_d_v_labels) |
set the inactive discrete variable labels in currentVariables | |
StringMultiArrayConstView | inactive_discrete_string_variable_labels () const |
return the inactive discrete variable labels in currentVariables | |
void | inactive_discrete_string_variable_labels (StringMultiArrayConstView i_d_v_labels) |
set the inactive discrete variable labels in currentVariables | |
StringMultiArrayConstView | inactive_discrete_real_variable_labels () const |
return the inactive discrete variable labels in currentVariables | |
void | inactive_discrete_real_variable_labels (StringMultiArrayConstView i_d_v_labels) |
set the inactive discrete variable labels in currentVariables | |
StringMultiArrayConstView | all_continuous_variable_labels () const |
return all continuous variable labels in currentVariables | |
void | all_continuous_variable_labels (StringMultiArrayConstView a_c_v_labels) |
set all continuous variable labels in currentVariables | |
void | all_continuous_variable_label (const String &a_c_v_label, size_t i) |
set a label within the all continuous labels in currentVariables | |
StringMultiArrayConstView | all_discrete_int_variable_labels () const |
return all discrete variable labels in currentVariables | |
void | all_discrete_int_variable_labels (StringMultiArrayConstView a_d_v_labels) |
set all discrete variable labels in currentVariables | |
void | all_discrete_int_variable_label (const String &a_d_v_label, size_t i) |
set a label within the all discrete labels in currentVariables | |
StringMultiArrayConstView | all_discrete_string_variable_labels () const |
return all discrete variable labels in currentVariables | |
void | all_discrete_string_variable_labels (StringMultiArrayConstView a_d_v_labels) |
set all discrete variable labels in currentVariables | |
void | all_discrete_string_variable_label (const String &a_d_v_label, size_t i) |
set a label within the all discrete labels in currentVariables | |
StringMultiArrayConstView | all_discrete_real_variable_labels () const |
return all discrete variable labels in currentVariables | |
void | all_discrete_real_variable_labels (StringMultiArrayConstView a_d_v_labels) |
set all discrete variable labels in currentVariables | |
void | all_discrete_real_variable_label (const String &a_d_v_label, size_t i) |
set a label within the all discrete labels in currentVariables | |
const StringArray & | response_labels () const |
return the response labels from currentResponse | |
void | response_labels (const StringArray &resp_labels) |
set the response labels in currentResponse | |
const RealVector & | continuous_lower_bounds () const |
return the active continuous lower bounds from userDefinedConstraints | |
void | continuous_lower_bounds (const RealVector &c_l_bnds) |
set the active continuous lower bounds in userDefinedConstraints | |
void | continuous_lower_bound (Real c_l_bnd, size_t i) |
set the i-th active continuous lower bound in userDefinedConstraints | |
const RealVector & | continuous_upper_bounds () const |
return the active continuous upper bounds from userDefinedConstraints | |
void | continuous_upper_bounds (const RealVector &c_u_bnds) |
set the active continuous upper bounds in userDefinedConstraints | |
void | continuous_upper_bound (Real c_u_bnd, size_t i) |
set the i-th active continuous upper bound from userDefinedConstraints | |
const IntVector & | discrete_int_lower_bounds () const |
return the active discrete int lower bounds from userDefinedConstraints | |
void | discrete_int_lower_bounds (const IntVector &d_l_bnds) |
set the active discrete int lower bounds in userDefinedConstraints | |
void | discrete_int_lower_bound (int d_l_bnd, size_t i) |
set the i-th active discrete int lower bound in userDefinedConstraints | |
const IntVector & | discrete_int_upper_bounds () const |
return the active discrete int upper bounds from userDefinedConstraints | |
void | discrete_int_upper_bounds (const IntVector &d_u_bnds) |
set the active discrete int upper bounds in userDefinedConstraints | |
void | discrete_int_upper_bound (int d_u_bnd, size_t i) |
set the i-th active discrete int upper bound in userDefinedConstraints | |
const RealVector & | discrete_real_lower_bounds () const |
return the active discrete real lower bounds from userDefinedConstraints | |
void | discrete_real_lower_bounds (const RealVector &d_l_bnds) |
set the active discrete real lower bounds in userDefinedConstraints | |
void | discrete_real_lower_bound (Real d_l_bnd, size_t i) |
set the i-th active discrete real lower bound in userDefinedConstraints | |
const RealVector & | discrete_real_upper_bounds () const |
return the active discrete real upper bounds from userDefinedConstraints | |
void | discrete_real_upper_bounds (const RealVector &d_u_bnds) |
set the active discrete real upper bounds in userDefinedConstraints | |
void | discrete_real_upper_bound (Real d_u_bnd, size_t i) |
set the i-th active discrete real upper bound in userDefinedConstraints | |
const RealVector & | inactive_continuous_lower_bounds () const |
return the inactive continuous lower bounds in userDefinedConstraints | |
void | inactive_continuous_lower_bounds (const RealVector &i_c_l_bnds) |
set the inactive continuous lower bounds in userDefinedConstraints | |
const RealVector & | inactive_continuous_upper_bounds () const |
return the inactive continuous upper bounds in userDefinedConstraints | |
void | inactive_continuous_upper_bounds (const RealVector &i_c_u_bnds) |
set the inactive continuous upper bounds in userDefinedConstraints | |
const IntVector & | inactive_discrete_int_lower_bounds () const |
return the inactive discrete lower bounds in userDefinedConstraints | |
void | inactive_discrete_int_lower_bounds (const IntVector &i_d_l_bnds) |
set the inactive discrete lower bounds in userDefinedConstraints | |
const IntVector & | inactive_discrete_int_upper_bounds () const |
return the inactive discrete upper bounds in userDefinedConstraints | |
void | inactive_discrete_int_upper_bounds (const IntVector &i_d_u_bnds) |
set the inactive discrete upper bounds in userDefinedConstraints | |
const RealVector & | inactive_discrete_real_lower_bounds () const |
return the inactive discrete lower bounds in userDefinedConstraints | |
void | inactive_discrete_real_lower_bounds (const RealVector &i_d_l_bnds) |
set the inactive discrete lower bounds in userDefinedConstraints | |
const RealVector & | inactive_discrete_real_upper_bounds () const |
return the inactive discrete upper bounds in userDefinedConstraints | |
void | inactive_discrete_real_upper_bounds (const RealVector &i_d_u_bnds) |
set the inactive discrete upper bounds in userDefinedConstraints | |
const RealVector & | all_continuous_lower_bounds () const |
return all continuous lower bounds in userDefinedConstraints | |
void | all_continuous_lower_bounds (const RealVector &a_c_l_bnds) |
set all continuous lower bounds in userDefinedConstraints | |
void | all_continuous_lower_bound (Real a_c_l_bnd, size_t i) |
set a lower bound within continuous lower bounds in userDefinedConstraints | |
const RealVector & | all_continuous_upper_bounds () const |
return all continuous upper bounds in userDefinedConstraints | |
void | all_continuous_upper_bounds (const RealVector &a_c_u_bnds) |
set all continuous upper bounds in userDefinedConstraints | |
void | all_continuous_upper_bound (Real a_c_u_bnd, size_t i) |
set an upper bound within all continuous upper bounds in userDefinedConstraints | |
const IntVector & | all_discrete_int_lower_bounds () const |
return all discrete lower bounds in userDefinedConstraints | |
void | all_discrete_int_lower_bounds (const IntVector &a_d_l_bnds) |
set all discrete lower bounds in userDefinedConstraints | |
void | all_discrete_int_lower_bound (int a_d_l_bnd, size_t i) |
set a lower bound within all discrete lower bounds in userDefinedConstraints | |
const IntVector & | all_discrete_int_upper_bounds () const |
return all discrete upper bounds in userDefinedConstraints | |
void | all_discrete_int_upper_bounds (const IntVector &a_d_u_bnds) |
set all discrete upper bounds in userDefinedConstraints | |
void | all_discrete_int_upper_bound (int a_d_u_bnd, size_t i) |
set an upper bound within all discrete upper bounds in userDefinedConstraints | |
const RealVector & | all_discrete_real_lower_bounds () const |
return all discrete lower bounds in userDefinedConstraints | |
void | all_discrete_real_lower_bounds (const RealVector &a_d_l_bnds) |
set all discrete lower bounds in userDefinedConstraints | |
void | all_discrete_real_lower_bound (Real a_d_l_bnd, size_t i) |
set a lower bound within all discrete lower bounds in userDefinedConstraints | |
const RealVector & | all_discrete_real_upper_bounds () const |
return all discrete upper bounds in userDefinedConstraints | |
void | all_discrete_real_upper_bounds (const RealVector &a_d_u_bnds) |
set all discrete upper bounds in userDefinedConstraints | |
void | all_discrete_real_upper_bound (Real a_d_u_bnd, size_t i) |
set an upper bound within all discrete upper bounds in userDefinedConstraints | |
size_t | num_linear_ineq_constraints () const |
return the number of linear inequality constraints | |
size_t | num_linear_eq_constraints () const |
return the number of linear equality constraints | |
const RealMatrix & | linear_ineq_constraint_coeffs () const |
return the linear inequality constraint coefficients | |
void | linear_ineq_constraint_coeffs (const RealMatrix &lin_ineq_coeffs) |
set the linear inequality constraint coefficients | |
const RealVector & | linear_ineq_constraint_lower_bounds () const |
return the linear inequality constraint lower bounds | |
void | linear_ineq_constraint_lower_bounds (const RealVector &lin_ineq_l_bnds) |
set the linear inequality constraint lower bounds | |
const RealVector & | linear_ineq_constraint_upper_bounds () const |
return the linear inequality constraint upper bounds | |
void | linear_ineq_constraint_upper_bounds (const RealVector &lin_ineq_u_bnds) |
set the linear inequality constraint upper bounds | |
const RealMatrix & | linear_eq_constraint_coeffs () const |
return the linear equality constraint coefficients | |
void | linear_eq_constraint_coeffs (const RealMatrix &lin_eq_coeffs) |
set the linear equality constraint coefficients | |
const RealVector & | linear_eq_constraint_targets () const |
return the linear equality constraint targets | |
void | linear_eq_constraint_targets (const RealVector &lin_eq_targets) |
set the linear equality constraint targets | |
size_t | num_nonlinear_ineq_constraints () const |
return the number of nonlinear inequality constraints | |
size_t | num_nonlinear_eq_constraints () const |
return the number of nonlinear equality constraints | |
const RealVector & | nonlinear_ineq_constraint_lower_bounds () const |
return the nonlinear inequality constraint lower bounds | |
void | nonlinear_ineq_constraint_lower_bounds (const RealVector &nln_ineq_l_bnds) |
set the nonlinear inequality constraint lower bounds | |
const RealVector & | nonlinear_ineq_constraint_upper_bounds () const |
return the nonlinear inequality constraint upper bounds | |
void | nonlinear_ineq_constraint_upper_bounds (const RealVector &nln_ineq_u_bnds) |
set the nonlinear inequality constraint upper bounds | |
const RealVector & | nonlinear_eq_constraint_targets () const |
return the nonlinear equality constraint targets | |
void | nonlinear_eq_constraint_targets (const RealVector &nln_eq_targets) |
set the nonlinear equality constraint targets | |
const Variables & | current_variables () const |
return the current variables (currentVariables) as const reference (preferred) | |
Variables & | current_variables () |
return the current variables (currentVariables) in mutable form (special cases) | |
const Constraints & | user_defined_constraints () const |
return the user-defined constraints (userDefinedConstraints) | |
const Response & | current_response () const |
return the current response (currentResponse) | |
ProblemDescDB & | problem_description_db () const |
return the problem description database (probDescDB) | |
ParallelLibrary & | parallel_library () const |
return the parallel library (parallelLib) | |
const String & | model_type () const |
return the model type (modelType) | |
const String & | surrogate_type () const |
return the surrogate type (surrogateType) | |
const String & | model_id () const |
return the model identifier (modelId) | |
size_t | num_functions () const |
return number of functions in currentResponse | |
size_t | num_primary_fns () const |
return number of primary functions (total less nonlinear constraints) | |
const String & | gradient_type () const |
return the gradient evaluation type (gradientType) | |
const String & | method_source () const |
return the numerical gradient evaluation method source (methodSource) | |
const String & | interval_type () const |
return the numerical gradient evaluation interval type (intervalType) | |
bool | ignore_bounds () const |
option for ignoring bounds when numerically estimating derivatives | |
bool | central_hess () const |
option for using old 2nd-order scheme when computing finite-diff Hessian | |
const RealVector & | fd_gradient_step_size () const |
return the finite difference gradient step size (fdGradStepSize) | |
const String & | fd_gradient_step_type () const |
return the finite difference gradient step type (fdGradStepType) | |
const IntSet & | gradient_id_analytic () const |
return the mixed gradient analytic IDs (gradIdAnalytic) | |
const IntSet & | gradient_id_numerical () const |
return the mixed gradient numerical IDs (gradIdNumerical) | |
const String & | hessian_type () const |
return the Hessian evaluation type (hessianType) | |
const String & | quasi_hessian_type () const |
return the Hessian evaluation type (quasiHessType) | |
const RealVector & | fd_hessian_by_grad_step_size () const |
return gradient-based finite difference Hessian step size (fdHessByGradStepSize) | |
const RealVector & | fd_hessian_by_fn_step_size () const |
return function-based finite difference Hessian step size (fdHessByFnStepSize) | |
const String & | fd_hessian_step_type () const |
return the finite difference Hessian step type (fdHessStepType) | |
const IntSet & | hessian_id_analytic () const |
return the mixed Hessian analytic IDs (hessIdAnalytic) | |
const IntSet & | hessian_id_numerical () const |
return the mixed Hessian analytic IDs (hessIdNumerical) | |
const IntSet & | hessian_id_quasi () const |
return the mixed Hessian analytic IDs (hessIdQuasi) | |
void | primary_response_fn_sense (const BoolDeque &sense) |
set the optimization sense for multiple objective functions | |
const BoolDeque & | primary_response_fn_sense () const |
get the optimization sense for multiple objective functions | |
const RealVector & | primary_response_fn_weights () const |
get the relative weightings for multiple objective functions or least squares terms | |
short | primary_fn_type () const |
get the primary response function type (generic, objective, calibration) | |
void | primary_fn_type (short type) |
set the primary response function type, e.g., when recasting | |
bool | derivative_estimation () |
indicates potential usage of estimate_derivatives() based on gradientType/hessianType | |
void | supports_derivative_estimation (bool sed_flag) |
set whether this model should perform or pass on derivative estimation | |
void | init_comms_bcast_flag (bool icb_flag) |
set initCommsBcastFlag | |
int | evaluation_capacity () const |
return the evaluation capacity for use in iterator logic | |
int | derivative_concurrency () const |
return the gradient concurrency for use in parallel configuration logic | |
bool | asynch_flag () const |
return the asynchronous evaluation flag (asynchEvalFlag) | |
void | asynch_flag (const bool flag) |
set the asynchronous evaluation flag (asynchEvalFlag) | |
short | output_level () const |
return the outputLevel | |
void | output_level (const short level) |
set the outputLevel | |
const IntArray & | message_lengths () const |
return the array of MPI packed message buffer lengths (messageLengths) | |
void | parallel_configuration_iterator (ParConfigLIter pc_iter) |
set modelPCIter | |
ParConfigLIter | parallel_configuration_iterator () const |
return modelPCIter | |
void | auto_graphics (const bool flag) |
set modelAutoGraphicsFlag to activate posting of graphics data within compute_response/synchronize functions (automatic graphics posting in the model as opposed to graphics posting at the strategy level). | |
bool | is_null () const |
function to check modelRep (does this envelope contain a letter) | |
Model * | model_rep () const |
returns modelRep for access to derived class member functions that are not mapped to the top Model level | |
Real | initialize_h (Real x_j, Real lb_j, Real ub_j, Real step_size, String step_type) |
function to determine initial finite difference h (before step length adjustment) based on type of step desired | |
Real | FDstep1 (Real x0_j, Real lb_j, Real ub_j, Real h_mag) |
function returning finite-difference step size (affected by bounds) | |
Real | FDstep2 (Real x0_j, Real lb_j, Real ub_j, Real h) |
function returning second central-difference step size (affected by bounds) | |
Public Attributes | |
bool | shortStep |
flags finite-difference step size adjusted by bounds | |
Protected Member Functions | |
Model (BaseConstructor, ProblemDescDB &problem_db) | |
constructor initializing the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) | |
Model (LightWtBaseConstructor, ProblemDescDB &problem_db, ParallelLibrary ¶llel_lib, const SharedVariablesData &svd, const SharedResponseData &srd, const ActiveSet &set, short output_level) | |
constructor initializing base class for derived model class instances constructed on the fly | |
Model (LightWtBaseConstructor, ProblemDescDB &problem_db, ParallelLibrary ¶llel_lib) | |
constructor initializing base class for recast model instances | |
virtual void | derived_compute_response (const ActiveSet &set) |
portion of compute_response() specific to derived model classes | |
virtual void | derived_asynch_compute_response (const ActiveSet &set) |
portion of asynch_compute_response() specific to derived model classes | |
virtual const IntResponseMap & | derived_synchronize () |
portion of synchronize() specific to derived model classes | |
virtual const IntResponseMap & | derived_synchronize_nowait () |
portion of synchronize_nowait() specific to derived model classes | |
virtual void | derived_init_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
portion of init_communicators() specific to derived model classes | |
virtual void | derived_init_serial () |
portion of init_serial() specific to derived model classes | |
virtual void | derived_set_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
portion of set_communicators() specific to derived model classes | |
virtual void | derived_free_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
portion of free_communicators() specific to derived model classes | |
void | set_ie_asynchronous_mode (int max_eval_concurrency) |
default logic for defining asynchEvalFlag and evaluationCapacity based on ie_pl settings | |
void | string_variable_max (const StringSetArray &ssa, size_t offset, Variables &vars) |
set the current value of each string variable offset + i to the longest string value found in the admissible string set ssa[i] | |
void | string_variable_max (const StringRealMapArray &srma, size_t offset, Variables &vars) |
set the current value of each string variable offset + i to the longest string value found in the admissible string map srma[i] | |
Protected Attributes | |
Variables | currentVariables |
the set of current variables used by the model for performing function evaluations | |
size_t | numDerivVars |
the number of active continuous variables used in computing most response derivatives (i.e., in places such as quasi-Hessians and response corrections where only the active continuous variables are supported) | |
Response | currentResponse |
the set of current responses that holds the results of model function evaluations | |
size_t | numFns |
the number of functions in currentResponse | |
Constraints | userDefinedConstraints |
Explicit constraints on variables are maintained in the Constraints class hierarchy. Currently, this includes linear constraints and bounds, but could be extended in the future to include other explicit constraints which (1) have their form specified by the user, and (2) are not catalogued in Response since their form and coefficients are published to an iterator at startup. | |
String | modelId |
model identifier string from the input file | |
String | modelType |
type of model: single, nested, or surrogate | |
String | surrogateType |
type of surrogate model: local_*, multipoint_*, global_*, or hierarchical | |
String | gradientType |
type of gradient data: analytic, numerical, mixed, or none | |
String | methodSource |
source of numerical gradient routine: dakota or vendor | |
String | intervalType |
type of numerical gradient interval: central or forward | |
String | hessianType |
type of Hessian data: analytic, numerical, quasi, mixed, or none | |
RealVector | fdGradStepSize |
relative finite difference step size for numerical gradients | |
String | fdGradStepType |
type of finite difference step to use for numerical gradient: relative - step length is relative to x absolute - step length is what is specified bounds - step length is relative to range of x | |
RealVector | fdHessByGradStepSize |
relative finite difference step size for numerical Hessians estimated using first-order differences of gradients | |
RealVector | fdHessByFnStepSize |
relative finite difference step size for numerical Hessians estimated using second-order differences of function values | |
String | fdHessStepType |
type of finite difference step to use for numerical Hessian: relative - step length is relative to x absolute - step length is what is specified bounds - step length is relative to range of x | |
bool | ignoreBounds |
option to ignore bounds when computing finite diffs | |
bool | centralHess |
option to use old 2nd-order finite diffs for Hessians | |
bool | supportsEstimDerivs |
whether model should perform or forward derivative estimation | |
String | quasiHessType |
quasi-Hessian type: bfgs, damped_bfgs, sr1 | |
IntSet | gradIdAnalytic |
analytic id's for mixed gradients | |
IntSet | gradIdNumerical |
numerical id's for mixed gradients | |
IntSet | hessIdAnalytic |
analytic id's for mixed Hessians | |
IntSet | hessIdNumerical |
numerical id's for mixed Hessians | |
IntSet | hessIdQuasi |
quasi id's for mixed Hessians | |
IntArray | messageLengths |
length of packed MPI buffers containing vars, vars/set, response, and PRPair | |
ProblemDescDB & | probDescDB |
class member reference to the problem description database | |
ParallelLibrary & | parallelLib |
class member reference to the parallel library | |
ParConfigLIter | modelPCIter |
the ParallelConfiguration node used by this Model instance | |
short | componentParallelMode |
the component parallelism mode: 0 (none), 1 (INTERFACE/LF_MODEL), or 2 (SUB_MODEL/HF_MODEL/TRUTH_MODEL) | |
bool | asynchEvalFlag |
flags asynch evaluations (local or distributed) | |
int | evaluationCapacity |
capacity for concurrent evaluations supported by the Model | |
short | outputLevel |
output verbosity level: {SILENT,QUIET,NORMAL,VERBOSE,DEBUG}_OUTPUT | |
ModelList | modelList |
used to collect sub-models for subordinate_models() | |
IntSetArray | discreteDesignSetIntValues |
array of IntSet's, each containing the set of allowable integer values corresponding to a discrete design integer set variable | |
StringSetArray | discreteDesignSetStringValues |
array of IntSet's, each containing the set of allowable integer values corresponding to a discrete design string set variable | |
RealSetArray | discreteDesignSetRealValues |
array of RealSet's, each containing the set of allowable real values corresponding to a discrete design real set variable | |
IntSetArray | discreteStateSetIntValues |
array of IntSet's, each containing the set of allowable integer values corresponding to a discrete state integer set variable | |
StringSetArray | discreteStateSetStringValues |
array of IntSet's, each containing the set of allowable integer values corresponding to a discrete state string set variable | |
RealSetArray | discreteStateSetRealValues |
array of RealSet's, each containing the set of allowable real values corresponding to a discrete state real set variable | |
Pecos::AleatoryDistParams | aleatDistParams |
container for aleatory random variable distribution parameters | |
Pecos::EpistemicDistParams | epistDistParams |
container for epistemic random variable distribution parameters | |
BoolDeque | primaryRespFnSense |
array of flags (one per primary function) for switching the sense to maximize the primary function (default is minimize) | |
RealVector | primaryRespFnWts |
primary response function weightings (either weights for multiobjective optimization or weighted least squares) | |
bool | hierarchicalTagging |
whether to perform hierarchical evalID tagging of params/results | |
Private Member Functions | |
Model * | get_model (ProblemDescDB &problem_db) |
Used by the envelope to instantiate the correct letter class. | |
int | estimate_derivatives (const ShortArray &map_asv, const ShortArray &fd_grad_asv, const ShortArray &fd_hess_asv, const ShortArray &quasi_hess_asv, const ActiveSet &original_set, const bool asynch_flag) |
evaluate numerical gradients using finite differences. This routine is selected with "method_source dakota" (the default method_source) in the numerical gradient specification. | |
void | synchronize_derivatives (const Variables &vars, const IntResponseMap &fd_responses, Response &new_response, const ShortArray &fd_grad_asv, const ShortArray &fd_hess_asv, const ShortArray &quasi_hess_asv, const ActiveSet &original_set) |
combine results from an array of finite difference response objects (fd_grad_responses) into a single response (new_response) | |
void | update_response (const Variables &vars, Response &new_response, const ShortArray &fd_grad_asv, const ShortArray &fd_hess_asv, const ShortArray &quasi_hess_asv, const ActiveSet &original_set, Response &initial_map_response, const RealMatrix &new_fn_grads, const RealSymMatrixArray &new_fn_hessians) |
overlay results to update a response object | |
void | update_quasi_hessians (const Variables &vars, Response &new_response, const ActiveSet &original_set) |
perform quasi-Newton Hessian updates | |
Real | finite_difference_lower_bound (UShortMultiArrayConstView cv_types, const RealVector &global_c_l_bnds, size_t cv_index) |
return the lower bound for a finite difference offset, drawn from global or distribution bounds | |
Real | finite_difference_upper_bound (UShortMultiArrayConstView cv_types, const RealVector &global_c_u_bnds, size_t cv_index) |
return the upper bound for a finite difference offset, drawn from global or distribution bounds | |
bool | manage_asv (const ShortArray &asv_in, ShortArray &map_asv_out, ShortArray &fd_grad_asv_out, ShortArray &fd_hess_asv_out, ShortArray &quasi_hess_asv_out) |
Coordinates usage of estimate_derivatives() calls based on asv_in. | |
Private Attributes | |
int | modelEvalCntr |
evaluation counter for top-level compute_response() and asynch_compute_response() calls. Differs from lower level counters in case of numerical derivative estimation (several lower level evaluations are assimilated into a single higher level evaluation) | |
bool | estDerivsFlag |
flags presence of estimated derivatives within a set of calls to asynch_compute_response() | |
std::map< SizetIntPair, ParConfigLIter > | modelPCIterMap |
map<> used for tracking modelPCIter instances using depth of parallelism level and max evaluation concurrency as the lookup keys | |
bool | initCommsBcastFlag |
flag for determining need to bcast the max concurrency from init_communicators(); set from IteratorScheduler::init_iterator() | |
bool | modelAutoGraphicsFlag |
flag for posting of graphics data within compute_response (automatic graphics posting in the model as opposed to graphics posting at the strategy level) | |
VariablesList | varsList |
history of vars populated in asynch_compute_response() and used in synchronize(). | |
std::list< ShortArray > | asvList |
if estimate_derivatives() is used, transfers ASVs from asynch_compute_response() to synchronize() | |
std::list< ActiveSet > | setList |
if estimate_derivatives() is used, transfers ActiveSets from asynch_compute_response() to synchronize() | |
BoolList | initialMapList |
transfers initial_map flag values from estimate_derivatives() to synchronize_derivatives() | |
BoolList | dbCaptureList |
transfers db_capture flag values from estimate_derivatives() to synchronize_derivatives() | |
ResponseList | dbResponseList |
transfers database captures from estimate_derivatives() to synchronize_derivatives() | |
RealList | deltaList |
transfers deltas from estimate_derivatives() to synchronize_derivatives() | |
IntIntMap | numFDEvalsMap |
tracks the number of evaluations used within estimate_derivatives(). Used in synchronize() as a key for combining finite difference responses into numerical gradients. | |
IntIntMap | rawEvalIdMap |
maps from the raw evaluation ids returned by derived_synchronize() and derived_synchronize_nowait() to the corresponding modelEvalCntr id. Used for rekeying responseMap. | |
RealVectorArray | xPrev |
previous parameter vectors used in computing s for quasi-Newton updates | |
RealMatrix | fnGradsPrev |
previous gradient vectors used in computing y for quasi-Newton updates | |
RealSymMatrixArray | quasiHessians |
quasi-Newton Hessian approximations | |
SizetArray | numQuasiUpdates |
number of quasi-Newton Hessian updates applied | |
IntResponseMap | responseMap |
used to return a map of responses for asynchronous evaluations in final concatenated form. The similar map in Interface contains raw responses. | |
IntResponseMap | graphicsRespMap |
used to cache the data returned from derived_synchronize_nowait() prior to sequential input into the graphics | |
IntSetArray | activeDiscSetIntValues |
aggregation of the admissible value sets for all active discrete set integer variables | |
StringSetArray | activeDiscSetStringValues |
aggregation of the admissible value sets for all active discrete set string variables | |
RealSetArray | activeDiscSetRealValues |
aggregation of the admissible value sets for all active discrete set real variables | |
BitArray | discreteIntSets |
key for identifying discrete integer set variables within the active discrete integer variables | |
Model * | modelRep |
pointer to the letter (initialized only for the envelope) | |
int | referenceCount |
number of objects sharing modelRep | |
Friends | |
bool | operator== (const Model &m1, const Model &m2) |
equality operator (detect same letter instance) | |
bool | operator!= (const Model &m1, const Model &m2) |
inequality operator (detect different letter instances) |
Base class for the model class hierarchy.
The Model class is the base class for one of the primary class hierarchies in DAKOTA. The model hierarchy contains a set of variables, an interface, and a set of responses, and an iterator operates on the model to map the variables into responses using the interface. For memory efficiency and enhanced polymorphism, the model hierarchy employs the "letter/envelope idiom" (see Coplien "Advanced C++", p. 133), for which the base class (Model) serves as the envelope and one of the derived classes (selected in Model::get_model()) serves as the letter.
Model | ( | ) |
default constructor
The default constructor is used in vector<Model> instantiations and for initialization of Model objects contained in Iterator and derived Strategy classes. modelRep is NULL in this case (a populated problem_db is needed to build a meaningful Model object). This makes it necessary to check for NULL in the copy constructor, assignment operator, and destructor.
Model | ( | ProblemDescDB & | problem_db | ) |
standard constructor for envelope
Used in model instantiations within strategy constructors. Envelope constructor only needs to extract enough data to properly execute get_model, since Model(BaseConstructor, problem_db) builds the actual base class data for the derived models.
References Dakota::abort_handler(), Model::get_model(), and Model::modelRep.
copy constructor
Copy constructor manages sharing of modelRep and incrementing of referenceCount.
References Model::modelRep, and Model::referenceCount.
~Model | ( | ) | [virtual] |
destructor
Destructor decrements referenceCount and only deletes modelRep when referenceCount reaches zero.
References Model::modelRep, and Model::referenceCount.
Model | ( | BaseConstructor | , |
ProblemDescDB & | problem_db | ||
) | [protected] |
constructor initializing the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139)
This constructor builds the base class data for all inherited models. get_model() instantiates a derived class and the derived class selects this base class constructor in its initialization list (to avoid the recursion of the base class constructor calling get_model() again). Since the letter IS the representation, its representation pointer is set to NULL (an uninitialized pointer causes problems in ~Model).
References Dakota::abort_handler(), Model::currentResponse, Model::fdGradStepSize, Model::fdHessByFnStepSize, Model::fdHessByGradStepSize, ProblemDescDB::get_sa(), Model::gradIdNumerical, Model::gradientType, Model::hessianType, Model::hessIdNumerical, Response::num_functions(), Constraints::num_nonlinear_eq_constraints(), Constraints::num_nonlinear_ineq_constraints(), Model::primaryRespFnSense, Dakota::strbegins(), Dakota::strtolower(), and Model::userDefinedConstraints.
Model | ( | LightWtBaseConstructor | , |
ProblemDescDB & | problem_db, | ||
ParallelLibrary & | parallel_lib | ||
) | [protected] |
constructor initializing base class for recast model instances
This constructor also builds the base class data for inherited models. However, it is used for recast models which are instantiated on the fly. Therefore it only initializes a small subset of attributes.
assignment operator
Assignment operator decrements referenceCount for old modelRep, assigns new modelRep, and increments referenceCount for new modelRep.
References Model::modelRep, and Model::referenceCount.
Iterator & subordinate_iterator | ( | ) | [virtual] |
return the sub-iterator in nested and surrogate models
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, DataFitSurrModel, and NestedModel.
References Dakota::dummy_iterator, Model::modelRep, and Model::subordinate_iterator().
Referenced by NonDExpansion::compute_expansion(), NonDExpansion::compute_print_converged_results(), NonDExpansion::compute_print_iteration_results(), NonDExpansion::finalize_sets(), NonDGlobalReliability::get_best_sample(), NonDPolynomialChaos::increment_grid_from_order(), NonDExpansion::increment_sets(), NonDPolynomialChaos::increment_specification_sequence(), NonDExpansion::increment_specification_sequence(), NonDQUESOBayesCalibration::init_parameter_domain(), DOTOptimizer::initialize(), CONMINOptimizer::initialize(), NCSUOptimizer::initialize(), NLPQLPOptimizer::initialize(), NonDExpansion::initialize_expansion(), NonDBayesCalibration::initialize_model(), NonDExpansion::initialize_sets(), NonDStochCollocation::initialize_u_space_model(), NonDPolynomialChaos::initialize_u_space_model(), NonDExpansion::initialize_u_space_model(), SurrBasedLocalMinimizer::minimize_surrogates(), SurrBasedGlobalMinimizer::minimize_surrogates(), NonDLocalInterval::NonDLocalInterval(), NonDLocalReliability::NonDLocalReliability(), NonDGlobalReliability::optimize_gaussian_process(), NonDQUESOBayesCalibration::print_results(), NonDExpansion::refine_expansion(), SOLBase::SOLBase(), Model::subordinate_iterator(), RecastModel::subordinate_iterator(), NonDStochCollocation::update_expansion(), and NonDQUESOBayesCalibration::update_model().
Model & subordinate_model | ( | ) | [virtual] |
return a single sub-model defined from subModel in nested and recast models and truth_model() in surrogate models; used for a directed dive through model recursions that may bypass some components.
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, NestedModel, and SurrogateModel.
References Dakota::dummy_model, Model::modelRep, and Model::subordinate_model().
Referenced by Minimizer::data_transform_model(), NonDGlobalReliability::expected_feasibility(), NonDGlobalReliability::expected_improvement(), SurrogateModel::force_rebuild(), NonDExpansion::initialize_expansion(), Minimizer::initialize_run(), Minimizer::initialize_scaling(), NonDExpansion::initialize_u_space_model(), NonDGlobalReliability::optimize_gaussian_process(), Minimizer::original_model(), LeastSq::post_run(), COLINOptimizer::post_run(), Optimizer::primary_resp_reducer(), LeastSq::primary_resp_weighter(), LeastSq::print_results(), Minimizer::scale_model(), Model::subordinate_model(), DataFitSurrModel::update_global(), and LeastSq::weight_model().
Model & surrogate_model | ( | ) | [virtual] |
return the approximation sub-model in surrogate models
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, DataFitSurrModel, and HierarchSurrModel.
References Dakota::dummy_model, Model::modelRep, and Model::surrogate_model().
Referenced by NonDAdaptiveSampling::calc_score_delta_y(), NonDAdaptiveSampling::calc_score_topo_alm_hybrid(), NonDAdaptiveSampling::calc_score_topo_avg_persistence(), NonDAdaptiveSampling::calc_score_topo_bottleneck(), SurrBasedLocalMinimizer::find_center_approx(), SurrBasedLocalMinimizer::minimize_surrogates(), SurrBasedGlobalMinimizer::minimize_surrogates(), NonDAdaptiveSampling::output_round_data(), SurrBasedLocalMinimizer::SurrBasedLocalMinimizer(), Model::surrogate_model(), and RecastModel::surrogate_model().
Model & truth_model | ( | ) | [virtual] |
return the truth sub-model in surrogate models
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, DataFitSurrModel, and HierarchSurrModel.
References Dakota::dummy_model, Model::modelRep, and Model::truth_model().
Referenced by SurrogateModel::force_rebuild(), SurrBasedMinimizer::initialize_graphics(), SurrBasedLocalMinimizer::minimize_surrogates(), SurrBasedGlobalMinimizer::minimize_surrogates(), NonDLocalReliability::NonDLocalReliability(), SurrBasedMinimizer::print_results(), SurrogateModel::subordinate_model(), SurrBasedGlobalMinimizer::SurrBasedGlobalMinimizer(), SurrBasedLocalMinimizer::SurrBasedLocalMinimizer(), Model::truth_model(), and RecastModel::truth_model().
void update_from_subordinate_model | ( | bool | recurse_flag = true | ) | [virtual] |
propagate vars/labels/bounds/targets from the bottom up
used only for instantiate-on-the-fly model recursions (all RecastModel instantiations and alternate DataFitSurrModel instantiations). Single, Hierarchical, and Nested Models do not redefine the function since they do not support instantiate-on-the-fly. This means that the recursion will stop as soon as it encounters a Model that was instantiated normally, which is appropriate since ProblemDescDB-constructed Models use top-down information flow and do not require bottom-up updating.
Reimplemented in RecastModel, and DataFitSurrModel.
References Model::modelRep, and Model::update_from_subordinate_model().
Referenced by NonDLocalReliability::initialize_class_data(), NonDExpansion::initialize_expansion(), LeastSq::initialize_run(), Optimizer::initialize_run(), EffGlobalMinimizer::minimize_surrogates_on_model(), NonDGlobalReliability::optimize_gaussian_process(), NonDGlobalInterval::quantify_uncertainty(), NonDLocalInterval::quantify_uncertainty(), Model::update_from_subordinate_model(), DataFitSurrModel::update_from_subordinate_model(), and RecastModel::update_from_subordinate_model().
Interface & derived_interface | ( | ) | [virtual] |
return the interface employed by the derived model class, if present: SingleModel::userDefinedInterface, DataFitSurrModel::approxInterface, or NestedModel::optionalInterface
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, DataFitSurrModel, NestedModel, and SingleModel.
References Model::derived_interface(), Dakota::dummy_interface, and Model::modelRep.
Referenced by Model::derived_interface(), RecastModel::derived_interface(), and SurrBasedGlobalMinimizer::minimize_surrogates().
short local_eval_synchronization | ( | ) | [virtual] |
return derived model synchronization setting
SingleModels and HierarchSurrModels redefine this virtual function. A default value of "synchronous" prevents asynch local operations for:
Reimplemented in RecastModel, NestedModel, and SingleModel.
References Model::local_eval_synchronization(), and Model::modelRep.
Referenced by Model::init_serial(), Model::local_eval_synchronization(), RecastModel::local_eval_synchronization(), and Model::set_ie_asynchronous_mode().
int local_eval_concurrency | ( | ) | [virtual] |
return derived model asynchronous evaluation concurrency
SingleModels and HierarchSurrModels redefine this virtual function.
Reimplemented in RecastModel, NestedModel, and SingleModel.
References Model::local_eval_concurrency(), and Model::modelRep.
Referenced by Model::local_eval_concurrency(), RecastModel::local_eval_concurrency(), and Model::set_ie_asynchronous_mode().
const String & interface_id | ( | ) | const [virtual] |
return the interface identifier
return by reference requires use of dummy objects, but is important to allow use of assign_rep() since this operation must be performed on the original envelope object.
Reimplemented in RecastModel, DataFitSurrModel, NestedModel, and SingleModel.
References Dakota::dummy_interface, Interface::interface_id(), Model::interface_id(), and Model::modelRep.
Referenced by DataFitSurrModel::build_global(), Model::compute_response(), DataFitSurrModel::DataFitSurrModel(), Model::db_lookup(), Model::estimate_message_lengths(), SurrBasedLocalMinimizer::find_center_approx(), Model::interface_id(), RecastModel::interface_id(), Minimizer::local_recast_retrieve(), SurrBasedLocalMinimizer::minimize_surrogates(), SNLLLeastSq::post_run(), Analyzer::pre_output(), SurrBasedMinimizer::print_results(), LeastSq::print_results(), Optimizer::print_results(), SeqHybridMetaIterator::run_sequential(), DiscrepancyCorrection::search_db(), Model::synchronize(), Model::synchronize_nowait(), Analyzer::update_best(), ConcurrentMetaIterator::update_local_results(), SeqHybridMetaIterator::update_local_results(), and NonDLocalReliability::update_mpp_search_data().
bool evaluation_cache | ( | ) | const [virtual] |
Indicates the usage of an evaluation cache by the Model.
Only Models including ApplicationInterfaces support an evaluation cache: surrogate, nested, and recast mappings are not stored in the cache. Possible exceptions: HierarchSurrModel, NestedModel::optionalInterface.
Reimplemented in SingleModel.
References Model::evaluation_cache(), and Model::modelRep.
Referenced by DataFitSurrModel::DataFitSurrModel(), and Model::evaluation_cache().
void eval_tag_prefix | ( | const String & | eval_id_str | ) | [virtual] |
set the hierarchical eval ID tag prefix
Derived classes containing additional models or interfaces should implement this function to pass along to their sub Models/Interfaces.
Reimplemented in RecastModel, DataFitSurrModel, NestedModel, HierarchSurrModel, and SingleModel.
References Model::eval_tag_prefix(), and Model::modelRep.
Referenced by HierarchSurrModel::build_approximation(), HierarchSurrModel::derived_asynch_compute_response(), DataFitSurrModel::derived_asynch_compute_response(), HierarchSurrModel::derived_compute_response(), DataFitSurrModel::derived_compute_response(), Model::eval_tag_prefix(), RecastModel::eval_tag_prefix(), and Iterator::eval_tag_prefix().
ModelList & subordinate_models | ( | bool | recurse_flag = true | ) |
return the sub-models in nested and surrogate models
since modelList is built with list insertions (using envelope copies), these models may not be used for model.assign_rep() since this operation must be performed on the original envelope object. They may, however, be used for letter-based operations (including assign_rep() on letter contents such as an interface).
References Model::derived_subordinate_models(), Model::modelList, Model::modelRep, and Model::subordinate_models().
Referenced by DOTOptimizer::initialize(), CONMINOptimizer::initialize(), NCSUOptimizer::initialize(), NLPQLPOptimizer::initialize(), NonDLocalInterval::NonDLocalInterval(), NonDLocalReliability::NonDLocalReliability(), SOLBase::SOLBase(), Model::subordinate_models(), and SurrBasedLocalMinimizer::SurrBasedLocalMinimizer().
void init_communicators | ( | ParLevLIter | pl_iter, |
int | max_eval_concurrency, | ||
bool | recurse_flag = true |
||
) |
allocate communicator partitions for a model and store configuration in modelPCIterMap
The init_communicators() and derived_init_communicators() functions are stuctured to avoid performing the messageLengths estimation more than once. init_communicators() (not virtual) performs the estimation and then forwards the results to derived_init_communicators (virtual) which uses the data in different contexts.
References ParallelLibrary::bcast(), Model::derived_init_communicators(), Model::estimate_message_lengths(), ParallelLibrary::increment_parallel_configuration(), Model::init_communicators(), Model::initCommsBcastFlag, Model::messageLengths, Model::modelPCIter, Model::modelPCIterMap, Model::modelRep, ParallelLibrary::parallel_configuration_iterator(), ParallelLibrary::parallel_level_index(), and Model::parallelLib.
Referenced by EfficientSubspaceMethod::derived_init_communicators(), SurrBasedMinimizer::derived_init_communicators(), NonDGlobalReliability::derived_init_communicators(), NonDLocalInterval::derived_init_communicators(), NonDBayesCalibration::derived_init_communicators(), NonDExpansion::derived_init_communicators(), NonDGlobalInterval::derived_init_communicators(), NonDAdaptImpSampling::derived_init_communicators(), NonDAdaptiveSampling::derived_init_communicators(), NonDGPImpSampling::derived_init_communicators(), NonDPolynomialChaos::derived_init_communicators(), NonDLocalReliability::derived_init_communicators(), HierarchSurrModel::derived_init_communicators(), DataFitSurrModel::derived_init_communicators(), RecastModel::derived_init_communicators(), Iterator::derived_init_communicators(), DataFitSurrModel::derived_set_communicators(), Model::init_communicators(), EfficientSubspaceMethod::reduced_space_uq(), and Model::serve_init().
void init_serial | ( | ) |
for cases where init_communicators() will not be called, modify some default settings to behave properly in serial.
The init_serial() and derived_init_serial() functions are stuctured to separate base class (common) operations from derived class (specialized) operations.
References Model::asynchEvalFlag, Model::derived_init_serial(), Model::init_serial(), Model::local_eval_synchronization(), and Model::modelRep.
Referenced by HierarchSurrModel::derived_init_serial(), NestedModel::derived_init_serial(), DataFitSurrModel::derived_init_serial(), RecastModel::derived_init_serial(), and Model::init_serial().
void estimate_message_lengths | ( | ) |
estimate messageLengths for a model
This functionality has been pulled out of init_communicators() and defined separately so that it may be used in those cases when messageLengths is needed but model.init_communicators() is not called, e.g., for the master processor in the self-scheduling of a concurrent iterator strategy.
References Response::active_set_derivative_vector(), Model::aleatDistParams, Response::copy(), Variables::copy(), Model::currentResponse, Model::currentVariables, Variables::cv(), Model::discreteDesignSetStringValues, Model::discreteStateSetStringValues, Model::epistDistParams, Model::estimate_message_lengths(), Variables::icv(), Model::interface_id(), Model::messageLengths, Model::modelRep, ParallelLibrary::mpirun_flag(), Model::numFns, Model::parallelLib, MPIPackBuffer::reset(), MPIPackBuffer::size(), and Model::string_variable_max().
Referenced by Model::estimate_message_lengths(), Model::init_communicators(), and ConcurrentMetaIterator::pre_run().
void assign_rep | ( | Model * | model_rep, |
bool | ref_count_incr = true |
||
) |
replaces existing letter with a new one
Similar to the assignment operator, the assign_rep() function decrements referenceCount for the old modelRep and assigns the new modelRep. It is different in that it is used for publishing derived class letters to existing envelopes, as opposed to sharing representations among multiple envelopes (in particular, assign_rep is passed a letter object and operator= is passed an envelope object). Letter assignment supports two models as governed by ref_count_incr:
References Dakota::abort_handler(), Model::model_rep(), Model::modelRep, and Model::referenceCount.
Referenced by Minimizer::data_transform_model(), EffGlobalMinimizer::EffGlobalMinimizer(), NonDAdaptiveSampling::NonDAdaptiveSampling(), NonDBayesCalibration::NonDBayesCalibration(), NonDGlobalInterval::NonDGlobalInterval(), NonDGlobalReliability::NonDGlobalReliability(), NonDGPImpSampling::NonDGPImpSampling(), NonDLocalInterval::NonDLocalInterval(), NonDLocalReliability::NonDLocalReliability(), NonDPolynomialChaos::NonDPolynomialChaos(), NonDStochCollocation::NonDStochCollocation(), Optimizer::reduce_model(), EfficientSubspaceMethod::reduced_space_uq(), Minimizer::scale_model(), SurrBasedLocalMinimizer::SurrBasedLocalMinimizer(), NonD::transform_model(), and LeastSq::weight_model().
Real continuous_probability_density | ( | Real | c_var, |
unsigned short | cv_type, | ||
size_t | dist_index | ||
) | const |
compute a univariate probability density for a particular active continuous variable at the provided value
This overloaded version accepts a distribution index to avoid repeated invocations of find_index().
References Model::aleatDistParams, Model::continuous_probability_density(), and Model::modelRep.
int derivative_concurrency | ( | ) | const |
return the gradient concurrency for use in parallel configuration logic
This function assumes derivatives with respect to the active continuous variables. Therefore, concurrency with respect to the inactive continuous variables is not captured.
References Dakota::contains(), Model::derivative_concurrency(), Model::gradIdAnalytic, Model::gradientType, Model::hessianType, Model::hessIdNumerical, Model::intervalType, Model::methodSource, Model::modelRep, and Model::numDerivVars.
Referenced by Model::derivative_concurrency(), HierarchSurrModel::derived_free_communicators(), HierarchSurrModel::derived_init_communicators(), DataFitSurrModel::derived_init_communicators(), HierarchSurrModel::derived_set_communicators(), DataFitSurrModel::estimate_partition_bounds(), NonDExpansion::initialize_u_space_model(), Analyzer::num_samples(), and Iterator::update_from_model().
Real initialize_h | ( | Real | x_j, |
Real | lb_j, | ||
Real | ub_j, | ||
Real | step_size, | ||
String | step_type | ||
) |
function to determine initial finite difference h (before step length adjustment) based on type of step desired
Auxiliary function to determine initial finite difference h (before step length adjustment) based on type of step desired.
Referenced by Model::estimate_derivatives().
Real FDstep1 | ( | Real | x0_j, |
Real | lb_j, | ||
Real | ub_j, | ||
Real | h_mag | ||
) |
function returning finite-difference step size (affected by bounds)
Auxiliary function to compute forward or first central-difference step size.
References Model::ignoreBounds, and Model::shortStep.
Referenced by Model::estimate_derivatives().
Real FDstep2 | ( | Real | x0_j, |
Real | lb_j, | ||
Real | ub_j, | ||
Real | h | ||
) |
function returning second central-difference step size (affected by bounds)
Auxiliary function to second central-difference step size, honoring bounds.
References Model::ignoreBounds, and Model::shortStep.
Referenced by Model::estimate_derivatives().
Model * get_model | ( | ProblemDescDB & | problem_db | ) | [private] |
Used by the envelope to instantiate the correct letter class.
Used only by the envelope constructor to initialize modelRep to the appropriate derived type, as given by the modelType attribute.
References ProblemDescDB::get_string(), Model::model_type(), and Model::modelType.
Referenced by Model::Model().
int estimate_derivatives | ( | const ShortArray & | map_asv, |
const ShortArray & | fd_grad_asv, | ||
const ShortArray & | fd_hess_asv, | ||
const ShortArray & | quasi_hess_asv, | ||
const ActiveSet & | original_set, | ||
const bool | asynch_flag | ||
) | [private] |
evaluate numerical gradients using finite differences. This routine is selected with "method_source dakota" (the default method_source) in the numerical gradient specification.
Estimate derivatives by computing finite difference gradients, finite difference Hessians, and/or quasi-Newton Hessians. The total number of finite difference evaluations is returned for use by synchronize() to track response arrays, and it could be used to improve management of max_function_evaluations within the iterators.
! new logic
References Model::all_continuous_lower_bounds(), Model::all_continuous_upper_bounds(), Model::all_continuous_variable_ids(), Model::all_continuous_variable_types(), Variables::all_continuous_variables(), Model::centralHess, Model::continuous_lower_bounds(), Model::continuous_upper_bounds(), Variables::continuous_variable_ids(), Model::continuous_variable_ids(), Model::continuous_variable_types(), Variables::continuous_variables(), Response::copy(), Dakota::copy_data(), Model::currentResponse, Model::currentVariables, Model::db_lookup(), Model::dbCaptureList, Model::dbResponseList, Model::deltaList, ActiveSet::derivative_vector(), Model::derived_asynch_compute_response(), Model::derived_compute_response(), Model::fdGradStepSize, Model::fdGradStepType, Model::fdHessByFnStepSize, Model::fdHessByGradStepSize, Model::fdHessStepType, Model::FDstep1(), Model::FDstep2(), Dakota::find_index(), Model::finite_difference_lower_bound(), Model::finite_difference_upper_bound(), Response::function_gradients(), Response::function_values(), Model::ignoreBounds, Model::inactive_continuous_lower_bounds(), Model::inactive_continuous_upper_bounds(), Variables::inactive_continuous_variable_ids(), Model::inactive_continuous_variable_ids(), Model::inactive_continuous_variable_types(), Variables::inactive_continuous_variables(), Model::initialize_h(), Model::initialMapList, Model::intervalType, Model::numFns, Model::outputLevel, ActiveSet::request_vector(), Model::shortStep, and Model::update_response().
Referenced by Model::asynch_compute_response(), and Model::compute_response().
void synchronize_derivatives | ( | const Variables & | vars, |
const IntResponseMap & | fd_responses, | ||
Response & | new_response, | ||
const ShortArray & | fd_grad_asv, | ||
const ShortArray & | fd_hess_asv, | ||
const ShortArray & | quasi_hess_asv, | ||
const ActiveSet & | original_set | ||
) | [private] |
combine results from an array of finite difference response objects (fd_grad_responses) into a single response (new_response)
Merge an array of fd_responses into a single new_response. This function is used both by synchronous compute_response() for the case of asynchronous estimate_derivatives() and by synchronize() for the case where one or more asynch_compute_response() calls has employed asynchronous estimate_derivatives().
!
References Response::active_set(), Model::acv(), Variables::all_continuous_variable_ids(), Model::centralHess, Variables::continuous_variable_ids(), Response::copy(), Model::currentResponse, Model::currentVariables, Model::cv(), Model::dbCaptureList, Model::dbResponseList, Model::deltaList, ActiveSet::derivative_vector(), Dakota::find_index(), Response::function_gradients(), Response::function_values(), Model::icv(), Variables::inactive_continuous_variable_ids(), Model::initialMapList, Model::intervalType, Model::numFns, ActiveSet::request_values(), Response::reset_inactive(), and Model::update_response().
Referenced by Model::compute_response(), and Model::synchronize().
void update_response | ( | const Variables & | vars, |
Response & | new_response, | ||
const ShortArray & | fd_grad_asv, | ||
const ShortArray & | fd_hess_asv, | ||
const ShortArray & | quasi_hess_asv, | ||
const ActiveSet & | original_set, | ||
Response & | initial_map_response, | ||
const RealMatrix & | new_fn_grads, | ||
const RealSymMatrixArray & | new_fn_hessians | ||
) | [private] |
overlay results to update a response object
Overlay the initial_map_response with numerically estimated new_fn_grads and new_fn_hessians to populate new_response as governed by asv vectors. Quasi-Newton secant Hessian updates are also performed here, since this is where the gradient data needed for the updates is first consolidated. Convenience function used by estimate_derivatives() for the synchronous case and by synchronize_derivatives() for the asynchronous case.
References Response::active_set_request_vector(), Variables::continuous_variable_ids(), Response::copy(), Model::currentResponse, Model::currentVariables, ActiveSet::derivative_vector(), Response::function_gradients(), Response::function_hessians(), Response::function_values(), Model::hessianType, Model::hessIdQuasi, Response::is_null(), Model::numFns, Model::outputLevel, Model::quasiHessians, ActiveSet::request_vector(), Response::reset_inactive(), Model::supportsEstimDerivs, Model::surrogate_response_mode(), and Model::update_quasi_hessians().
Referenced by Model::estimate_derivatives(), and Model::synchronize_derivatives().
void update_quasi_hessians | ( | const Variables & | vars, |
Response & | new_response, | ||
const ActiveSet & | original_set | ||
) | [private] |
perform quasi-Newton Hessian updates
quasi-Newton updates are performed for approximating response function Hessians using BFGS or SR1 formulations. These Hessians are supported only for the active continuous variables, and a check is performed on the DVV prior to invoking the function.
References Dakota::contains(), Variables::continuous_variables(), Dakota::copy_data(), Model::fnGradsPrev, Response::function_gradients(), Model::hessianType, Model::hessIdQuasi, Model::modelType, Model::numDerivVars, Model::numFns, Model::numQuasiUpdates, Model::outputLevel, Model::quasiHessians, Model::quasiHessType, ActiveSet::request_vector(), and Model::xPrev.
Referenced by Model::update_response().
bool manage_asv | ( | const ShortArray & | asv_in, |
ShortArray & | map_asv_out, | ||
ShortArray & | fd_grad_asv_out, | ||
ShortArray & | fd_hess_asv_out, | ||
ShortArray & | quasi_hess_asv_out | ||
) | [private] |
Coordinates usage of estimate_derivatives() calls based on asv_in.
Splits asv_in total request into map_asv_out, fd_grad_asv_out, fd_hess_asv_out, and quasi_hess_asv_out as governed by the responses specification. If the returned use_est_deriv is true, then these asv outputs are used by estimate_derivatives() for the initial map, finite difference gradient evals, finite difference Hessian evals, and quasi-Hessian updates, respectively. If the returned use_est_deriv is false, then only map_asv_out is used.
References Dakota::abort_handler(), Dakota::contains(), Model::gradIdAnalytic, Model::gradIdNumerical, Model::gradientType, Model::hessianType, Model::hessIdAnalytic, Model::hessIdNumerical, Model::hessIdQuasi, Model::intervalType, Model::methodSource, Model::supportsEstimDerivs, and Model::surrogate_response_mode().
Referenced by Model::asynch_compute_response(), and Model::compute_response().
RealVector fdGradStepSize [protected] |
relative finite difference step size for numerical gradients
A scalar value (instead of the vector fd_gradient_step_size spec) is used within the iterator hierarchy since this attribute is only used to publish a step size to vendor numerical gradient algorithms.
Referenced by DataFitSurrModel::DataFitSurrModel(), Model::estimate_derivatives(), Model::fd_gradient_step_size(), RecastModel::initialize_data_from_submodel(), and Model::Model().
RealVector fdHessByGradStepSize [protected] |
relative finite difference step size for numerical Hessians estimated using first-order differences of gradients
For vendor numerical Hessian algorithms, a scalar value is used.
Referenced by DataFitSurrModel::DataFitSurrModel(), Model::estimate_derivatives(), Model::fd_hessian_by_grad_step_size(), RecastModel::initialize_data_from_submodel(), and Model::Model().
RealVector fdHessByFnStepSize [protected] |
relative finite difference step size for numerical Hessians estimated using second-order differences of function values
For vendor numerical Hessian algorithms, a scalar value is used.
Referenced by DataFitSurrModel::DataFitSurrModel(), Model::estimate_derivatives(), Model::fd_hessian_by_fn_step_size(), RecastModel::initialize_data_from_submodel(), and Model::Model().
ProblemDescDB& probDescDB [protected] |
class member reference to the problem description database
Iterator and Model cannot use a shallow copy of ProblemDescDB due to circular destruction dependency (reference counts can't get to 0), since ProblemDescDB contains {iterator,model}List.
Referenced by HierarchSurrModel::derived_init_communicators(), NestedModel::derived_init_communicators(), DataFitSurrModel::derived_init_communicators(), NestedModel::derived_init_serial(), SingleModel::estimate_partition_bounds(), HierarchSurrModel::estimate_partition_bounds(), NestedModel::estimate_partition_bounds(), DataFitSurrModel::estimate_partition_bounds(), Model::problem_description_db(), and NestedModel::update_sub_iterator().