$extrastylesheet
Dakota
Version 6.2
|
Derived model class within the surrogate model branch for managing hierarchical surrogates (models of varying fidelity). More...
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 | |
Model & | surrogate_model () |
return lowFidelityModel | |
Model & | truth_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_response_mode (short mode) |
set responseMode and pass any bypass request on to highFidelityModel for any lower-level surrogate recursions. | |
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 | |
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 lowFidelityModel and highFidelityModel for parallel operations | |
void | derived_init_serial () |
set up lowFidelityModel and highFidelityModel for serial operations. | |
void | derived_set_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
set active parallel configuration within lowFidelityModel and highFidelityModel | |
void | derived_free_communicators (ParLevLIter pl_iter, int max_eval_concurrency, bool recurse_flag=true) |
deallocate communicator partitions for the HierarchSurrModel (request forwarded to lowFidelityModel and highFidelityModel) | |
void | serve_run (ParLevLIter pl_iter, int max_eval_concurrency) |
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) | |
void | eval_tag_prefix (const String &eval_id_str) |
set the hierarchical eval ID tag prefix | |
Private Member Functions | |
void | update_model (Model &model) |
update the incoming model (lowFidelityModel or highFidelityModel) with current variable values/bounds/labels | |
Private Attributes | |
int | hierModelEvalCntr |
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. | |
String | evalTagPrefix |
cached evalTag Prefix from parents to use at compute_response time |
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.
void derived_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of compute_response() specific to HierarchSurrModel
Compute the response synchronously using lowFidelityModel, highFidelityModel, or both (mixed case). For the lowFidelityModel portion, compute the high fidelity response if needed with build_approximation(), and, if correction is active, correct the low fidelity results.
Reimplemented from Model.
References Response::active_set(), DiscrepancyCorrection::apply(), SurrogateModel::approxBuilds, SurrogateModel::asv_mapping(), HierarchSurrModel::build_approximation(), HierarchSurrModel::component_parallel_mode(), DiscrepancyCorrection::compute(), Model::compute_response(), DiscrepancyCorrection::computed(), Response::copy(), Model::current_response(), Model::currentResponse, Model::currentVariables, SurrogateModel::deltaCorr, Model::eval_tag_prefix(), HierarchSurrModel::evalTagPrefix, SurrogateModel::force_rebuild(), Model::hierarchicalTagging, HierarchSurrModel::hierModelEvalCntr, HierarchSurrModel::highFidelityModel, HierarchSurrModel::highFidRefResponse, HierarchSurrModel::lowFidelityModel, Model::outputLevel, ActiveSet::request_vector(), SurrogateModel::response_mapping(), SurrogateModel::responseMode, Response::update(), and HierarchSurrModel::update_model().
void derived_asynch_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of asynch_compute_response() specific to HierarchSurrModel
Compute the response asynchronously using lowFidelityModel, highFidelityModel, or both (mixed case). For the lowFidelityModel portion, compute the high fidelity response with build_approximation() (for correcting the low fidelity results in derived_synchronize() and derived_synchronize_nowait()) if not performed previously.
Reimplemented from Model.
References DiscrepancyCorrection::apply(), SurrogateModel::approxBuilds, SurrogateModel::asv_mapping(), Model::asynch_compute_response(), Model::asynch_flag(), HierarchSurrModel::build_approximation(), SurrogateModel::cachedApproxRespMap, HierarchSurrModel::cachedTruthRespMap, HierarchSurrModel::component_parallel_mode(), DiscrepancyCorrection::compute(), Model::compute_response(), DiscrepancyCorrection::computed(), Response::copy(), Variables::copy(), Model::current_response(), Model::currentVariables, SurrogateModel::deltaCorr, ActiveSet::derivative_vector(), Model::eval_tag_prefix(), HierarchSurrModel::evalTagPrefix, Model::evaluation_id(), SurrogateModel::force_rebuild(), Model::hierarchicalTagging, HierarchSurrModel::hierModelEvalCntr, HierarchSurrModel::highFidelityModel, HierarchSurrModel::highFidRefResponse, HierarchSurrModel::lowFidelityModel, Model::outputLevel, SurrogateModel::rawVarsMap, ActiveSet::request_vector(), SurrogateModel::responseMode, SurrogateModel::surrIdMap, SurrogateModel::truthIdMap, and HierarchSurrModel::update_model().
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 DiscrepancyCorrection::apply(), SurrogateModel::cachedApproxRespMap, HierarchSurrModel::cachedTruthRespMap, HierarchSurrModel::component_parallel_mode(), DiscrepancyCorrection::compute(), DiscrepancyCorrection::computed(), SurrogateModel::deltaCorr, HierarchSurrModel::derived_synchronize_nowait(), HierarchSurrModel::highFidelityModel, HierarchSurrModel::highFidRefResponse, HierarchSurrModel::lowFidelityModel, Model::outputLevel, SurrogateModel::rawVarsMap, SurrogateModel::response_mapping(), SurrogateModel::responseMode, SurrogateModel::surrIdMap, SurrogateModel::surrResponseMap, Model::synchronize(), and SurrogateModel::truthIdMap.
const IntResponseMap & derived_synchronize_nowait | ( | ) | [protected, virtual] |
portion of synchronize_nowait() specific to HierarchSurrModel
Nonblocking retrieval of asynchronous evaluations from lowFidelityModel, highFidelityModel, or both (mixed case). For the lowFidelityModel portion, apply correction (if active) to each response in the map. derived_synchronize_nowait() is designed for the general case where derived_asynch_compute_response() may be inconsistent in its use of actual evals, approx evals, or both.
Reimplemented from Model.
References DiscrepancyCorrection::apply(), SurrogateModel::cachedApproxRespMap, HierarchSurrModel::cachedTruthRespMap, HierarchSurrModel::component_parallel_mode(), DiscrepancyCorrection::compute(), DiscrepancyCorrection::computed(), SurrogateModel::deltaCorr, HierarchSurrModel::highFidelityModel, HierarchSurrModel::highFidRefResponse, HierarchSurrModel::lowFidelityModel, Model::outputLevel, SurrogateModel::rawVarsMap, SurrogateModel::response_mapping(), SurrogateModel::responseMode, SurrogateModel::surrIdMap, SurrogateModel::surrResponseMap, Model::synchronize_nowait(), and SurrogateModel::truthIdMap.
Referenced by HierarchSurrModel::derived_synchronize().
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::hierModelEvalCntr.