Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HierarchSurrModel Class Reference

Derived model class within the surrogate model branch for managing hierarchical surrogates (models of varying fidelity). More...

Inheritance diagram for HierarchSurrModel:
SurrogateModel Model

List of all members.

Public Member Functions

 HierarchSurrModel (ProblemDescDB &problem_db)
 constructor
 ~HierarchSurrModel ()
 destructor

Protected Member Functions

void derived_compute_response (const ActiveSet &set)
 portion of compute_response() specific to HierarchSurrModel
void derived_asynch_compute_response (const ActiveSet &set)
 portion of asynch_compute_response() specific to HierarchSurrModel
const IntResponseMap & derived_synchronize ()
 portion of synchronize() specific to HierarchSurrModel
const IntResponseMap & derived_synchronize_nowait ()
 portion of synchronize_nowait() specific to HierarchSurrModel
Modelsurrogate_model ()
 return lowFidelityModel
Modeltruth_model ()
 return highFidelityModel
void derived_subordinate_models (ModelList &ml, bool recurse_flag)
 return lowFidelityModel and highFidelityModel
void primary_response_fn_weights (const RealVector &wts, bool recurse_flag=true)
 set the relative weightings for multiple objective functions or least squares terms and optionally recurses into LF/HF models
void surrogate_bypass (bool bypass_flag)
 set surrogateBypass flag and pass request on to highFidelityModel for any lower-level surrogates.
void surrogate_function_indices (const IntSet &surr_fn_indices)
 (re)set the surrogate index set in SurrogateModel::surrogateFnIndices
void build_approximation ()
 use highFidelityModel to compute the truth values needed for correction of lowFidelityModel results
void component_parallel_mode (short mode)
 update component parallel mode for supporting parallelism in lowFidelityModel and highFidelityModel
void derived_init_communicators (const int &max_iterator_concurrency, bool recurse_flag=true)
 set up lowFidelityModel and highFidelityModel for parallel operations
void derived_init_serial ()
 set up lowFidelityModel and highFidelityModel for serial operations.
void derived_set_communicators (const int &max_iterator_concurrency, bool recurse_flag=true)
 set active parallel configuration within lowFidelityModel and highFidelityModel
void derived_free_communicators (const int &max_iterator_concurrency, bool recurse_flag=true)
 deallocate communicator partitions for the HierarchSurrModel (request forwarded to lowFidelityModel and highFidelityModel)
void serve ()
 Service lowFidelityModel and highFidelityModel 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 lowFidelityModel and highFidelityModel server operations when iteration on the HierarchSurrModel is complete.
void inactive_view (short view, bool recurse_flag=true)
 update the Model's inactive view based on higher level (nested) context and optionally recurse into
int evaluation_id () const
 Return the current evaluation id for the HierarchSurrModel.
void set_evaluation_reference ()
 set the evaluation counter reference points for the HierarchSurrModel (request forwarded to lowFidelityModel and highFidelityModel)
void fine_grained_evaluation_counters ()
 request fine-grained evaluation reporting within lowFidelityModel and highFidelityModel
void print_evaluation_summary (std::ostream &s, bool minimal_header=false, bool relative_count=true) const
 print the evaluation summary for the HierarchSurrModel (request forwarded to lowFidelityModel and highFidelityModel)

Private Member Functions

void update_model (Model &model)
 update the incoming model (lowFidelityModel or highFidelityModel) with current variable values/bounds/labels

Private Attributes

int hierModelEvals
 number of calls to derived_compute_response()/ derived_asynch_compute_response()
IntResponseMap cachedTruthRespMap
 map of high-fidelity responses retrieved in derived_synchronize_nowait() that could not be returned since corresponding low-fidelity response portions were still pending.
Model lowFidelityModel
 provides approximate low fidelity function evaluations. Model is of arbitrary type and supports recursions (e.g., lowFidelityModel can be a data fit surrogate on a low fidelity model).
Model highFidelityModel
 provides truth evaluations for computing corrections to the low fidelity results. Model is of arbitrary type and supports recursions.
Response highFidRefResponse
 the reference high fidelity response computed in build_approximation() and used for calculating corrections.

Detailed Description

Derived model class within the surrogate model branch for managing hierarchical surrogates (models of varying fidelity).

The HierarchSurrModel class manages hierarchical models of varying fidelity. In particular, it uses a low fidelity model as a surrogate for a high fidelity model. The class contains a lowFidelityModel which performs the approximate low fidelity function evaluations and a highFidelityModel which provides truth evaluations for computing corrections to the low fidelity results.


Member Function Documentation

void derived_compute_response ( const ActiveSet set) [protected, virtual]
void derived_asynch_compute_response ( const ActiveSet set) [protected, virtual]
const IntResponseMap & derived_synchronize ( ) [protected, virtual]

portion of synchronize() specific to HierarchSurrModel

Blocking retrieval of asynchronous evaluations from lowFidelityModel, highFidelityModel, or both (mixed case). For the lowFidelityModel portion, apply correction (if active) to each response in the array. derived_synchronize() is designed for the general case where derived_asynch_compute_response() may be inconsistent in its use of low fidelity evaluations, high fidelity evaluations, or both.

Reimplemented from Model.

References SurrogateModel::apply_correction(), SurrogateModel::autoCorrection, SurrogateModel::cachedApproxRespMap, HierarchSurrModel::cachedTruthRespMap, HierarchSurrModel::component_parallel_mode(), SurrogateModel::compute_correction(), SurrogateModel::correctionComputed, HierarchSurrModel::highFidelityModel, HierarchSurrModel::highFidRefResponse, HierarchSurrModel::lowFidelityModel, SurrogateModel::rawCVarsMap, SurrogateModel::response_mapping(), SurrogateModel::surrIdMap, SurrogateModel::surrResponseMap, Model::synchronize(), and SurrogateModel::truthIdMap.

const IntResponseMap & derived_synchronize_nowait ( ) [protected, virtual]
int evaluation_id ( ) const [inline, protected, virtual]

Return the current evaluation id for the HierarchSurrModel.

return the hierarchical model evaluation count. Due to possibly intermittent use of surrogate bypass, this is not the same as either the loFi or hiFi model evaluation counts. It also does not distinguish duplicate evals.

Reimplemented from Model.

References HierarchSurrModel::hierModelEvals.


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