Inheritance diagram for MergedVariables:

Public Member Functions | |
| MergedVariables () | |
| default constructor | |
| MergedVariables (const ProblemDescDB &problem_db, const pair< short, short > &view) | |
| standard constructor | |
| ~MergedVariables () | |
| destructor | |
| size_t | tv () const |
| Returns total number of vars. | |
| const UIntArray & | merged_discrete_ids () const |
| returns the list of discrete variables merged into a continuous array | |
| const RealVector & | continuous_variables () const |
| return the active continuous variables | |
| void | continuous_variable (const Real &c_var, const size_t &i) |
| set an active continuous variable | |
| void | continuous_variables (const RealVector &c_vars) |
| set the active continuous variables | |
| const StringArray & | continuous_variable_labels () const |
| return the active continuous variable labels | |
| void | continuous_variable_labels (const StringArray &c_v_labels) |
| set the active continuous variable labels | |
| const StringArray & | continuous_variable_types () const |
| return the active continuous variable types | |
| const UIntArray & | continuous_variable_ids () const |
| return the active continuous variable position identifiers | |
| const RealVector & | inactive_continuous_variables () const |
| return the inactive continuous variables | |
| void | inactive_continuous_variables (const RealVector &i_c_vars) |
| set the inactive continuous variables | |
| const StringArray & | inactive_continuous_variable_labels () const |
| return the inactive continuous variable labels | |
| void | inactive_continuous_variable_labels (const StringArray &i_c_v_labels) |
| set the inactive continuous variable labels | |
| const UIntArray & | inactive_continuous_variable_ids () const |
| return the inactive continuous variable position identifiers | |
| size_t | acv () const |
| returns total number of continuous vars | |
| RealVector | all_continuous_variables () const |
| returns a single array with all continuous variables | |
| void | all_continuous_variables (const RealVector &a_c_vars) |
| sets all continuous variables using a single array | |
| StringArray | all_continuous_variable_labels () const |
| returns a single array with all continuous variable labels | |
| void | all_continuous_variable_labels (const StringArray &a_c_v_labels) |
| sets all continuous variable labels using a single array | |
| StringArray | all_variable_labels () const |
| returns a single array with all variable labels | |
| void | read (istream &s) |
| read a variables object from an istream | |
| void | write (ostream &s) const |
| write a variables object to an ostream | |
| void | write_aprepro (ostream &s) const |
| write a variables object to an ostream in aprepro format | |
| void | read_annotated (istream &s) |
| read a variables object in annotated format from an istream | |
| void | write_annotated (ostream &s) const |
| write a variables object in annotated format to an ostream | |
| void | write_tabular (ostream &s) const |
| write a variables object in tabular format to an ostream | |
| void | read (BiStream &s) |
| read a variables object from the binary restart stream | |
| void | write (BoStream &s) const |
| write a variables object to the binary restart stream | |
| void | read (MPIUnpackBuffer &s) |
| read a variables object from a packed MPI buffer | |
| void | write (MPIPackBuffer &s) const |
| write a variables object to a packed MPI buffer | |
Protected Member Functions | |
| void | copy_rep (const Variables *vars_rep) |
| Used by copy() to copy the contents of a letter class. | |
| void | reshape_rep (const Sizet2DArray &vars_comps) |
| Used by reshape() to reshape the contents of a letter class. | |
Private Member Functions | |
| void | build_types_ids () |
| construct VarTypes and VarIds arrays using variablesComponents | |
Private Attributes | |
| RealVector | mergedDesignVars |
| domains (discrete values promoted to continuous) | |
| RealVector | uncertainVars |
| the uncertain variables array (no discrete uncertain to merge) | |
| RealVector | mergedStateVars |
| domains (discrete values promoted to continuous) | |
| StringArray | mergedDesignLabels |
| a label array combining continuous and discrete design labels | |
| StringArray | uncertainLabels |
| the uncertain variables label array (no discrete uncertain to combine) | |
| StringArray | mergedStateLabels |
| a label array combining continuous and discrete state labels | |
| StringArray | continuousVarTypes |
| array of variable types for the active continuous variables | |
| UIntArray | continuousVarIds |
| array of position identifiers for the active continuous variables | |
| UIntArray | inactiveContinuousVarIds |
| array of position identifiers for the inactive continuous variables | |
| UIntArray | mergedDiscreteIds |
| requirement is relaxed by merging them into a continuous array | |
Friends | |
| bool | operator== (const MergedVariables &vars1, const MergedVariables &vars2) |
| equality operator | |
| std::size_t | hash_value (const MergedVariables &vars) |
| hash_value | |
| bool | binary_equal_to (const MergedVariables &vars1, const MergedVariables &vars2) |
| binary_equal_to (since 'operator==' is not suitable for boost/hash_set) | |
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 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 mergedDesignVars, mergedStateVars, mergedDesignLabels, and mergedStateLabels.
UIntArray continuousVarIds [private] |
array of position identifiers for the active continuous variables
These identifiers define positions of the active continuous variables within the total variable sequence.
UIntArray inactiveContinuousVarIds [private] |
array of position identifiers for the inactive continuous variables
These identifiers define positions of the inactive continuous variables within the total variable sequence.
1.5.1