172 _bounds(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
173 _userSpecifiedBounds( std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
186 _bounds(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
187 _userSpecifiedBounds( std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
200 _bounds(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
201 _userSpecifiedBounds( std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
213 _bounds(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
214 _userSpecifiedBounds( std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN()),
305 std::string typestring;
306 std::string leftPara =
"{";
307 std::string rightPara =
"}";
310 typestring =
"Binary";
313 typestring =
"Continous";
318 typestring =
"Integer";
double get_upper_bound() const
Function for querying the upper variable bound.
Definition: babOptVar.h:255
bool bounds_changed_from_user_input() const
Function for querying whether the bounds have been modified (e.g., by rounding to integer values) com...
Definition: babOptVar.h:295
Definition: babOptVar.h:46
OptimizationVariable(const Bounds &variableBoundsIn, const enums::VT variableType, const unsigned branchingPriority, const std::string nameIn)
Constructor for the case all three optional parameters are used.
Definition: babOptVar.h:72
double get_lower_bound() const
Function for querying the lower variable bound.
Definition: babOptVar.h:250
double get_user_upper_bound() const
Function for querying the upper variable bound as originally specified by the user.
Definition: babOptVar.h:265
OptimizationVariable(const Bounds &variableBoundsIn, const enums::VT variableType, const unsigned branchingPriority)
Constructor for the case only a variable type and a branching priority is specified in addition to th...
Definition: babOptVar.h:86
Bounds _bounds
Definition: babOptVar.h:330
OptimizationVariable(const Bounds &variableBoundsIn, const std::string nameIn)
Constructor for the case only a name is specified in addition to the bounds. The variable is thus ass...
Definition: babOptVar.h:149
Auxiliary struct for representing bounds on an optimization variable.
Definition: babBounds.h:32
friend std::ostream & operator<<(std::ostream &os, const OptimizationVariable &ov)
operator << overloaded for Bounds for easier output
Definition: babOptVar.h:303
bool has_nonempty_host_set() const
Function for querying whether the host set of the variable is non-empty.
Definition: babOptVar.h:290
OptimizationVariable(const enums::VT variableType, const unsigned branchingPriority, const std::string nameIn)
Constructor for the case only a variable type, branching priority and a variable name are specified...
Definition: babOptVar.h:171
OptimizationVariable(const enums::VT variableType, const std::string nameIn)
Constructor for the case only a variable type and a variable name are specified. The variable bounds ...
Definition: babOptVar.h:199
const enums::VT _variableType
Definition: babOptVar.h:332
std::string get_name() const
Function for querying the variable name.
Definition: babOptVar.h:275
namespace holding all essentials of the babBase submodule
Definition: babOptVar.h:44
Class for representing an optimization variable specified by the user.
Definition: babOptVar.h:60
OptimizationVariable()
Default constructor The variable bounds are not defined. This function currently just throws an excep...
Definition: babOptVar.cpp:82
OptimizationVariable(const Bounds &variableBoundsIn)
Minimal constructor requiring only the required information. The variable is thus assumed to be conti...
Definition: babOptVar.h:159
OptimizationVariable(const Bounds &variableBoundsIn, const enums::VT variableType)
Constructor for the case only a variable type is specified in addition to the bounds. The variable is used for branching, and the name is empty.
Definition: babOptVar.h:125
double lower
Definition: babBounds.h:52
unsigned get_branching_priority() const
Function for querying the branching priority.
Definition: babOptVar.h:285
bool _feasible
Definition: babOptVar.h:335
OptimizationVariable(const Bounds &variableBoundsIn, const unsigned branchingPriority, const std::string nameIn)
Constructor for the case only a branching priority and a name is specified in addition to the bounds...
Definition: babOptVar.h:114
double get_user_lower_bound() const
Function for querying the lower variable bound as originally specified by the user.
Definition: babOptVar.h:260
const Bounds _userSpecifiedBounds
Definition: babOptVar.h:331
OptimizationVariable(const enums::VT variableType, const unsigned branchingPriority)
Constructor for the case only a variable type and branching priority are specified. The variable bounds are not defined. This function currently just throws an exception, except in case of a binary variable.
Definition: babOptVar.h:185
double get_mid() const
Function for querying the midpoint of the variable range.
Definition: babOptVar.h:270
double upper
Definition: babBounds.h:53
void _infer_and_set_bounds_or_throw()
Auxiliary function for determining bounds in case the user did not specify any.
Definition: babOptVar.cpp:93
OptimizationVariable(const Bounds &variableBoundsIn, const enums::VT variableType, const std::string nameIn)
Constructor for the case only a variable type and a name is specified in addition to the bounds...
Definition: babOptVar.h:100
enums::VT get_variable_type() const
Function for querying the variable type.
Definition: babOptVar.h:280
VT
Enum for representing the Variable Type of an optimization variable as specified by the user...
Definition: babOptVar.h:43
const std::string _name
Definition: babOptVar.h:334
OptimizationVariable(const Bounds &variableBoundsIn, const unsigned branchingPriority)
Constructor for the case only a branching priority is specified in addition to the bounds...
Definition: babOptVar.h:138
OptimizationVariable(const enums::VT variableType)
Constructor for the case only a variable type is specified. The variable bounds are not defined...
Definition: babOptVar.h:212
void _round_and_check_discrete_bounds()
sanity check of user-given bounds on discrete variables
Definition: babOptVar.cpp:26
const unsigned _branchingPriority
Definition: babOptVar.h:333
Definition: babOptVar.h:45