Dakota  Version 6.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
RelaxedVarConstraints Class Reference

Derived class within the Constraints hierarchy which employs relaxation of discrete variables. More...

Inheritance diagram for RelaxedVarConstraints:
Constraints

Public Member Functions

 RelaxedVarConstraints (const SharedVariablesData &svd)
 lightweight constructor
 
 RelaxedVarConstraints (const ProblemDescDB &problem_db, const SharedVariablesData &svd)
 standard constructor More...
 
 ~RelaxedVarConstraints ()
 destructor
 
void write (std::ostream &s) const
 write a variable constraints object to an std::ostream
 
void read (std::istream &s)
 read a variable constraints object from an std::istream
 
- Public Member Functions inherited from Constraints
 Constraints ()
 default constructor More...
 
 Constraints (const ProblemDescDB &prob_db, const SharedVariablesData &svd)
 standard constructor More...
 
 Constraints (const SharedVariablesData &svd)
 alternate constructor for instantiations on the fly More...
 
 Constraints (const Constraints &con)
 copy constructor More...
 
virtual ~Constraints ()
 destructor More...
 
Constraints operator= (const Constraints &con)
 assignment operator More...
 
const RealVector & continuous_lower_bounds () const
 return the active continuous variable lower bounds
 
Real continuous_lower_bound (size_t i) const
 return an active continuous variable lower bound
 
void continuous_lower_bounds (const RealVector &cl_bnds)
 set the active continuous variable lower bounds
 
void continuous_lower_bound (Real cl_bnd, size_t i)
 set an active continuous variable lower bound
 
const RealVector & continuous_upper_bounds () const
 return the active continuous variable upper bounds
 
Real continuous_upper_bound (size_t i) const
 return an active continuous variable upper bound
 
void continuous_upper_bounds (const RealVector &cu_bnds)
 set the active continuous variable upper bounds
 
void continuous_upper_bound (Real cu_bnd, size_t i)
 set an active continuous variable upper bound
 
const IntVector & discrete_int_lower_bounds () const
 return the active discrete variable lower bounds
 
int discrete_int_lower_bound (size_t i) const
 return an active discrete variable lower bound
 
void discrete_int_lower_bounds (const IntVector &dil_bnds)
 set the active discrete variable lower bounds
 
void discrete_int_lower_bound (int dil_bnd, size_t i)
 set an active discrete variable lower bound
 
const IntVector & discrete_int_upper_bounds () const
 return the active discrete variable upper bounds
 
int discrete_int_upper_bound (size_t i) const
 return an active discrete variable upper bound
 
void discrete_int_upper_bounds (const IntVector &diu_bnds)
 set the active discrete variable upper bounds
 
void discrete_int_upper_bound (int diu_bnd, size_t i)
 set an active discrete variable upper bound
 
const RealVector & discrete_real_lower_bounds () const
 return the active discrete variable lower bounds
 
Real discrete_real_lower_bound (size_t i) const
 return an active discrete variable lower bound
 
void discrete_real_lower_bounds (const RealVector &drl_bnds)
 set the active discrete variable lower bounds
 
void discrete_real_lower_bound (Real drl_bnd, size_t i)
 set an active discrete variable lower bound
 
const RealVector & discrete_real_upper_bounds () const
 return the active discrete variable upper bounds
 
Real discrete_real_upper_bound (size_t i) const
 return an active discrete variable upper bound
 
void discrete_real_upper_bounds (const RealVector &dru_bnds)
 set the active discrete variable upper bounds
 
void discrete_real_upper_bound (Real dru_bnd, size_t i)
 set an active discrete variable upper bound
 
const RealVector & inactive_continuous_lower_bounds () const
 return the inactive continuous lower bounds
 
void inactive_continuous_lower_bounds (const RealVector &icl_bnds)
 set the inactive continuous lower bounds
 
const RealVector & inactive_continuous_upper_bounds () const
 return the inactive continuous upper bounds
 
void inactive_continuous_upper_bounds (const RealVector &icu_bnds)
 set the inactive continuous upper bounds
 
const IntVector & inactive_discrete_int_lower_bounds () const
 return the inactive discrete lower bounds
 
void inactive_discrete_int_lower_bounds (const IntVector &idil_bnds)
 set the inactive discrete lower bounds
 
const IntVector & inactive_discrete_int_upper_bounds () const
 return the inactive discrete upper bounds
 
void inactive_discrete_int_upper_bounds (const IntVector &idiu_bnds)
 set the inactive discrete upper bounds
 
const RealVector & inactive_discrete_real_lower_bounds () const
 return the inactive discrete lower bounds
 
void inactive_discrete_real_lower_bounds (const RealVector &idrl_bnds)
 set the inactive discrete lower bounds
 
const RealVector & inactive_discrete_real_upper_bounds () const
 return the inactive discrete upper bounds
 
void inactive_discrete_real_upper_bounds (const RealVector &idru_bnds)
 set the inactive discrete upper bounds
 
const RealVector & all_continuous_lower_bounds () const
 returns a single array with all continuous lower bounds
 
void all_continuous_lower_bounds (const RealVector &acl_bnds)
 sets all continuous lower bounds using a single array
 
void all_continuous_lower_bound (Real acl_bnd, size_t i)
 set a lower bound within the all continuous lower bounds array
 
const RealVector & all_continuous_upper_bounds () const
 returns a single array with all continuous upper bounds
 
void all_continuous_upper_bounds (const RealVector &acu_bnds)
 sets all continuous upper bounds using a single array
 
void all_continuous_upper_bound (Real acu_bnd, size_t i)
 set an upper bound within the all continuous upper bounds array
 
const IntVector & all_discrete_int_lower_bounds () const
 returns a single array with all discrete lower bounds
 
void all_discrete_int_lower_bounds (const IntVector &adil_bnds)
 sets all discrete lower bounds using a single array
 
void all_discrete_int_lower_bound (int adil_bnd, size_t i)
 set a lower bound within the all discrete lower bounds array
 
const IntVector & all_discrete_int_upper_bounds () const
 returns a single array with all discrete upper bounds
 
void all_discrete_int_upper_bounds (const IntVector &adiu_bnds)
 sets all discrete upper bounds using a single array
 
void all_discrete_int_upper_bound (int adiu_bnd, size_t i)
 set an upper bound within the all discrete upper bounds array
 
const RealVector & all_discrete_real_lower_bounds () const
 returns a single array with all discrete lower bounds
 
void all_discrete_real_lower_bounds (const RealVector &adrl_bnds)
 sets all discrete lower bounds using a single array
 
void all_discrete_real_lower_bound (Real adrl_bnd, size_t i)
 set a lower bound within the all discrete lower bounds array
 
const RealVector & all_discrete_real_upper_bounds () const
 returns a single array with all discrete upper bounds
 
void all_discrete_real_upper_bounds (const RealVector &adru_bnds)
 sets all discrete upper bounds using a single array
 
void all_discrete_real_upper_bound (Real adru_bnd, size_t i)
 set an upper bound within the all discrete upper bounds array
 
size_t num_linear_ineq_constraints () const
 return the number of linear inequality constraints
 
size_t num_linear_eq_constraints () const
 return the number of linear equality constraints
 
const RealMatrix & linear_ineq_constraint_coeffs () const
 return the linear inequality constraint coefficients
 
void linear_ineq_constraint_coeffs (const RealMatrix &lin_ineq_coeffs)
 set the linear inequality constraint coefficients
 
const RealVector & linear_ineq_constraint_lower_bounds () const
 return the linear inequality constraint lower bounds
 
void linear_ineq_constraint_lower_bounds (const RealVector &lin_ineq_l_bnds)
 set the linear inequality constraint lower bounds
 
const RealVector & linear_ineq_constraint_upper_bounds () const
 return the linear inequality constraint upper bounds
 
void linear_ineq_constraint_upper_bounds (const RealVector &lin_ineq_u_bnds)
 set the linear inequality constraint upper bounds
 
const RealMatrix & linear_eq_constraint_coeffs () const
 return the linear equality constraint coefficients
 
void linear_eq_constraint_coeffs (const RealMatrix &lin_eq_coeffs)
 set the linear equality constraint coefficients
 
const RealVector & linear_eq_constraint_targets () const
 return the linear equality constraint targets
 
void linear_eq_constraint_targets (const RealVector &lin_eq_targets)
 set the linear equality constraint targets
 
size_t num_nonlinear_ineq_constraints () const
 return the number of nonlinear inequality constraints
 
size_t num_nonlinear_eq_constraints () const
 return the number of nonlinear equality constraints
 
const RealVector & nonlinear_ineq_constraint_lower_bounds () const
 return the nonlinear inequality constraint lower bounds
 
void nonlinear_ineq_constraint_lower_bounds (const RealVector &nln_ineq_l_bnds)
 set the nonlinear inequality constraint lower bounds
 
const RealVector & nonlinear_ineq_constraint_upper_bounds () const
 return the nonlinear inequality constraint upper bounds
 
void nonlinear_ineq_constraint_upper_bounds (const RealVector &nln_ineq_u_bnds)
 set the nonlinear inequality constraint upper bounds
 
const RealVector & nonlinear_eq_constraint_targets () const
 return the nonlinear equality constraint targets
 
void nonlinear_eq_constraint_targets (const RealVector &nln_eq_targets)
 set the nonlinear equality constraint targets
 
Constraints copy () const
 for use when a deep copy is needed (the representation is not shared) More...
 
void shape ()
 shape the lower/upper bound arrays based on sharedVarsData More...
 
void reshape (size_t num_nln_ineq_cons, size_t num_nln_eq_cons, size_t num_lin_ineq_cons, size_t num_lin_eq_cons, const SharedVariablesData &svd)
 reshape the linear/nonlinear/bound constraint arrays arrays and the lower/upper bound arrays
 
void reshape ()
 reshape the lower/upper bound arrays based on sharedVarsData
 
void reshape (size_t num_nln_ineq_cons, size_t num_nln_eq_cons, size_t num_lin_ineq_cons, size_t num_lin_eq_cons)
 reshape the linear/nonlinear constraint arrays More...
 
void inactive_view (short view2)
 sets the inactive view based on higher level (nested) context
 
bool is_null () const
 function to check constraintsRep (does this envelope contain a letter)
 

Additional Inherited Members

- Protected Member Functions inherited from Constraints
 Constraints (BaseConstructor, const ProblemDescDB &problem_db, const SharedVariablesData &svd)
 constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
 Constraints (BaseConstructor, const SharedVariablesData &svd)
 constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
void build_views ()
 construct active/inactive views of all variables arrays
 
void build_active_views ()
 construct active views of all variables bounds arrays
 
void build_inactive_views ()
 construct inactive views of all variables bounds arrays
 
void manage_linear_constraints (const ProblemDescDB &problem_db)
 perform checks on user input, convert linear constraint coefficient input to matrices, and assign defaults More...
 
- Protected Attributes inherited from Constraints
SharedVariablesData sharedVarsData
 configuration data shared from a Variables instance
 
RealVector allContinuousLowerBnds
 a continuous lower bounds array combining continuous design, uncertain, and continuous state variable types (all view).
 
RealVector allContinuousUpperBnds
 a continuous upper bounds array combining continuous design, uncertain, and continuous state variable types (all view).
 
IntVector allDiscreteIntLowerBnds
 a discrete lower bounds array combining discrete design and discrete state variable types (all view).
 
IntVector allDiscreteIntUpperBnds
 a discrete upper bounds array combining discrete design and discrete state variable types (all view).
 
RealVector allDiscreteRealLowerBnds
 a discrete lower bounds array combining discrete design and discrete state variable types (all view).
 
RealVector allDiscreteRealUpperBnds
 a discrete upper bounds array combining discrete design and discrete state variable types (all view).
 
size_t numNonlinearIneqCons
 number of nonlinear inequality constraints
 
size_t numNonlinearEqCons
 number of nonlinear equality constraints
 
RealVector nonlinearIneqConLowerBnds
 nonlinear inequality constraint lower bounds
 
RealVector nonlinearIneqConUpperBnds
 nonlinear inequality constraint upper bounds
 
RealVector nonlinearEqConTargets
 nonlinear equality constraint targets
 
size_t numLinearIneqCons
 number of linear inequality constraints
 
size_t numLinearEqCons
 number of linear equality constraints
 
RealMatrix linearIneqConCoeffs
 linear inequality constraint coefficients
 
RealMatrix linearEqConCoeffs
 linear equality constraint coefficients
 
RealVector linearIneqConLowerBnds
 linear inequality constraint lower bounds
 
RealVector linearIneqConUpperBnds
 linear inequality constraint upper bounds
 
RealVector linearEqConTargets
 linear equality constraint targets
 
RealVector continuousLowerBnds
 the active continuous lower bounds array view
 
RealVector continuousUpperBnds
 the active continuous upper bounds array view
 
IntVector discreteIntLowerBnds
 the active discrete lower bounds array view
 
IntVector discreteIntUpperBnds
 the active discrete upper bounds array view
 
RealVector discreteRealLowerBnds
 the active discrete lower bounds array view
 
RealVector discreteRealUpperBnds
 the active discrete upper bounds array view
 
RealVector inactiveContinuousLowerBnds
 the inactive continuous lower bounds array view
 
RealVector inactiveContinuousUpperBnds
 the inactive continuous upper bounds array view
 
IntVector inactiveDiscreteIntLowerBnds
 the inactive discrete lower bounds array view
 
IntVector inactiveDiscreteIntUpperBnds
 the inactive discrete upper bounds array view
 
RealVector inactiveDiscreteRealLowerBnds
 the inactive discrete lower bounds array view
 
RealVector inactiveDiscreteRealUpperBnds
 the inactive discrete upper bounds array view
 

Detailed Description

Derived class within the Constraints hierarchy which employs relaxation of discrete variables.

Derived variable constraints classes take different views of the design, uncertain, and state variable types and the continuous and discrete domain types. The RelaxedVarConstraints derived class combines continuous and discrete domain types through integer relaxation. The branch and bound method uses this approach (see Variables::get_variables(problem_db) for variables type selection; variables type is passed to the Constraints constructor in Model).

Constructor & Destructor Documentation

RelaxedVarConstraints ( const ProblemDescDB problem_db,
const SharedVariablesData svd 
)

standard constructor

In this class, a relaxed 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 which use this class include: BranchBndOptimizer.

References SharedVariablesData::all_relaxed_discrete_int(), SharedVariablesData::all_relaxed_discrete_real(), Constraints::allContinuousLowerBnds, Constraints::allContinuousUpperBnds, Constraints::allDiscreteIntLowerBnds, Constraints::allDiscreteIntUpperBnds, Constraints::allDiscreteRealLowerBnds, Constraints::allDiscreteRealUpperBnds, Dakota::copy_data_partial(), ProblemDescDB::get_iv(), ProblemDescDB::get_rv(), Constraints::sharedVarsData, and SharedVariablesData::view().


The documentation for this class was generated from the following files: