Dakota  Version 6.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
NestedModel Class Reference

Derived model class which performs a complete sub-iterator execution within every evaluation of the model. More...

Inheritance diagram for NestedModel:
Model

Public Member Functions

 NestedModel (ProblemDescDB &problem_db)
 constructor
 
 ~NestedModel ()
 destructor
 
- Public Member Functions inherited from Model
 Model ()
 default constructor More...
 
 Model (ProblemDescDB &problem_db)
 standard constructor for envelope More...
 
 Model (const Model &model)
 copy constructor More...
 
virtual ~Model ()
 destructor More...
 
Model operator= (const Model &model)
 assignment operator More...
 
virtual Modelsurrogate_model ()
 return the active approximation sub-model in surrogate models More...
 
virtual void surrogate_model_indices (size_t lf_model_index, size_t lf_soln_lev_index=_NPOS)
 set the indices that define the active approximation sub-model within surrogate models
 
virtual void surrogate_model_indices (const SizetSizetPair &lf_form_level)
 set the index pair that defines the active approximation sub-model within surrogate models
 
virtual const SizetSizetPair & surrogate_model_indices () const
 return the indices of the active approximation sub-model within surrogate models
 
virtual Modeltruth_model ()
 return the active truth sub-model in surrogate models More...
 
virtual void truth_model_indices (size_t hf_model_index, size_t hf_soln_lev_index=_NPOS)
 set the indices that define the active truth sub-model within surrogate models
 
virtual void truth_model_indices (const SizetSizetPair &hf_form_level)
 set the index pair that defines the active truth sub-model within surrogate models
 
virtual const SizetSizetPair & truth_model_indices () const
 return the indices of the active truth sub-model within surrogate models
 
virtual void update_from_subordinate_model (size_t depth=std::numeric_limits< size_t >::max())
 propagate vars/labels/bounds/targets from the bottom up More...
 
virtual size_t solution_levels () const
 number of discrete levels within solution control (SimulationModel) More...
 
virtual void solution_level_index (size_t index)
 activate a particular level within the solution level control and return the cost estimate (SimulationModel) More...
 
virtual RealVector solution_level_cost () const
 return ordered cost estimates across solution levels (SimulationModel)
 
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 bool initialize_mapping (ParLevLIter pl_iter)
 initialize model mapping, returns true if the variables size has changed
 
virtual bool finalize_mapping ()
 finalize model mapping, returns true if the variables size has changed
 
virtual bool mapping_initialized ()
 return true if mapping has been fully initialized, false otherwise.
 
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 anchor response at vars; rebuild if needed
 
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 push_approximation()
 
virtual void push_approximation ()
 push a previous approximation data state; reverse of pop_approximation
 
virtual bool push_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 (size_t index=_NPOS)
 move the current approximation into storage for later combination; the index of the stored set can be passed to allow replacement instead of augmentation (default is push_back)
 
virtual void restore_approximation (size_t index=_NPOS)
 return an approximation from storage; the index identifies a particular stored data set (default is pop_back from stored)
 
virtual void remove_stored_approximation (size_t index=_NPOS)
 remove a stored approximation, due to redundancy with the current approximation, prior to combination (default for no index is pop_back)
 
virtual void combine_approximation (short corr_type)
 combine the current approximation with previously stored data sets
 
virtual void run_dace_iterator (bool rebuild_flag)
 execute the DACE iterator, append the approximation data, and rebuild the approximation if indicated
 
virtual bool force_rebuild ()
 determine whether a surrogate model rebuild should be forced based on changes in the inactive data
 
virtual SharedApproxDatashared_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 short surrogate_response_mode () const
 return response computation mode used in SurrogateModels for forming currentResponse
 
virtual DiscrepancyCorrectiondiscrepancy_correction ()
 return the DiscrepancyCorrection object used by SurrogateModels
 
virtual void inactive_view (short view, bool recurse_flag=true)
 update the Model's inactive view based on higher level (nested) context
 
virtual bool evaluation_cache () const
 Indicates the usage of an evaluation cache by the Model. More...
 
virtual void eval_tag_prefix (const String &eval_id_str)
 set the hierarchical eval ID tag prefix More...
 
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
 
virtual void stop_init_mapping (ParLevLIter pl_iter)
 called from IteratorScheduler::run_iterator() for iteratorComm rank 0 to terminate serve_init_mapping() on other iteratorComm processors
 
virtual int serve_init_mapping (ParLevLIter pl_iter)
 called from IteratorScheduler::run_iterator() for iteratorComm rank != 0 to balance resize() calls on iteratorComm rank 0
 
virtual void stop_finalize_mapping (ParLevLIter pl_iter)
 called from IteratorScheduler::run_iterator() for iteratorComm rank 0 to terminate serve_finalize_mapping() on other iteratorComm processors
 
virtual int serve_finalize_mapping (ParLevLIter pl_iter)
 called from IteratorScheduler::run_iterator() for iteratorComm rank != 0 to balance resize() calls on iteratorComm rank 0
 
ModelList & subordinate_models (bool recurse_flag=true)
 return the sub-models in nested and surrogate models More...
 
void evaluate ()
 Compute the Response at currentVariables (default ActiveSet).
 
void evaluate (const ActiveSet &set)
 Compute the Response at currentVariables (specified ActiveSet).
 
void evaluate_nowait ()
 Spawn an asynchronous job (or jobs) that computes the value of the Response at currentVariables (default ActiveSet).
 
void evaluate_nowait (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 More...
 
void init_serial ()
 for cases where init_communicators() will not be called, modify some default settings to behave properly in serial. More...
 
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_communicators (ParLevLIter pl_iter)
 called from IteratorScheduler::init_iterator() for iteratorComm rank 0 to terminate serve_init_communicators() on other iteratorComm processors
 
int serve_init_communicators (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 More...
 
void assign_rep (Model *model_rep, bool ref_count_incr=true)
 replaces existing letter with a new one More...
 
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
 
Real continuous_variable (size_t i) const
 return an active continuous variable 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
 
int discrete_int_variable (size_t i) const
 return an active discrete integer variable 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
 
const String & discrete_string_variable (size_t i) const
 return an active discrete string variable 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
 
Real discrete_real_variable (size_t i) const
 return an active discrete real variable 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
 
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
 
Real continuous_lower_bound (size_t i) const
 return an active continuous lower bound 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
 
Real continuous_upper_bound (size_t i) const
 return an active continuous upper bound 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
 
int discrete_int_lower_bound (size_t i) const
 return an active discrete int lower bound 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
 
int discrete_int_upper_bound (size_t i) const
 return an active discrete int upper bound 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
 
Real discrete_real_lower_bound (size_t i) const
 return an active discrete real lower bound 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
 
Real discrete_real_upper_bound (size_t i) const
 return an active discrete real upper bound 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 Variablescurrent_variables () const
 return the current variables (currentVariables) as const reference (preferred)
 
Variablescurrent_variables ()
 return the current variables (currentVariables) in mutable form (special cases)
 
const Constraintsuser_defined_constraints () const
 return the user-defined constraints (userDefinedConstraints)
 
const Responsecurrent_response () const
 return the current response (currentResponse)
 
ProblemDescDBproblem_description_db () const
 return the problem description database (probDescDB)
 
ParallelLibraryparallel_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
 
const ScalingOptionsscaling_options () const
 user-provided scaling options
 
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 More...
 
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 evaluate/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)
 
Modelmodel_rep () const
 returns modelRep for access to derived class member functions that are not mapped to the top Model level
 

Protected Member Functions

void derived_evaluate (const ActiveSet &set)
 portion of evaluate() specific to NestedModel More...
 
void derived_evaluate_nowait (const ActiveSet &set)
 portion of evaluate_nowait() specific to NestedModel More...
 
const IntResponseMap & derived_synchronize ()
 portion of synchronize() specific to NestedModel More...
 
Iteratorsubordinate_iterator ()
 return subIterator
 
Modelsubordinate_model ()
 return subModel
 
void derived_subordinate_models (ModelList &ml, bool recurse_flag)
 return subModel
 
Interfacederived_interface ()
 return optionalInterface
 
void surrogate_response_mode (short mode)
 pass a bypass request on to the subModel for any lower-level surrogates
 
void component_parallel_mode (short mode)
 update component parallel mode for supporting parallelism in optionalInterface and subModel
 
size_t mi_parallel_level_index () const
 return subIteratorSched.miPLIndex
 
short local_eval_synchronization ()
 return optionalInterface synchronization setting More...
 
int local_eval_concurrency ()
 return optionalInterface asynchronous evaluation concurrency More...
 
bool derived_master_overload () const
 flag which prevents overloading the master with a multiprocessor evaluation (forwarded to optionalInterface) More...
 
IntIntPair estimate_partition_bounds (int max_eval_concurrency)
 estimate the minimum and maximum partition sizes that can be utilized by this Model
 
void derived_init_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true)
 set up optionalInterface and subModel for parallel operations More...
 
void derived_init_serial ()
 set up optionalInterface and subModel for serial operations.
 
void derived_set_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true)
 set active parallel configuration within subModel
 
void derived_free_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true)
 deallocate communicator partitions for the NestedModel (forwarded to optionalInterface and subModel)
 
void serve_run (ParLevLIter pl_iter, int max_eval_concurrency)
 Service optionalInterface and subModel job requests received from the master. Completes when a termination message is received from stop_servers().
 
void stop_servers ()
 Executed by the master to terminate server operations for subModel and optionalInterface when iteration on the NestedModel is complete.
 
const String & interface_id () const
 return the optionalInterface identifier
 
int evaluation_id () const
 Return the current evaluation id for the NestedModel. More...
 
void set_evaluation_reference ()
 set the evaluation counter reference points for the NestedModel (request forwarded to optionalInterface and subModel)
 
void fine_grained_evaluation_counters ()
 request fine-grained evaluation reporting within optionalInterface and subModel
 
void print_evaluation_summary (std::ostream &s, bool minimal_header=false, bool relative_count=true) const
 print the evaluation summary for the NestedModel (request forwarded to optionalInterface and subModel)
 
void initialize_iterator (int job_index)
 
void pack_parameters_buffer (MPIPackBuffer &send_buffer, int job_index)
 
void unpack_parameters_buffer (MPIUnpackBuffer &recv_buffer)
 
void unpack_parameters_initialize (MPIUnpackBuffer &recv_buffer)
 
void pack_results_buffer (MPIPackBuffer &send_buffer, int job_index)
 
void unpack_results_buffer (MPIUnpackBuffer &recv_buffer, int job_index)
 
void update_local_results (int job_index)
 
- Protected Member Functions inherited from Model
 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) More...
 
 Model (LightWtBaseConstructor, ProblemDescDB &problem_db, ParallelLibrary &parallel_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 &parallel_lib)
 constructor initializing base class for recast model instances More...
 
virtual const IntResponseMap & derived_synchronize_nowait ()
 portion of synchronize_nowait() 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]
 
SizetMultiArrayConstView initialize_x0_bounds (const SizetArray &original_dvv, bool &active_derivs, bool &inactive_derivs, RealVector &x0, RealVector &fd_lb, RealVector &fd_ub) const
 Initialize data needed for computing finite differences (active/inactive, center point, and bounds)
 
Real forward_grad_step (size_t num_deriv_vars, size_t xj_index, Real x0_j, Real lb_j, Real ub_j)
 Compute the forward step for a finite difference gradient; updates shortStep.
 

Private Member Functions

void update_sub_iterator ()
 update subIterator with mapping data and set subIterator-based counts
 
void initialize_iterator (const Variables &vars, const ActiveSet &set, int eval_id)
 lower level function shared by initialize_iterator(int) and unpack_parameters_initialize()
 
void unpack (MPIUnpackBuffer &recv_buffer, Variables &vars, ActiveSet &set, int &eval_id)
 lower level function shared by unpack_parameters_buffer() and unpack_parameters_initialize()
 
void resolve_real_variable_mapping (const String &map1, const String &map2, size_t curr_index, short &inactive_sm_view)
 for a named real mapping, resolve primary index and secondary target
 
void resolve_integer_variable_mapping (const String &map1, const String &map2, size_t curr_index, short &inactive_sm_view)
 for a named integer mapping, resolve primary index and secondary target
 
void resolve_string_variable_mapping (const String &map1, const String &map2, size_t curr_index, short &inactive_sm_view)
 for a named string mapping, resolve primary index and secondary target
 
size_t sm_acv_index_map (size_t pacvm_index, short sacvm_target)
 offset pacvm_index based on sacvm_target to create mapped_index
 
size_t sm_adiv_index_map (size_t padivm_index, short sadivm_target)
 offset padivm_index based on sadivm_target to create mapped_index
 
size_t sm_adsv_index_map (size_t padsvm_index, short sadsvm_target)
 offset padsvm_index based on sadsvm_target to create mapped_index
 
size_t sm_adrv_index_map (size_t padrvm_index, short sadrvm_target)
 offset padrvm_index based on sadrvm_target to create mapped_index
 
size_t cv_index_map (size_t cv_index, const Variables &vars)
 offset cv_index to create index into aggregated primary/secondary arrays More...
 
size_t div_index_map (size_t div_index, const Variables &vars)
 offset div_index to create index into aggregated primary/secondary arrays More...
 
size_t dsv_index_map (size_t dsv_index, const Variables &vars)
 offset dsv_index to create index into aggregated primary/secondary arrays More...
 
size_t drv_index_map (size_t drv_index, const Variables &vars)
 offset drv_index to create index into aggregated primary/secondary arrays More...
 
size_t ccv_index_map (size_t ccv_index, const Variables &vars)
 offset active complement ccv_index to create index into all continuous arrays More...
 
size_t cdiv_index_map (size_t cdiv_index, const Variables &vars)
 offset active complement cdiv_index to create index into all discrete int arrays More...
 
size_t cdsv_index_map (size_t cdsv_index, const Variables &vars)
 offset active complement cdsv_index to create index into all discrete string arrays More...
 
size_t cdrv_index_map (size_t cdrv_index, const Variables &vars)
 offset active complement cdrv_index to create index into all discrete real arrays More...
 
void real_variable_mapping (const Real &r_var, size_t mapped_index, short svm_target)
 insert r_var into appropriate recipient
 
void integer_variable_mapping (const int &i_var, size_t mapped_index, short svm_target)
 insert i_var into appropriate recipient
 
void string_variable_mapping (const String &s_var, size_t mapped_index, short svm_target)
 insert s_var into appropriate recipient
 
void set_mapping (const ActiveSet &mapped_set, ActiveSet &interface_set, bool &opt_interface_map, ActiveSet &sub_iterator_set, bool &sub_iterator_map)
 define the evaluation requirements for the optionalInterface (interface_set) and the subIterator (sub_iterator_set) from the total model evaluation requirements (mapped_set)
 
void response_mapping (const Response &interface_response, const Response &sub_iterator_response, Response &mapped_response)
 combine the response from the optional interface evaluation with the response from the sub-iteration using the primaryCoeffs/secondaryCoeffs mappings to create the total response for the model More...
 
void interface_response_overlay (const Response &opt_interface_response, Response &mapped_response)
 assign the response from the optional interface evaluation within the total response for the model
 
void iterator_response_overlay (const Response &sub_iterator_response, Response &mapped_response)
 overlay the sub-iteration response within the total response for the model using the primaryCoeffs/secondaryCoeffs mappings
 
Responsefind_nested_response (int nested_cntr)
 locate existing or allocate new entry in nestedResponseMap
 
void check_response_map (const ShortArray &mapped_asv)
 check function counts for the mapped_asv
 
void update_inactive_view (short new_view, short &view)
 update inactive variables view for subIterator based on new_view
 
void update_inactive_view (unsigned short type, short &view)
 update inactive variables view for subIterator based on type
 
void update_sub_model (const Variables &vars, const Constraints &cons)
 update subModel with current variable values/bounds/labels
 

Private Attributes

int nestedModelEvalCntr
 number of calls to derived_evaluate()/derived_evaluate_nowait()
 
bool firstUpdate
 boolean to trigger one-time updates on first call to update_sub_model()
 
IntResponseMap nestedResponseMap
 used to return a map of nested responses (including subIterator and optionalInterface contributions) for aggregation and rekeying at the base class level
 
size_t outerMIPLIndex
 the miPLIndex for the outer parallelism context, prior to any subIterator partitioning
 
Iterator subIterator
 the sub-iterator that is executed on every evaluation of this model
 
String subMethodPointer
 the sub-method pointer from the nested model specification
 
Model subModel
 the sub-model used in sub-iterator evaluations More...
 
PRPQueue subIteratorPRPQueue
 job queue for asynchronous execution of subIterator jobs
 
IteratorScheduler subIteratorSched
 scheduling object for concurrent iterator parallelism
 
int subIteratorJobCntr
 subIterator job counter since last synchronize()
 
IntIntMap subIteratorIdMap
 mapping from subIterator evaluation counter to nested model counter (different when subIterator evaluations do not occur on every nested model evaluation due to variable ASV content)
 
size_t numSubIterFns
 number of sub-iterator response functions prior to mapping
 
size_t numSubIterMappedIneqCon
 number of top-level inequality constraints mapped from the sub-iteration results
 
size_t numSubIterMappedEqCon
 number of top-level equality constraints mapped from the sub-iteration results
 
Interface optionalInterface
 the optional interface contributes nonnested response data to the total model response
 
String optInterfacePointer
 the optional interface pointer from the nested model specification
 
Response optInterfaceResponse
 the response object resulting from optional interface evaluations
 
IntIntMap optInterfaceIdMap
 mapping from optionalInterface evaluation counter to nested model counter (different when optionalInterface evaluations do not occur on every nested model evaluation due to variable ASV content)
 
size_t numOptInterfPrimary
 number of primary response functions (objective/least squares/generic functions) resulting from optional interface evaluations
 
size_t numOptInterfIneqCon
 number of inequality constraints resulting from optional interface evaluations
 
size_t numOptInterfEqCon
 number of equality constraints resulting from the optional interface evaluations
 
SizetArray active1ACVarMapIndices
 "primary" variable mappings for inserting active continuous currentVariables within all continuous subModel variables. If there are no secondary mappings defined, then the insertions replace the subModel variable values.
 
SizetArray active1ADIVarMapIndices
 "primary" variable mappings for inserting active discrete int currentVariables within all discrete int subModel variables. No secondary mappings are defined for discrete int variables, so the active variables replace the subModel variable values.
 
SizetArray active1ADSVarMapIndices
 "primary" variable mappings for inserting active discrete string currentVariables within all discrete string subModel variables. No secondary mappings are defined for discrete string variables, so the active variables replace the subModel variable values.
 
SizetArray active1ADRVarMapIndices
 "primary" variable mappings for inserting active discrete real currentVariables within all discrete real subModel variables. No secondary mappings are defined for discrete real variables, so the active variables replace the subModel variable values.
 
ShortArray active2ACVarMapTargets
 "secondary" variable mappings for inserting active continuous currentVariables into sub-parameters (e.g., distribution parameters for uncertain variables or bounds for continuous design/state variables) within all continuous subModel variables.
 
ShortArray active2ADIVarMapTargets
 "secondary" variable mappings for inserting active discrete int currentVariables into sub-parameters (e.g., bounds for discrete design/state variables) within all discrete int subModel variables.
 
ShortArray active2ADSVarMapTargets
 "secondary" variable mappings for inserting active discrete string currentVariables into sub-parameters (e.g., bounds for discrete design/state variables) within all discrete string subModel variables.
 
ShortArray active2ADRVarMapTargets
 "secondary" variable mappings for inserting active discrete real currentVariables into sub-parameters (e.g., bounds for discrete design/state variables) within all discrete real subModel variables.
 
SizetArray complement1ACVarMapIndices
 "primary" variable mappings for inserting the complement of the active continuous currentVariables within all continuous subModel variables
 
SizetArray complement1ADIVarMapIndices
 "primary" variable mappings for inserting the complement of the active discrete int currentVariables within all discrete int subModel variables
 
SizetArray complement1ADSVarMapIndices
 "primary" variable mappings for inserting the complement of the active discrete string currentVariables within all discrete string subModel variables
 
SizetArray complement1ADRVarMapIndices
 "primary" variable mappings for inserting the complement of the active discrete real currentVariables within all discrete real subModel variables
 
BitArray extraCVarsData
 flags for updating subModel continuous bounds and labels, one for each active continuous variable in currentVariables
 
BitArray extraDIVarsData
 flags for updating subModel discrete int bounds and labels, one for each active discrete int variable in currentVariables
 
BitArray extraDSVarsData
 flags for updating subModel discrete string labels, one for each active discrete string variable in currentVariables
 
BitArray extraDRVarsData
 flags for updating subModel discrete real bounds and labels, one for each active discrete real variable in currentVariables
 
RealMatrix primaryRespCoeffs
 "primary" response_mapping matrix applied to the sub-iterator response functions. For OUU, the matrix is applied to UQ statistics to create contributions to the top-level objective functions/least squares/ generic response terms.
 
RealMatrix secondaryRespCoeffs
 "secondary" response_mapping matrix applied to the sub-iterator response functions. For OUU, the matrix is applied to UQ statistics to create contributions to the top-level inequality and equality constraints.
 

Friends

class IteratorScheduler
 protect scheduler callback functions from general access
 

Additional Inherited Members

- Protected Attributes inherited from Model
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: simulation, 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 More...
 
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 More...
 
RealVector fdHessByFnStepSize
 relative finite difference step size for numerical Hessians estimated using second-order differences of function values More...
 
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
 
ProblemDescDBprobDescDB
 class member reference to the problem description database More...
 
ParallelLibraryparallelLib
 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
 
ScalingOptions scalingOpts
 user-provided scaling data from the problem DB, possibly modified by Recasting
 
String evalTagPrefix
 cached evalTag Prefix from parents to use at evaluate time
 

Detailed Description

Derived model class which performs a complete sub-iterator execution within every evaluation of the model.

The NestedModel class nests a sub-iterator execution within every model evaluation. This capability is most commonly used for optimization under uncertainty, in which a nondeterministic iterator is executed on every optimization function evaluation. The NestedModel also contains an optional interface, for portions of the model evaluation which are independent from the sub-iterator, and a set of mappings for combining sub-iterator and optional interface data into a top level response for the model.

Member Function Documentation

void derived_evaluate ( const ActiveSet set)
protectedvirtual
void derived_evaluate_nowait ( const ActiveSet set)
protectedvirtual
const IntResponseMap & derived_synchronize ( )
protectedvirtual
short local_eval_synchronization ( )
inlineprotectedvirtual

return optionalInterface synchronization setting

Used in setting Model::asynchEvalFlag. subModel synchronization is used for setting asynchEvalFlag within subModel.

Reimplemented from Model.

References Interface::asynch_local_evaluation_concurrency(), Interface::interface_synchronization(), NestedModel::optInterfacePointer, and NestedModel::optionalInterface.

int local_eval_concurrency ( )
inlineprotectedvirtual

return optionalInterface asynchronous evaluation concurrency

Used in setting Model::evaluationCapacity. subModel concurrency is used for setting evaluationCapacity within subModel.

Reimplemented from Model.

References Interface::asynch_local_evaluation_concurrency(), NestedModel::optInterfacePointer, and NestedModel::optionalInterface.

bool derived_master_overload ( ) const
inlineprotectedvirtual

flag which prevents overloading the master with a multiprocessor evaluation (forwarded to optionalInterface)

Derived master overload for subModel is handled separately in subModel.evaluate() within subIterator.run().

Reimplemented from Model.

References Iterator::is_null(), Interface::iterator_eval_dedicated_master(), IteratorScheduler::iteratorScheduling, Interface::multi_proc_eval(), NestedModel::optInterfacePointer, NestedModel::optionalInterface, IteratorScheduler::procsPerIterator, NestedModel::subIterator, and NestedModel::subIteratorSched.

void derived_init_communicators ( ParLevLIter  pl_iter,
int  max_eval_concurrency,
bool  recurse_flag = true 
)
protectedvirtual
int evaluation_id ( ) const
inlineprotectedvirtual

Return the current evaluation id for the NestedModel.

return the top level nested evaluation count. To get the lower level eval count, the subModel must be explicitly queried. This is consistent with the eval counter definitions in surrogate models.

Reimplemented from Model.

References NestedModel::nestedModelEvalCntr.

size_t cv_index_map ( size_t  cv_index,
const Variables vars 
)
private

offset cv_index to create index into aggregated primary/secondary arrays

maps index within active continuous variables to index within aggregated active continuous/discrete-int/discrete-string/discrete-real variables.

References SharedVariablesData::aleatory_uncertain_counts(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t div_index_map ( size_t  div_index,
const Variables vars 
)
private

offset div_index to create index into aggregated primary/secondary arrays

maps index within active discrete int variables to index within aggregated active continuous/discrete-int/discrete-string/discrete-real variables.

References SharedVariablesData::aleatory_uncertain_counts(), Variables::cv(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), SharedVariablesData::state_counts(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t dsv_index_map ( size_t  dsv_index,
const Variables vars 
)
private

offset dsv_index to create index into aggregated primary/secondary arrays

maps index within active discrete string variables to index within aggregated active continuous/discrete-int/discrete-string/discrete-string variables.

References SharedVariablesData::aleatory_uncertain_counts(), Variables::cv(), SharedVariablesData::design_counts(), Variables::div(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), SharedVariablesData::state_counts(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t drv_index_map ( size_t  drv_index,
const Variables vars 
)
private

offset drv_index to create index into aggregated primary/secondary arrays

maps index within active discrete real variables to index within aggregated active continuous/discrete-int/discrete-string/discrete-real variables.

References SharedVariablesData::aleatory_uncertain_counts(), Variables::cv(), SharedVariablesData::design_counts(), Variables::div(), Variables::dsv(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), SharedVariablesData::state_counts(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t ccv_index_map ( size_t  ccv_index,
const Variables vars 
)
private

offset active complement ccv_index to create index into all continuous arrays

maps index within complement of active continuous variables to index within all continuous variables.

References Dakota::abort_handler(), SharedVariablesData::aleatory_uncertain_counts(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t cdiv_index_map ( size_t  cdiv_index,
const Variables vars 
)
private

offset active complement cdiv_index to create index into all discrete int arrays

maps index within complement of active discrete int variables to index within all discrete int variables.

References Dakota::abort_handler(), SharedVariablesData::aleatory_uncertain_counts(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t cdsv_index_map ( size_t  cdsv_index,
const Variables vars 
)
private

offset active complement cdsv_index to create index into all discrete string arrays

maps index within complement of active discrete string variables to index within all discrete string variables.

References Dakota::abort_handler(), SharedVariablesData::aleatory_uncertain_counts(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

size_t cdrv_index_map ( size_t  cdrv_index,
const Variables vars 
)
private

offset active complement cdrv_index to create index into all discrete real arrays

maps index within complement of active discrete real variables to index within all discrete real variables.

References Dakota::abort_handler(), SharedVariablesData::aleatory_uncertain_counts(), SharedVariablesData::design_counts(), SharedVariablesData::epistemic_uncertain_counts(), Variables::shared_data(), Dakota::svd(), and SharedVariablesData::view().

Referenced by NestedModel::NestedModel(), and NestedModel::update_sub_model().

void response_mapping ( const Response opt_interface_response,
const Response sub_iterator_response,
Response mapped_response 
)
inlineprivate

combine the response from the optional interface evaluation with the response from the sub-iteration using the primaryCoeffs/secondaryCoeffs mappings to create the total response for the model

In the OUU case,
optionalInterface fns = {f}, {g} (deterministic primary functions, constraints)
subIterator fns       = {S}      (UQ response statistics)

Problem formulation for mapped functions:
                  minimize    {f} + [W]{S}
                  subject to  {g_l} <= {g}    <= {g_u}
                              {a_l} <= [A]{S} <= {a_u}
                              {g}    == {g_t}
                              [A]{S} == {a_t}

where [W] is the primary_mapping_matrix user input (primaryRespCoeffs class attribute), [A] is the secondary_mapping_matrix user input (secondaryRespCoeffs class attribute), {{g_l},{a_l}} are the top level inequality constraint lower bounds, {{g_u},{a_u}} are the top level inequality constraint upper bounds, and {{g_t},{a_t}} are the top level equality constraint targets.

NOTE: optionalInterface/subIterator primary fns (obj/lsq/generic fns) overlap but optionalInterface/subIterator secondary fns (ineq/eq constraints) do not. The [W] matrix can be specified so as to allow

  • some purely deterministic primary functions and some combined: [W] filled and [W].num_rows() < {f}.length() [combined first] or [W].num_rows() == {f}.length() and [W] contains rows of zeros [combined last]
  • some combined and some purely stochastic primary functions: [W] filled and [W].num_rows() > {f}.length()
  • separate deterministic and stochastic primary functions: [W].num_rows() > {f}.length() and [W] contains {f}.length() rows of zeros.

If the need arises, could change constraint definition to allow overlap as well: {g_l} <= {g} + [A]{S} <= {g_u} with [A] usage the same as for [W] above.

In the UOO case, things are simpler, just compute statistics of each optimization response function: [W] = [I], {f}/{g}/[A] are empty.

References Response::active_set_request_vector(), NestedModel::check_response_map(), NestedModel::interface_response_overlay(), and NestedModel::iterator_response_overlay().

Member Data Documentation

Model subModel
private

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