20 #ifndef IPO_VARIABLE_HPP
21 #define IPO_VARIABLE_HPP
65 void setName( std::string
const& name );
70 void setName(
char*
const name );
127 virtual void summary( std::ostream& ostream = std::cout,
128 std::string
const& prefix =
"" )
const override;
Var(ModelBase &model)
Constructor needs a model so that variable can only be attached to one model.
void setValue(double const value)
Set value of variable.
bool operator<(Array const &lhs, Array const &rhs)
Compare two Array objects.
std::shared_ptr< Data > data
The Variable data as a shared pointer.
ModelBase & model
A Model to attach this to.
double lowerBound
The lower bound of the variable.
void setName(std::string const &name)
Set name of variable.
virtual void summary(std::ostream &ostream=std::cout, std::string const &prefix="") const override
Create a summary of this variable.
std::string getName() const
Get name of variable.
Variable & operator=(Variable const &variable)
Copy assignment operator.
Abstract base class for model.
void setLowerBound(double const lowerBound)
Set lower bound of variable.
double value
The value of the variable.
double upperBound
The upper bound of the variable.
double getUpperBound() const
Get upper bound of variable.
Variable(detail::ModelBase &model, char const *const name=nullptr)
Default constructor creates a named variable with the given name, initial value 0 and unbounded...
double getValue() const
Get value of variable.
This class represents a variable.
double getLowerBound() const
Get lower bound of variable.
std::string name
The name of the variable.
Variable(Variable &&variable)
Move constructor.
Struct to contain Variable data.
Abstract base class for Variable and Array;.
void setUpperBound(double const upperBound)
Set upper bound of variable.
bool operator==(Array const &lhs, Array const &rhs)
Compare two Array objects.
This namespace holds all the interior-point optimisation classes.