Derived class within the Variables hierarchy which employs the merged data view. More...
Public Member Functions | |
MergedVariables (const ProblemDescDB &problem_db, const std::pair< short, short > &view) | |
standard constructor | |
MergedVariables (const SharedVariablesData &svd) | |
lightweight constructor | |
~MergedVariables () | |
destructor | |
Protected Member Functions | |
void | read (std::istream &s) |
read a variables object from an std::istream | |
void | write (std::ostream &s) const |
write a variables object to an std::ostream | |
void | write_aprepro (std::ostream &s) const |
write a variables object to an std::ostream in aprepro format | |
void | read_tabular (std::istream &s) |
void | write_tabular (std::ostream &s) const |
write a variables object in tabular format to an std::ostream | |
void | reshape (const SizetArray &vc_totals) |
reshapes an existing Variables object based on the incoming variablesComponents | |
void | build_active_views () |
construct active views of all variables arrays | |
void | build_inactive_views () |
construct inactive views of all variables arrays |
Derived class within the Variables hierarchy which employs the merged data view.
Derived variables classes take different views of the design, uncertain, and state variable types and the continuous and discrete domain types. The MergedVariables derived class combines continuous and discrete domain types but separates design, uncertain, and state variable types. The result is a single continuous array of design variables (mergedDesignVars), a single continuous array of uncertain variables (uncertainVars), and a single continuous array of state variables (mergedStateVars). The branch and bound strategy uses this approach (see Variables::get_variables(problem_db)).
MergedVariables | ( | const ProblemDescDB & | problem_db, |
const std::pair< short, short > & | view | ||
) |
standard constructor
In this class, a merged data approach is used in which continuous and discrete arrays are combined into a single continuous array (integrality is relaxed; the converse of truncating reals is not currently supported but could be in the future if needed). Iterators/strategies which use this class include: BranchBndOptimizer. Extract fundamental variable types and labels and merge continuous and discrete domains to create aggregate arrays and views.
References Variables::allContinuousVars, Variables::build_views(), SharedVariablesData::components_totals(), Dakota::copy_data_partial(), ProblemDescDB::get_idv(), ProblemDescDB::get_rdv(), Dakota::merge_data_partial(), Variables::sharedVarsData, SharedVariablesData::vc_lookup(), and SharedVariablesData::view().
void read_tabular | ( | std::istream & | s | ) | [protected, virtual] |
Presumes variables object is appropriately sized to receive data
Reimplemented from Variables.
References Variables::allContinuousVars, SharedVariablesData::components_totals(), Dakota::read_data_partial_tabular(), and Variables::sharedVarsData.