Dakota  Version 6.22
Explore and Predict with Confidence
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
 
void declare_sources () override
 Declare a model's sources to the evaluationsDB.
 
- Public Member Functions inherited from Model
 Model ()
 default constructor More...
 
 Model (ProblemDescDB &problem_db)
 standard constructor More...
 
 Model (const Model &model)=delete
 copy constructor
 
Modeloperator= (const Model &model)=delete
 assignment operator
 
virtual void resize_from_subordinate_model (size_t depth=SZ_MAX)
 resize vars/resp if needed from the bottom up
 
virtual void update_from_subordinate_model (size_t depth=SZ_MAX)
 propagate vars/labels/bounds/targets from the bottom up More...
 
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 bool initialize_mapping (ParLevLIter pl_iter)
 Perform any global updates prior to individual evaluate() calls; returns true if the variables size has changed.
 
virtual bool finalize_mapping ()
 restore state in preparation for next initialization; returns true if the variables size has changed
 
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
 
virtual void cache_unmatched_response (int raw_id)
 migrate an unmatched response record from active response map (computed by synchronize() or synhronize_nowait()) to cached response map
 
virtual void cache_unmatched_responses ()
 migrate remaining response records from responseMap to cachedResponseMap
 
virtual void create_2d_plots ()
 create 2D graphics plots for automatic logging of vars/response data
 
virtual void create_tabular_datastream ()
 create a tabular output stream for automatic logging of vars/response data
 
virtual void derived_auto_graphics (const Variables &vars, const Response &resp)
 Update tabular/graphics data with latest variables/response data.
 
virtual void active_view (short view, bool recurse_flag=true)
 update the Model's active view based on a higher level context
 
virtual void inactive_view (short view, bool recurse_flag=true)
 update the Model's inactive view based on a higher level context
 
virtual bool evaluation_cache (bool recurse_flag=true) const
 Indicates the usage of an evaluation cache by the Model. More...
 
virtual bool restart_file (bool recurse_flag=true) const
 Indicates the usage of a restart file 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 nested_variable_mappings (const SizetArray &c_index1, const SizetArray &di_index1, const SizetArray &ds_index1, const SizetArray &dr_index1, const ShortArray &c_target2, const ShortArray &di_target2, const ShortArray &ds_target2, const ShortArray &dr_target2)
 set primaryA{C,DI,DS,DR}VarMapIndices, secondaryA{C,DI,DS,DR}VarMapTargets (coming from a higher-level NestedModel context to inform derivative est.)
 
virtual const SizetArray & nested_acv1_indices () const
 return primaryACVarMapIndices
 
virtual const ShortArray & nested_acv2_targets () const
 return secondaryACVarMapTargets
 
virtual short query_distribution_parameter_derivatives () const
 calculate and return derivative composition of final results w.r.t. distribution parameters (none, all, or mixed)
 
virtual void activate_distribution_parameter_derivatives ()
 activate derivative setting w.r.t. distribution parameters
 
virtual void deactivate_distribution_parameter_derivatives ()
 deactivate derivative setting w.r.t. distribution parameters
 
virtual Pecos::ProbabilityTransformation & probability_transformation ()
 return probability transformation employed by the Model (forwarded along to ProbabilityTransformModel recasting)
 
virtual void trans_U_to_X (const RealVector &u_c_vars, RealVector &x_c_vars)
 transform u-space variable values to x-space
 
virtual void trans_X_to_U (const RealVector &x_c_vars, RealVector &u_c_vars)
 transform x-space variable values to u-space
 
virtual void trans_grad_X_to_U (const RealVector &fn_grad_x, RealVector &fn_grad_u, const RealVector &x_vars)
 transform x-space gradient vector to u-space
 
virtual void trans_grad_U_to_X (const RealVector &fn_grad_u, RealVector &fn_grad_x, const RealVector &x_vars)
 transform u-space gradient vector to x-space
 
virtual void trans_grad_X_to_S (const RealVector &fn_grad_x, RealVector &fn_grad_s, const RealVector &x_vars)
 transform x-space gradient vector to gradient with respect to inserted distribution parameters
 
virtual void trans_hess_X_to_U (const RealSymMatrix &fn_hess_x, RealSymMatrix &fn_hess_u, const RealVector &x_vars, const RealVector &fn_grad_x)
 transform x-space Hessian matrix to u-space
 
virtual size_t qoi () const
 return number of unique response functions (managing any aggregations)
 
virtual std::shared_ptr< Modelsurrogate_model (size_t i=_NPOS)
 return the i-th approximation sub-model in surrogate models More...
 
virtual std::shared_ptr< const Modelsurrogate_model (size_t i=_NPOS) const
 return the i-th approximation sub-model in surrogate models
 
virtual std::shared_ptr< Modeltruth_model ()
 return the truth sub-model in surrogate models More...
 
virtual std::shared_ptr< const Modeltruth_model () const
 return the truth sub-model in surrogate models
 
virtual unsigned short active_surrogate_model_form (size_t i) const
 return the model form of the i-th active surrogate model
 
virtual unsigned short active_truth_model_form () const
 return the model form of the active truth model
 
virtual std::shared_ptr< Modelactive_surrogate_model (size_t i=_NPOS)
 return the i-th active approximation sub-model in surrogate models More...
 
virtual std::shared_ptr< const Modelactive_surrogate_model (size_t i=_NPOS) const
 return the i-th active approximation sub-model in surrogate models
 
virtual std::shared_ptr< Modelactive_truth_model ()
 return the active truth sub-model in surrogate models More...
 
virtual std::shared_ptr< const Modelactive_truth_model () const
 return the active truth sub-model in surrogate models
 
virtual void active_model_key (const Pecos::ActiveKey &key)
 set the active model key within surrogate data, grid driver, and approximation classes that support the management of multiple approximation states within surrogate models
 
virtual const Pecos::ActiveKey & active_model_key () const
 return the active model key (used by surrogate data, grid driver, and approximation classes to support the management of multiple approximation states within surrogate models)
 
virtual void clear_model_keys ()
 reset by removing all model keys within surrogate data, grid driver, and approximation classes that support the management of multiple approximation states within surrogate models
 
virtual bool active_truth_key () const
 return true if there is an active truth model indicated by truthModelKey
 
virtual size_t active_surrogate_keys () const
 return the number of active surrogate models indicated by surrModelKeys
 
virtual void build_approximation ()
 build a new SurrogateModel approximation
 
virtual bool force_rebuild ()
 determine whether a surrogate model rebuild should be forced based on changes in the inactive data
 
virtual void surrogate_function_indices (const SizetSet &surr_fn_indices)
 set the (currently active) surrogate function index set
 
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 correction_type (short corr_type)
 set the correction type from the DiscrepancyCorrection object used by SurrogateModels
 
virtual short correction_type () const
 return the correction type from the DiscrepancyCorrection object used by SurrogateModels
 
virtual short correction_order () const
 return the correction order from the DiscrepancyCorrection object used by SurrogateModels
 
virtual unsigned short correction_mode () const
 return correctionMode
 
virtual void correction_mode (unsigned short corr_mode)
 set correctionMode
 
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 rebuild_approximation ()
 incremental rebuild of an existing SurrogateModel approximation
 
virtual void rebuild_approximation (const IntResponsePair &response_pr)
 incremental rebuild of an existing SurrogateModel approximation
 
virtual void rebuild_approximation (const IntResponseMap &resp_map)
 incremental rebuild of an existing SurrogateModel approximation
 
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 RealMatrix &samples, const IntResponseMap &resp_map, bool rebuild_flag)
 append multiple points 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 IntVariablesMap &vars_map, const IntResponseMap &resp_map, bool rebuild_flag)
 append multiple points to an existing surrogate's data
 
virtual void replace_approximation (const IntResponsePair &response_pr, bool rebuild_flag)
 replace the response for a single point (based on eval id from response_pr) within an existing surrogate's data
 
virtual void replace_approximation (const IntResponseMap &resp_map, bool rebuild_flag)
 replace the responses for a set of points (based on eval ids from resp_map) within an existing surrogate's data
 
virtual void track_evaluation_ids (bool track)
 assigns a flag to track evaluation ids within surrogate data, enabling id-based lookups for data replacement
 
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 combine_approximation ()
 combine the current approximation with previously stored data sets
 
virtual void combined_to_active (bool clear_combined=true)
 promote the combined approximation into the active approximation
 
virtual void clear_inactive ()
 clear inactive approximations (finalization + combination completed)
 
virtual bool advancement_available ()
 query the approximation for available advancement in resolution controls (order, rank, etc.); an input to adaptive refinement strategies
 
virtual bool formulation_updated () const
 query the approximation for updates in formulation, requiring a rebuild even if no updates to the build data
 
virtual void formulation_updated (bool update)
 assign the status of approximation formulation updates
 
virtual void run_dace ()
 execute the DACE iterator (prior to building/appending the approximation)
 
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 fn_index)
 retrieve a SurrogateData instance 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 prediction variances from each Approximation within a DataFitSurrModel
 
virtual void discrepancy_emulation_mode (short mode)
 set discrepancy emulation mode used in SurrogateModels for approximating response differences
 
virtual bool multifidelity () const
 identify if 1D hierarchy can be defined across model forms
 
virtual bool multilevel () const
 identify if 1D hierarchy can be defined across resolution levels
 
virtual bool multilevel_multifidelity () const
 identify if 2D hierarchy can be defined across both model forms and resolution levels
 
virtual short ensemble_precedence () const
 return precedence for ensemble definition: model forms, resolution levels, or both
 
virtual void ensemble_precedence (short mlmf_prec, bool update_default=false)
 assign precedence for ensemble definition (model forms or resolution levels or both) as determined from algorithm context
 
virtual void single_apply (const Variables &vars, Response &resp, const Pecos::ActiveKey &paired_key)
 apply a DiscrepancyCorrection to correct an approximation within an EnsembleSurrModel
 
virtual void recursive_apply (const Variables &vars, Response &resp)
 apply a sequence of DiscrepancyCorrections to recursively correct an approximation within an EnsembleSurrModel
 
virtual size_t solution_levels () const
 number of discrete levels within solution control (SimulationModel) More...
 
virtual void solution_level_cost_index (size_t index)
 activate a particular level within the solution level control (SimulationModel) More...
 
virtual size_t solution_level_cost_index () const
 return currently active level within the solution level control (SimulationModel)
 
virtual RealVector solution_level_costs () const
 return ordered cost estimates across solution levels (SimulationModel)
 
virtual Real solution_level_cost () const
 return currently active cost estimate from solution level control (SimulationModel)
 
virtual short solution_control_variable_type () const
 return type of solution control variable
 
virtual size_t solution_control_variable_index () const
 return index of solution control variable within all variables
 
virtual size_t solution_control_discrete_variable_index () const
 return index of solution control variable within all discrete variables
 
virtual int solution_level_int_value () const
 return the active (integer) value of the solution control
 
virtual String solution_level_string_value () const
 return the active (string) value of the solution control
 
virtual Real solution_level_real_value () const
 return the active (real) value of the solution control
 
virtual size_t cost_metadata_index () const
 return index of online cost estimates within metadata
 
virtual bool resize_pending () const
 return true if a potential resize is still pending, such that sizing-based initialization should be deferred
 
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.
 
int evaluation_id () const
 return Model's (top-level) evaluation counter, not to be confused with derived counter returned by derived_evaluation_id()
 
bool mapping_initialized () const
 
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...
 
bool manage_data_recastings ()
 initialize modelList and recastFlags for data import/export More...
 
bool recastings () const
 return true if recastFlags is defined
 
void user_space_to_iterator_space (Variables &vars)
 employ the model recursion to transform from bottom level user-space variables to top level iterator-space variables
 
void user_space_to_iterator_space (const Variables &user_vars, const Response &user_resp, Variables &iter_vars, Response &iter_resp)
 employ the model recursion to transform from bottom level user-space data to top level iterator-space data
 
void iterator_space_to_user_space (Variables &vars)
 employ the model recursion to transform from top level iterator-space variables to bottom level user-space variables
 
void iterator_space_to_user_space (const Variables &iter_vars, const Response &iter_resp, Variables &user_vars, Response &user_resp)
 employ the model recursion to transform from top level iterator-space data to bottom level user-space data
 
Pecos::MultivariateDistribution & multivariate_distribution ()
 return mvDist
 
const Pecos::MultivariateDistribution & multivariate_distribution () const
 return mvDist
 
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) as const reference (preferred)
 
Constraintsuser_defined_constraints ()
 return the user-defined constraints (userDefinedConstraints) in mutable form (special cases)
 
const Responsecurrent_response () const
 return the current response (currentResponse)
 
Responsecurrent_response ()
 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_primary_fns () const
 return number of primary functions (total less nonlinear constraints)
 
size_t num_secondary_fns () const
 return number of secondary functions (number of 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 auto_graphics () const
 get 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).
 
virtual String root_model_id ()
 Return the model ID of the "innermost" model. For all derived Models except RecastModels, return modelId. The RecastModel override returns the root_model_id() of the subModel.
 
virtual ActiveSet default_active_set ()
 

Protected Member Functions

void derived_evaluate (const ActiveSet &set) override
 portion of evaluate() specific to NestedModel More...
 
void derived_evaluate_nowait (const ActiveSet &set) override
 portion of evaluate_nowait() specific to NestedModel More...
 
const IntResponseMap & derived_synchronize () override
 portion of synchronize() specific to NestedModel More...
 
std::shared_ptr< Iteratorsubordinate_iterator () override
 return subIterator
 
std::shared_ptr< Modelsubordinate_model () override
 return subModel
 
void derived_subordinate_models (ModelList &ml, bool recurse_flag) override
 return subModel
 
std::shared_ptr< Interfacederived_interface () override
 return optionalInterface
 
void derived_interface (std::shared_ptr< Interface >) override
 
const RealVector & error_estimates () override
 retrieve error estimates corresponding to the subIterator's response results (e.g., statistical MSE for subordinate UQ).
 
void surrogate_response_mode (short mode) override
 pass a bypass request on to the subModel for any lower-level surrogates
 
void component_parallel_mode (short mode) override
 update component parallel mode for supporting parallelism in optionalInterface and subModel
 
size_t mi_parallel_level_index () const override
 return subIteratorSched.miPLIndex
 
short local_eval_synchronization () override
 return optionalInterface synchronization setting More...
 
int local_eval_concurrency () override
 return optionalInterface asynchronous evaluation concurrency More...
 
bool derived_scheduler_overload () const override
 flag which prevents overloading the scheduler with a multiprocessor evaluation (forwarded to optionalInterface) More...
 
IntIntPair estimate_partition_bounds (int max_eval_concurrency) override
 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) override
 set up optionalInterface and subModel for parallel operations More...
 
void derived_init_serial () override
 set up optionalInterface and subModel for serial operations.
 
void derived_set_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) override
 set active parallel configuration within subModel
 
void derived_free_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) override
 deallocate communicator partitions for the NestedModel (forwarded to optionalInterface and subModel)
 
void serve_run (ParLevLIter pl_iter, int max_eval_concurrency) override
 Service optionalInterface and subModel job requests received from the scheduler. Completes when a termination message is received from stop_servers().
 
void stop_servers () override
 Executed by the scheduler to terminate server operations for subModel and optionalInterface when iteration on the NestedModel is complete.
 
const String & interface_id () const override
 return the optionalInterface identifier
 
int derived_evaluation_id () const override
 Return the current evaluation id for the NestedModel. More...
 
void set_evaluation_reference () override
 set the evaluation counter reference points for the NestedModel (request forwarded to optionalInterface and subModel)
 
void fine_grained_evaluation_counters () override
 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 override
 print the evaluation summary for the NestedModel (request forwarded to optionalInterface and subModel)
 
void warm_start_flag (const bool flag) override
 set the warm start flag, including actualModel
 
void initialize_iterator (int job_index)
 
void pack_parameters_buffer (MPIPackBuffer &send_buffer, int job_index)
 
void unpack_parameters_buffer (MPIUnpackBuffer &recv_buffer, int job_index)
 
void unpack_parameters_initialize (MPIUnpackBuffer &recv_buffer, int job_index)
 
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)
 
ActiveSet default_interface_active_set ()
 
- Protected Member Functions inherited from Model
 Model (const ShortShortPair &vars_view, const SharedVariablesData &svd, bool share_svd, const SharedResponseData &srd, bool share_srd, const ActiveSet &set, short output_level, ProblemDescDB &problem_db=dummy_db, ParallelLibrary &parallel_lib=dummy_lib)
 constructor initializing the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
 Model (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 update_model_active_variables (Model &model)
 update incoming (sub-)model with active values from currentVariables
 
IntResponseMap & response_map ()
 return responseMap
 
void initialize_distribution (Pecos::MultivariateDistribution &mv_dist, bool active_only=false)
 initialize distribution types from problemDescDB More...
 
void initialize_active_types (Pecos::MultivariateDistribution &mv_dist)
 initialize distribution types from problemDescDB More...
 
void initialize_distribution_parameters (Pecos::MultivariateDistribution &mv_dist, bool active_only=false)
 initialize distribution parameters from problemDescDB
 
void set_ie_asynchronous_mode (int max_eval_concurrency)
 default logic for defining asynchEvalFlag and evaluationCapacity based on ie_pl settings
 
void assign_max_strings (const Pecos::MultivariateDistribution &mv_dist, Variables &vars)
 assign all of the longest possible string values into vars
 
SSCIter max_string (const StringSet &ss)
 return iterator for longest string value found in string set
 
SRMCIter max_string (const StringRealMap &srm)
 return iterator for longest string value found in string map
 
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.
 
EvaluationsDBState evaluations_db_state (const Interface &interface)
 Return the interface flag for the EvaluationsDB state.
 
EvaluationsDBState evaluations_db_state (const Model &model)
 Return the model flag for the EvaluationsDB state.
 
void asynch_eval_store (const Interface &interface, const int &id, const Response &response)
 Store the response portion of an interface evaluation. Called from rekey_response_map()
 
void asynch_eval_store (const Model &model, const int &id, const Response &response)
 Exists to support storage of interface evaluations. No-op so that rekey_response_map<Model> can be generated.
 
template<typename MetaType >
void rekey_response_map (MetaType &meta_object, IntIntMapArray &id_maps, IntResponseMapArray &resp_maps_rekey, bool deep_copy)
 rekey returned jobs matched in array of id_maps into array of resp_maps_rekey; unmatched jobs can be cached within the meta_object
 
template<typename MetaType >
void rekey_response_map (MetaType &meta_object, IntIntMap &id_map, IntResponseMap &resp_map_rekey, bool deep_copy)
 rekey returned jobs matched in id_map into resp_map_rekey; unmatched jobs can be cached within the meta_object
 
template<typename MetaType >
void rekey_synch (MetaType &meta_object, bool block, IntIntMapArray &id_maps, IntResponseMapArray &resp_maps_rekey, bool deep_copy=false)
 synchronize via meta_object and rekey returned jobs matched in array of id_maps into array of resp_maps_rekey; unmatched jobs are cached within the meta_object
 
template<typename MetaType >
void rekey_synch (MetaType &meta_object, bool block, IntIntMap &id_map, IntResponseMap &resp_map_rekey, bool deep_copy=false)
 synchronize via meta_object and rekey returned jobs matched in id_map into resp_map_rekey; unmatched jobs are cached within the meta_object
 

Private Member Functions

void init_sub_iterator ()
 init subIterator-based counts and init subModel with mapping data
 
PRPQueueIter job_index_to_queue_iterator (int job_index)
 convert job_index to an eval_id through subIteratorIdMap and eval_id to a subIteratorPRPQueue queue iterator
 
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, int job_index, Variables &vars, ActiveSet &set, int &eval_id)
 lower level function shared by unpack_parameters_buffer() and unpack_parameters_initialize()
 
void resolve_map1 (const String &map1, size_t &ac_index1, size_t &adi_index1, size_t &ads_index1, size_t &adr_index1, size_t curr_index, short &inactive_sm_view)
 compute variable mapping indices corresponding to map1 and update inactive view if necessary
 
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
 
void real_variable_mapping (Real r_var, size_t av_index, short svm_target)
 insert r_var into appropriate recipient
 
void integer_variable_mapping (int i_var, size_t av_index, short svm_target)
 insert i_var into appropriate recipient
 
void string_variable_mapping (const String &s_var, size_t av_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
 
void iterator_error_estimation (const RealSymMatrix &sub_iterator_errors, RealVector &mapped_errors)
 combine error estimates from the sub-iteration to define mappedErrorEstimates
 
Responsenested_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
 
RealVector mappedErrorEstimates
 mapping of subIterator->response_error_estimates() through primary and secondary mappings
 
size_t outerMIPLIndex
 the miPLIndex for the outer parallelism context, prior to any subIterator partitioning
 
std::shared_ptr< IteratorsubIterator
 the sub-iterator that is executed on every evaluation of this model
 
std::shared_ptr< ModelsubModel
 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
 
String subMethodPointer
 the sub-method pointer from the nested model specification
 
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 = 0
 number of sub-iterator response functions prior to mapping
 
size_t numSubIterMappedIneqCon = 0
 number of top-level inequality constraints mapped from the sub-iteration results
 
size_t numSubIterMappedEqCon = 0
 number of top-level equality constraints mapped from the sub-iteration results
 
std::shared_ptr< InterfaceoptionalInterface
 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 = 0
 number of primary response functions (objective/least squares/generic functions) resulting from optional interface evaluations
 
size_t numOptInterfIneqCon = 0
 number of inequality constraints resulting from optional interface evaluations
 
size_t numOptInterfEqCon = 0
 number of equality constraints resulting from the optional interface evaluations
 
IntSet optInterfGradIdAnalytic
 analytic IDs for mixed gradients on the optional interface
 
IntSet optInterfHessIdAnalytic
 analytic IDs for mixed Hessians on the optional interface
 
String optInterfGradientType
 Gradient type for the optional interface.
 
String optInterfHessianType
 Hessian type for the optional interface.
 
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
 
bool identityRespMap = false
 whether identity response mapping is active
 
size_t subIterMappedPri = 0
 number of sub-iterator results functions mapped to nested model primary functions (cached for use with identity case)
 
size_t subIterMappedSec = 0
 number of sub-iterator results functions mapped to nested model secondary functions (cached for use with identity case)
 
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

- Static Public Member Functions inherited from Model
static void active_variables (const RealVector &config_vars, Model &model)
 set the specified configuration to the Model's inactive vars, converting from real to integer or through index to string value as needed More...
 
static void inactive_variables (const RealVector &config_vars, Model &model)
 set the specified configuration to the Model's inactive vars, converting from real to integer or through index to string value as needed More...
 
static void inactive_variables (const RealVector &config_vars, Model &model, Variables &updated_vars)
 
static void evaluate (const RealMatrix &samples_matrix, Model &model, RealMatrix &resp_matrix)
 Bulk synchronously evaluate the model for each column (of active variables) in the samples matrix and return as columns of the response matrix.
 
static void evaluate (const VariablesArray &sample_vars, Model &model, RealMatrix &resp_matrix)
 Bulk synchronously evaluate the model for each entry (of active variables) in the samples vector and return as columns of the response matrix.
 
- Static Protected Member Functions inherited from Model
static String user_auto_id ()
 return the next available model ID for no-ID user methods More...
 
static String no_spec_id ()
 return the next available model ID for on-the-fly methods More...
 
- 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 warmStartFlag
 if in warm-start mode, don't reset accumulated data (e.g., quasiHessians)
 
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
 
EvaluationsDBState modelEvaluationsDBState
 Whether to write model evals to the evaluations DB.
 
EvaluationsDBState interfEvaluationsDBState
 Whether to write interface evals to the evaluations DB.
 
IntArray messageLengths
 length of packed MPI buffers containing vars, vars/set, response, and PRPair
 
bool mappingInitialized
 track use of initialize_mapping() and finalize_mapping()
 
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: NO_PARALLEL_MODE, SURROGATE_MODEL_MODE,
 
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
 
Pecos::MultivariateDistribution mvDist
 the multivariate random variable distribution (in probability space corresponding to currentVariables)
 
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
 
EvaluationStore & evaluationsDB
 reference to the global evaluation database
 

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

◆ derived_evaluate()

void derived_evaluate ( const ActiveSet set)
overrideprotectedvirtual

◆ derived_evaluate_nowait()

void derived_evaluate_nowait ( const ActiveSet set)
overrideprotectedvirtual

◆ derived_synchronize()

const IntResponseMap & derived_synchronize ( )
overrideprotectedvirtual

◆ local_eval_synchronization()

short local_eval_synchronization ( )
inlineoverrideprotectedvirtual

return optionalInterface synchronization setting

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

Reimplemented from Model.

References NestedModel::optInterfacePointer, and NestedModel::optionalInterface.

◆ local_eval_concurrency()

int local_eval_concurrency ( )
inlineoverrideprotectedvirtual

return optionalInterface asynchronous evaluation concurrency

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

Reimplemented from Model.

References NestedModel::optInterfacePointer, and NestedModel::optionalInterface.

◆ derived_scheduler_overload()

bool derived_scheduler_overload ( ) const
inlineoverrideprotectedvirtual

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

Derived scheduler overload for subModel is handled separately in subModel.evaluate() within subIterator->run().

Reimplemented from Model.

References IteratorScheduler::iteratorScheduling, NestedModel::optInterfacePointer, NestedModel::optionalInterface, IteratorScheduler::procsPerIterator, NestedModel::subIterator, and NestedModel::subIteratorSched.

◆ derived_init_communicators()

void derived_init_communicators ( ParLevLIter  pl_iter,
int  max_eval_concurrency,
bool  recurse_flag = true 
)
overrideprotectedvirtual

◆ derived_evaluation_id()

int derived_evaluation_id ( ) const
inlineoverrideprotectedvirtual

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.

◆ response_mapping()

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

◆ subModel

std::shared_ptr<Model> subModel
private

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