Base class for surrogate models (DataFitSurrModel and HierarchSurrModel). More...
Protected Member Functions | |
SurrogateModel (ProblemDescDB &problem_db) | |
constructor | |
SurrogateModel (ParallelLibrary ¶llel_lib, const SharedVariablesData &svd, const ActiveSet &set, short output_level) | |
alternate constructor | |
~SurrogateModel () | |
destructor | |
Model & | subordinate_model () |
return truth_model() | |
short | surrogate_response_mode () |
return responseMode | |
DiscrepancyCorrection & | discrepancy_correction () |
return deltaCorr | |
void | check_submodel_compatibility (const Model &sub_model) |
verify compatibility between SurrogateModel attributes and attributes of the submodel (DataFitSurrModel::actualModel or HierarchSurrModel::highFidelityModel) | |
bool | force_rebuild () |
evaluate whether a rebuild of the approximation should be forced based on changes in the inactive data | |
void | asv_mapping (const ShortArray &orig_asv, ShortArray &actual_asv, ShortArray &approx_asv, bool build_flag) |
distributes the incoming orig_asv among actual_asv and approx_asv | |
void | asv_mapping (const ShortArray &actual_asv, const ShortArray &approx_asv, ShortArray &combined_asv) |
reconstitutes a combined_asv from actual_asv and approx_asv | |
void | response_mapping (const Response &actual_response, const Response &approx_response, Response &combined_response) |
overlays actual_response and approx_response to update combined_response | |
Protected Attributes | |
IntSet | surrogateFnIndices |
for mixed response sets, this array specifies the response function subset that is approximated | |
IntResponseMap | surrResponseMap |
map of surrogate responses used in derived_synchronize() and derived_synchronize_nowait() functions | |
IntRealVectorMap | rawCVarsMap |
map of raw continuous variables used by apply_correction(). Model::varsList cannot be used for this purpose since it does not contain lower level variables sets from finite differencing. | |
IntIntMap | truthIdMap |
map from actualModel/highFidelityModel evaluation ids to DataFitSurrModel/HierarchSurrModel ids | |
IntIntMap | surrIdMap |
map from approxInterface/lowFidelityModel evaluation ids to DataFitSurrModel/HierarchSurrModel ids | |
IntResponseMap | cachedApproxRespMap |
map of approximate responses retrieved in derived_synchronize_nowait() that could not be returned since corresponding truth model response portions were still pending. | |
short | responseMode |
an enumeration that controls the response calculation mode in {DataFit,Hierarch}SurrModel approximate response computations | |
size_t | approxBuilds |
number of calls to build_approximation() | |
RealVector | referenceCLBnds |
stores a reference copy of active continuous lower bounds when the approximation is built; used to detect when a rebuild is required. | |
RealVector | referenceCUBnds |
stores a reference copy of active continuous upper bounds when the approximation is built; used to detect when a rebuild is required. | |
IntVector | referenceDILBnds |
stores a reference copy of active discrete int lower bounds when the approximation is built; used to detect when a rebuild is required. | |
IntVector | referenceDIUBnds |
stores a reference copy of active discrete int upper bounds when the approximation is built; used to detect when a rebuild is required. | |
RealVector | referenceDRLBnds |
stores a reference copy of active discrete real lower bounds when the approximation is built; used to detect when a rebuild is required. | |
RealVector | referenceDRUBnds |
stores a reference copy of active discrete real upper bounds when the approximation is built; used to detect when a rebuild is required. | |
RealVector | referenceICVars |
stores a reference copy of the inactive continuous variables when the approximation is built using a Distinct view; used to detect when a rebuild is required. | |
IntVector | referenceIDIVars |
stores a reference copy of the inactive discrete int variables when the approximation is built using a Distinct view; used to detect when a rebuild is required. | |
RealVector | referenceIDRVars |
stores a reference copy of the inactive discrete real variables when the approximation is built using a Distinct view; used to detect when a rebuild is required. | |
DiscrepancyCorrection | deltaCorr |
manages construction and application of correction functions that are applied to a surrogate model (DataFitSurr or HierarchSurr) in order to reproduce high fidelity data. | |
Private Attributes | |
Variables | truthModelVars |
copy of the truth model variables object used to simplify conversion among differing variable views in force_rebuild() | |
Constraints | truthModelCons |
copy of the truth model constraints object used to simplify conversion among differing variable views in force_rebuild() |
Base class for surrogate models (DataFitSurrModel and HierarchSurrModel).
The SurrogateModel class provides common functions to derived classes for computing and applying corrections to approximations.
bool force_rebuild | ( | ) | [protected, virtual] |
evaluate whether a rebuild of the approximation should be forced based on changes in the inactive data
This function forces a rebuild of the approximation according to the sub-model variables view, the approximation type, and whether the active approximation bounds or inactive variable values have changed since the last approximation build.
Reimplemented from Model.
References Constraints::all_continuous_lower_bounds(), Constraints::all_continuous_upper_bounds(), Variables::all_continuous_variables(), Constraints::all_discrete_int_lower_bounds(), Constraints::all_discrete_int_upper_bounds(), Variables::all_discrete_int_variables(), Constraints::all_discrete_real_lower_bounds(), Constraints::all_discrete_real_upper_bounds(), Variables::all_discrete_real_variables(), String::begins(), Constraints::continuous_lower_bounds(), Model::continuous_lower_bounds(), Constraints::continuous_upper_bounds(), Model::continuous_upper_bounds(), Variables::continuous_variables(), Constraints::copy(), Variables::copy(), Model::current_variables(), Model::currentVariables, Constraints::discrete_int_lower_bounds(), Model::discrete_int_lower_bounds(), Constraints::discrete_int_upper_bounds(), Model::discrete_int_upper_bounds(), Variables::discrete_int_variables(), Constraints::discrete_real_lower_bounds(), Model::discrete_real_lower_bounds(), Constraints::discrete_real_upper_bounds(), Model::discrete_real_upper_bounds(), Variables::discrete_real_variables(), Variables::inactive_continuous_variables(), Variables::inactive_discrete_int_variables(), Variables::inactive_discrete_real_variables(), Constraints::is_null(), Variables::is_null(), Model::is_null(), Model::model_type(), SurrogateModel::referenceCLBnds, SurrogateModel::referenceCUBnds, SurrogateModel::referenceDILBnds, SurrogateModel::referenceDIUBnds, SurrogateModel::referenceDRLBnds, SurrogateModel::referenceDRUBnds, SurrogateModel::referenceICVars, SurrogateModel::referenceIDIVars, SurrogateModel::referenceIDRVars, Model::subordinate_model(), Model::surrogateType, Model::truth_model(), SurrogateModel::truthModelCons, SurrogateModel::truthModelVars, Model::user_defined_constraints(), Model::userDefinedConstraints, and Variables::view().
Referenced by HierarchSurrModel::derived_asynch_compute_response(), DataFitSurrModel::derived_asynch_compute_response(), HierarchSurrModel::derived_compute_response(), and DataFitSurrModel::derived_compute_response().
short responseMode [protected] |
an enumeration that controls the response calculation mode in {DataFit,Hierarch}SurrModel approximate response computations
SurrBasedLocalMinimizer toggles this mode since compute_correction() does not back out old corrections.
Referenced by HierarchSurrModel::derived_asynch_compute_response(), DataFitSurrModel::derived_asynch_compute_response(), HierarchSurrModel::derived_compute_response(), DataFitSurrModel::derived_compute_response(), HierarchSurrModel::derived_synchronize(), DataFitSurrModel::derived_synchronize(), HierarchSurrModel::derived_synchronize_nowait(), DataFitSurrModel::derived_synchronize_nowait(), SurrogateModel::surrogate_response_mode(), HierarchSurrModel::surrogate_response_mode(), and DataFitSurrModel::surrogate_response_mode().
size_t approxBuilds [protected] |
number of calls to build_approximation()
used as a flag to automatically build the approximation if one of the derived compute_response functions is called prior to build_approximation().
Referenced by DataFitSurrModel::append_approximation(), DataFitSurrModel::approximation_coefficients(), HierarchSurrModel::build_approximation(), DataFitSurrModel::build_approximation(), HierarchSurrModel::derived_asynch_compute_response(), DataFitSurrModel::derived_asynch_compute_response(), HierarchSurrModel::derived_compute_response(), DataFitSurrModel::derived_compute_response(), and DataFitSurrModel::update_approximation().