Inheritance diagram for DataFitSurrModel:

Public Member Functions | |
| DataFitSurrModel (ProblemDescDB &problem_db) | |
| constructor | |
| DataFitSurrModel (Iterator &dace_iterator, Model &actual_model, const pair< short, short > &view, const ActiveSet &set, const String &approx_type, const short &approx_order, const String &corr_type, const short &corr_order, const String &sample_reuse) | |
| alternate constructor for instantiations on the fly | |
| ~DataFitSurrModel () | |
| destructor | |
Protected Member Functions | |
| void | derived_compute_response (const ActiveSet &set) |
| portion of compute_response() specific to DataFitSurrModel | |
| void | derived_asynch_compute_response (const ActiveSet &set) |
| portion of asynch_compute_response() specific to DataFitSurrModel | |
| const ResponseArray & | derived_synchronize () |
| portion of synchronize() specific to DataFitSurrModel | |
| const IntResponseMap & | derived_synchronize_nowait () |
| portion of synchronize_nowait() specific to DataFitSurrModel | |
| Iterator & | subordinate_iterator () |
| return daceIterator | |
| Model & | surrogate_model () |
| return this model instance | |
| Model & | truth_model () |
| return actualModel | |
| void | derived_subordinate_models (ModelList &ml, bool recurse_flag) |
| return actualModel (and optionally its sub-models) | |
| void | update_from_subordinate_model (bool recurse_flag=true) |
| pass request to actualModel if recursing and then update from it | |
| Interface & | interface () |
| return approxInterface | |
| void | surrogate_bypass (bool bypass_flag) |
| any lower-level surrogates. | |
| void | surrogate_function_indices (const IntSet &surr_fn_indices) |
| and ApproximationInterface::approxFnIndices | |
| void | build_approximation () |
| daceIterator/actualModel to generate new data points | |
| bool | build_approximation (const Variables &vars, const Response &response) |
| augment the vars/response anchor point | |
| void | update_approximation (const Variables &vars, const Response &response, bool rebuild_flag) |
| approximation if requested | |
| void | update_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array, bool rebuild_flag) |
| approximation if requested | |
| void | append_approximation (const Variables &vars, const Response &response, bool rebuild_flag) |
| requested (requests forwarded to approxInterface) | |
| void | append_approximation (const VariablesArray &vars_array, const ResponseArray &resp_array, bool rebuild_flag) |
| rebuilds it if requested (requests forwarded to approxInterface) | |
| Array< Approximation > & | approximations () |
| retrieve the set of Approximations from approxInterface | |
| const RealVectorArray & | approximation_coefficients () |
| (request forwarded to approxInterface) | |
| void | approximation_coefficients (const RealVectorArray &approx_coeffs) |
| (request forwarded to approxInterface) | |
| void | print_coefficients (ostream &s, size_t index) const |
| (request forwarded to approxInterface) | |
| const RealVector & | approximation_variances (const RealVector &c_vars) |
| (request forwarded to approxInterface) | |
| const List< SurrogateDataPoint > & | approximation_data (size_t index) |
| (request forwarded to approxInterface) | |
| void | component_parallel_mode (short mode) |
| update component parallel mode for supporting parallelism in actualModel | |
| void | derived_init_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| set up actualModel for parallel operations | |
| void | derived_init_serial () |
| set up actualModel for serial operations. | |
| void | derived_set_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| set active parallel configuration within actualModel | |
| void | derived_free_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| (request forwarded to actualModel) | |
| void | serve () |
| Completes when a termination message is received from stop_servers(). | |
| void | stop_servers () |
| when DataFitSurrModel iteration is complete. | |
| const String & | interface_id () const |
| return the approxInterface identifier | |
| int | evaluation_id () const |
| return the current evaluation id for the DataFitSurrModel | |
| void | set_evaluation_reference () |
| (request forwarded to approxInterface and actualModel) | |
| void | fine_grained_evaluation_counters () |
| and actualModel | |
| void | print_evaluation_summary (ostream &s, bool minimal_header=false, bool relative_count=true) const |
| (request forwarded to approxInterface and actualModel) | |
Private Member Functions | |
| void | update_global () |
| Updates fit arrays for global approximations. | |
| void | update_local_multipoint () |
| Updates fit arrays for local or multipoint approximations. | |
| void | build_global () |
| Builds a global approximation using daceIterator. | |
| void | build_local_multipoint () |
| Builds a local or multipoint approximation using actualModel. | |
| void | update_actual_model () |
| update actualModel with data from current variables/labels/bounds/targets | |
| void | update_from_actual_model () |
| update current variables/labels/bounds/targets with data from actualModel | |
| bool | inside (const RealVector &c_vars, const IntVector &d_vars) |
| [d_l_bnds,d_u_bnds] | |
Private Attributes | |
| int | surrModelEvals |
| derived_asynch_compute_response() | |
| String | sampleReuse |
(default if samples file), or none (default if no samples file) | |
| String | sampleReuseFile |
file name for samples_file specification | |
| VariablesList | reuseFileVars |
array of variables sets read from the samples_file | |
| ResponseList | reuseFileResponses |
array of response sets read from the samples_file | |
| Interface | approxInterface |
| (required for both global and local) | |
| Model | actualModel |
| (optional for global, required for local) | |
| Iterator | daceIterator |
| (optional for global since restart data may also be used) | |
The DataFitSurrModel class manages global or local approximations (surrogates that involve data fits) that are used in place of an expensive model. The class contains an approxInterface (required for both global and local) which manages the approximate function evaluations, an actualModel (optional for global, required for local) which provides truth evaluations for building the surrogate, and a daceIterator (optional for global, not used for local) which selects parameter sets on which to evaluate actualModel in order to generate the necessary data for building global approximations.
| void derived_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of compute_response() specific to DataFitSurrModel
Compute the response synchronously using actualModel, approxInterface, or both (mixed case). For the approxInterface portion, build the approximation if needed, evaluate the approximate response, and apply correction (if active) to the results.
Reimplemented from Model.
| void derived_asynch_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of asynch_compute_response() specific to DataFitSurrModel
Compute the response asynchronously using actualModel, approxInterface, or both (mixed case). For the approxInterface portion, build the approximation if needed and evaluate the approximate response in a quasi-asynchronous approach (ApproximationInterface::map() performs the map synchronously and bookkeeps the results for return in derived_synchronize() below).
Reimplemented from Model.
| const ResponseArray & derived_synchronize | ( | ) | [protected, virtual] |
portion of synchronize() specific to DataFitSurrModel
Blocking retrieval of asynchronous evaluations from actualModel, approxInterface, or both (mixed case). For the approxInterface 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 actual evaluations, approximate evaluations, or both.
Reimplemented from Model.
| const IntResponseMap & derived_synchronize_nowait | ( | ) | [protected, virtual] |
portion of synchronize_nowait() specific to DataFitSurrModel
Nonblocking retrieval of asynchronous evaluations from actualModel, approxInterface, or both (mixed case). For the approxInterface 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.
| void build_approximation | ( | ) | [protected, virtual] |
daceIterator/actualModel to generate new data points
This function constructs a new approximation, discarding any previous data. It constructs any required currentPoints and does not define an anchorPoint.
Reimplemented from Model.
augment the vars/response anchor point
This function constructs a new approximation, discarding any previous data. It uses the passed data to populate the anchorPoint and constructs any required currentPoints.
Reimplemented from Model.
| void update_approximation | ( | const Variables & | vars, | |
| const Response & | response, | |||
| bool | rebuild_flag | |||
| ) | [protected, virtual] |
approximation if requested
This function populates/replaces Approximation::anchorPoint and rebuilds the approximation, if requested. It does not clear other data (i.e., Approximation::currentPoints) and does not update the actualModel with revised bounds, labels, etc. Thus, it updates data from a previous call to build_approximation(), and is not intended to be used in isolation.
Reimplemented from Model.
| void update_approximation | ( | const VariablesArray & | vars_array, | |
| const ResponseArray & | resp_array, | |||
| bool | rebuild_flag | |||
| ) | [protected, virtual] |
approximation if requested
This function populates/replaces Approximation::currentPoints and rebuilds the approximation, if requested. It does not clear other data (i.e., Approximation::anchorPoint) and does not update the actualModel with revised bounds, labels, etc. Thus, it updates data from a previous call to build_approximation(), and is not intended to be used in isolation.
Reimplemented from Model.
| void append_approximation | ( | const Variables & | vars, | |
| const Response & | response, | |||
| bool | rebuild_flag | |||
| ) | [protected, virtual] |
requested (requests forwarded to approxInterface)
This function appends one point to Approximation::currentPoints and rebuilds the approximation, if requested. It does not modify other data (i.e., Approximation::anchorPoint) and does not update the actualModel with revised bounds, labels, etc. Thus, it appends to data from a previous call to build_approximation(), and is not intended to be used in isolation.
Reimplemented from Model.
| void append_approximation | ( | const VariablesArray & | vars_array, | |
| const ResponseArray & | resp_array, | |||
| bool | rebuild_flag | |||
| ) | [protected, virtual] |
rebuilds it if requested (requests forwarded to approxInterface)
This function appends multiple points to Approximation::currentPoints and rebuilds the approximation, if requested. It does not modify other data (i.e., Approximation::anchorPoint) and does not update the actualModel with revised bounds, labels, etc. Thus, it appends to data from a previous call to build_approximation(), and is not intended to be used in isolation.
Reimplemented from Model.
| void derived_init_communicators | ( | const int & | max_iterator_concurrency, | |
| bool | recurse_flag = true | |||
| ) | [inline, protected, virtual] |
set up actualModel for parallel operations
asynchronous flags need to be initialized for the sub-models. In addition, max_iterator_concurrency is the outer level iterator concurrency, not the DACE concurrency that actualModel will see, and recomputing the message_lengths on the sub-model is probably not a bad idea either. Therefore, recompute everything on actualModel using init_communicators.
Reimplemented from Model.
| int evaluation_id | ( | ) | const [inline, protected, virtual] |
return the current evaluation id for the DataFitSurrModel
return the DataFitSurrModel evaluation count. Due to possibly intermittent use of surrogate bypass, this is not the same as either the approxInterface or actualModel model evaluation counts. It also does not distinguish duplicate evals.
Reimplemented from Model.
| void build_global | ( | ) | [private] |
Builds a global approximation using daceIterator.
Determine sample points to use in building the approximation and then evaluate them on actualModel using daceIterator. Any changes to the bounds should be performed by setting them at a higher level (e.g., SurrBasedOptStrategy).
| void build_local_multipoint | ( | ) | [private] |
Builds a local or multipoint approximation using actualModel.
Evaluate the value, gradient, and possibly Hessian needed for a local or multipoint approximation using actualModel.
| void update_actual_model | ( | ) | [private] |
update actualModel with data from current variables/labels/bounds/targets
Update variables and constraints data within actualModel using values and labels from currentVariables and bound/linear/nonlinear constraints from userDefinedConstraints.
| void update_from_actual_model | ( | ) | [private] |
update current variables/labels/bounds/targets with data from actualModel
Update values and labels in currentVariables and bound/linear/nonlinear constraints in userDefinedConstraints from variables and constraints data within actualModel.
Model actualModel [private] |
(optional for global, required for local)
actualModel is unrestricted in type; arbitrary nestings are possible.
1.5.1