Inheritance diagram for NestedModel:

Public Member Functions | |
| NestedModel (ProblemDescDB &problem_db) | |
| constructor | |
| ~NestedModel () | |
| destructor | |
Protected Member Functions | |
| void | derived_compute_response (const ActiveSet &set) |
| portion of compute_response() specific to NestedModel | |
| void | derived_asynch_compute_response (const ActiveSet &set) |
| portion of asynch_compute_response() specific to NestedModel | |
| Iterator & | subordinate_iterator () |
| return subIterator | |
| void | derived_subordinate_models (ModelList &ml, bool recurse_flag) |
| return subModel | |
| Interface & | interface () |
| return optionalInterface | |
| void | surrogate_bypass (bool bypass_flag) |
| to the subModel for any lower-level surrogates. | |
| void | component_parallel_mode (short mode) |
| optionalInterface and subModel | |
| bool | derived_master_overload () const |
| evaluation (forwarded to optionalInterface) | |
| void | derived_init_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| set up optionalInterface and subModel for parallel operations | |
| void | derived_init_serial () |
| set up optionalInterface and subModel for serial operations. | |
| void | derived_set_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| set active parallel configuration within subModel | |
| void | derived_free_communicators (const int &max_iterator_concurrency, bool recurse_flag=true) |
| (forwarded to optionalInterface and subModel) | |
| void | serve () |
| stop_servers(). | |
| void | stop_servers () |
| optionalInterface when iteration on the NestedModel is complete. | |
| const String & | interface_id () const |
| return the optionalInterface identifier | |
| int | evaluation_id () const |
| Return the current evaluation id for the NestedModel. | |
| void | set_evaluation_reference () |
| (request forwarded to optionalInterface and subModel) | |
| void | fine_grained_evaluation_counters () |
| and subModel | |
| void | print_evaluation_summary (ostream &s, bool minimal_header=false, bool relative_count=true) const |
| (request forwarded to optionalInterface and subModel) | |
Private Member Functions | |
| void | set_mapping (const ActiveSet &mapped_set, ActiveSet &interface_set, bool &opt_interface_map, ActiveSet &sub_iterator_set, bool &sub_iterator_map) |
| total model evaluation requirements (mapped_set) | |
| void | response_mapping (const Response &interface_response, const Response &sub_iterator_response, Response &mapped_response) |
| mappings to create the total response for the model | |
| void | update_sub_model () |
| update subModel with current variable values/bounds/labels | |
Private Attributes | |
| int | nestedModelEvals |
| derived_asynch_compute_response() | |
| Iterator | subIterator |
| the sub-iterator that is executed on every evaluation of this model | |
| Model | subModel |
| the sub-model used in sub-iterator evaluations | |
| size_t | numSubIterFns |
| number of sub-iterator response functions prior to mapping | |
| size_t | numSubIterMappedIneqCon |
| sub-iteration results | |
| size_t | numSubIterMappedEqCon |
| sub-iteration results | |
| Interface | optionalInterface |
| 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 | |
| size_t | numOptInterfPrimary |
| functions) resulting from optional interface evaluations | |
| size_t | numOptInterfIneqCon |
| interface evaluations | |
| size_t | numOptInterfEqCon |
| interface evaluations | |
| SizetArray | primaryACVarMapIndices |
| replace the subModel variable values. | |
| SizetArray | primaryADVarMapIndices |
| insertions replace the subModel variable values. | |
| ShortArray | secondaryACVarMapTargets |
| variables) within all continuous subModel variables. | |
| ShortArray | secondaryADVarMapTargets |
| design/state variables) within all discrete subModel variables. | |
| BoolDeque | extraCVarsData |
| labels, one for each active continuous variable in currentVariables | |
| BoolDeque | extraDVarsData |
| labels, one for each active discrete variable in currentVariables | |
| RealMatrix | primaryRespCoeffs |
| generic response terms. | |
| RealMatrix | secondaryRespCoeffs |
| contributions to the top-level inequality and equality constraints. | |
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.
| void derived_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of compute_response() specific to NestedModel
Update subModel's inactive variables with active variables from currentVariables, compute the optional interface and sub-iterator responses, and map these to the total model response.
Reimplemented from Model.
| void derived_asynch_compute_response | ( | const ActiveSet & | set | ) | [protected, virtual] |
portion of asynch_compute_response() specific to NestedModel
Not currently supported by NestedModels (need to add concurrent iterator support). As a result, derived_synchronize() and derived_synchronize_nowait() are inactive as well).
Reimplemented from Model.
| bool derived_master_overload | ( | ) | const [inline, protected, virtual] |
evaluation (forwarded to optionalInterface)
Derived master overload for subModel is handled separately in subModel.compute_response() within subIterator.run().
Reimplemented from Model.
| void derived_init_communicators | ( | const int & | max_iterator_concurrency, | |
| bool | recurse_flag = true | |||
| ) | [inline, protected, virtual] |
set up optionalInterface and subModel for parallel operations
Asynchronous flags need to be initialized for the subModel. In addition, max_iterator_concurrency is the outer level iterator concurrency, not the subIterator concurrency that subModel will see, and recomputing the message_lengths on the subModel is probably not a bad idea either. Therefore, recompute everything on subModel using init_communicators().
Reimplemented from Model.
| int evaluation_id | ( | ) | const [inline, protected, virtual] |
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.
| void response_mapping | ( | const Response & | opt_interface_response, | |
| const Response & | sub_iterator_response, | |||
| Response & | mapped_response | |||
| ) | [private] |
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
In the UOO case, things are simpler, just compute statistics of each optimization response function: [W] = [I], {f}/{g}/[A] are empty.
the sub-model used in sub-iterator evaluations
There are no restrictions on subModel, so arbitrary nestings are possible. This is commonly used to support surrogate-based optimization under uncertainty by having NestedModels contain SurrogateModels and vice versa.
1.5.1