Variable
A reference to a variable. More...
#include <xpress_objects.hpp>

Public Member Functions |
|||||
auto | absOf (Variable x) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the absolute value of x . |
|||||
template<typename Strm0 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type> | |||||
auto | andOf (Strm0 const &variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the and of the specified arguments. |
|||||
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |||||
auto | andOf (VARIABLES... variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the and of the specified other variables. |
|||||
auto | andOf (xpress::SizedArray< Variable const > const &variables, std::optional< std::string > name) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the and of the specified arguments. |
|||||
auto | chgCoef (Inequality r, double newCoef) -> void | ||||
Change the coefficient for this variable in a row. |
|||||
auto | chgCoefs (xpress::SizedArray< Inequality const > const &r, xpress::SizedArray< double const > const &newCoef) -> void | ||||
Change the coefficients for this variable in multiple rows. |
|||||
auto | chgObj (double newCoef) -> Variable & | ||||
Change objective coefficient for this variable. |
|||||
auto | chgObjN (int objidx, double newCoef) -> Variable & | ||||
Change objective coefficient for this variable. |
|||||
virtual auto | compareTo (Variable const &other) const -> int final | ||||
auto | div (ConstantExpression arg) const -> xpress::objects::LinTerm | ||||
Create a expression that represents the quotient of this and arg . |
|||||
virtual auto | div (double arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the quotient of this and arg .
|
|||||
virtual auto | div (xpress::objects::Expression arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the quotient of this and arg .
|
|||||
virtual auto | eq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create an "equals" constraint with this expression as left-hand side.
|
|||||
virtual auto | eq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create an "equals" constraint with this expression as left-hand side.
|
|||||
virtual auto | evaluate (xpress::SizedArray< double const > const &solution) const -> double override | ||||
Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).
|
|||||
auto | fix (double value) -> Variable & | ||||
Fix this variable to a value. |
|||||
virtual auto | geq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "greater than or equal" constraint with this expression as left-hand side.
|
|||||
virtual auto | geq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "greater than or equal" constraint with this expression as left-hand side.
|
|||||
auto | getCallbackRedCost () -> double | ||||
Get reduced cost value for this variable from the solution associated with the current callback. |
|||||
auto | getCallbackSolution () -> double | ||||
Get value for this variable from the solution associated with the current callback. |
|||||
virtual auto | getHashCode () const -> std::size_t final | ||||
auto | getIndex () const -> int override | ||||
Get the index that this object has in the underlying model.Attention: this is a very advanced function. Use it only if you know exactly what you are doing.
|
|||||
auto | getIndexForProb (XpressProblem const *xprob) const -> int override | ||||
Get the index stored in this object but raise an exception if the problem that created this object is not prob .
|
|||||
auto | getLB () const -> double | ||||
Get the lower bound for this variable. |
|||||
auto | getName () const -> std::string override | ||||
Get the name of this object.Queries the problem instance that owns this object and returns the name from that instance.
|
|||||
auto | getObj () const -> double | ||||
Get objective coefficient for this variable. |
|||||
auto | getObjN (int objIdx) const -> double | ||||
Get objective coefficient for this variable. |
|||||
auto | getProblem () const -> xpress::objects::XpressProblem *override | ||||
Get the problem to which this element belongs.
|
|||||
auto | getRedCost () const -> double | ||||
Get the current reduced cost value for this variable. |
|||||
auto | getSolution () const -> double | ||||
Get the current solution value for this variable. |
|||||
auto | getType () const -> xpress::ColumnType | ||||
Get the type for this variable. |
|||||
auto | getUB () const -> double | ||||
Get the upper bound for this variable. |
|||||
auto | getValue (xpress::SizedArray< double const > const &data) const -> double | ||||
Get the value of this variable from an array. |
|||||
auto | ifNotThen (InequalityDefinition implied) const -> xpress::objects::IndicatorDescription | ||||
Create an indicator constraint with this variable as indicator variable. |
|||||
auto | ifThen (InequalityDefinition implied) const -> xpress::objects::IndicatorDescription | ||||
Create an indicator constraint with this variable as indicator variable. |
|||||
virtual auto | in (double lb, double ub) -> xpress::objects::InequalityDefinition override | ||||
Create a range constraint that bounds this expression from below and above.
|
|||||
virtual auto | leq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "less than or equal" constraint with this expression as left-hand side.
|
|||||
virtual auto | leq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "less than or equal" constraint with this expression as left-hand side.
|
|||||
template<typename Strm0 , typename Strm1 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type> | |||||
auto | maxOf (Strm0 const &variables, Strm1 const &values) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the maximum of the specified arguments. |
|||||
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |||||
auto | maxOf (VARIABLES... variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the maximum of the specified other variables. |
|||||
template<typename... VALUES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<double, VALUES...>::value>::type> | |||||
auto | maxOf (xpress::SizedArray< Variable const > const &variables, VALUES... values) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the maximum of the specified other variables and values. |
|||||
auto | maxOf (xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &values, std::optional< std::string > name) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the maximum of the specified arguments. |
|||||
template<typename Strm0 , typename Strm1 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type, typename Strm1IsStream = typename std::enable_if<xpress::is_stream<Strm1>::value>::type> | |||||
auto | minOf (Strm0 const &variables, Strm1 const &values) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the minimum of the specified arguments. |
|||||
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |||||
auto | minOf (VARIABLES... variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the minimum of the specified other variables. |
|||||
template<typename... VALUES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<double, VALUES...>::value>::type> | |||||
auto | minOf (xpress::SizedArray< Variable const > const &variables, VALUES... values) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the minimum of the specified other variables and values. |
|||||
auto | minOf (xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &values, std::optional< std::string > name) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the minimum of the specified arguments. |
|||||
auto | mul (ConstantExpression arg) const -> xpress::objects::LinTerm | ||||
Create a expression that represents the product of this and arg . |
|||||
virtual auto | mul (double arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the product of this and arg .
|
|||||
virtual auto | mul (Expression arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the product of this and arg .
|
|||||
auto | mul (LinTerm arg) const -> xpress::objects::QuadTerm | ||||
Create a expression that represents the product of this and arg . |
|||||
auto | mul (Variable arg) const -> xpress::objects::QuadTerm | ||||
Create a expression that represents the product of this and arg . |
|||||
template<typename Strm0 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type> | |||||
auto | orOf (Strm0 const &variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the or of the specified arguments. |
|||||
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |||||
auto | orOf (VARIABLES... variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the or of the specified other variables. |
|||||
auto | orOf (xpress::SizedArray< Variable const > const &variables, std::optional< std::string > name) const -> xpress::objects::GeneralConstraintDefinition | ||||
Create a constraint that requires this variable to be the or of the specified arguments. |
|||||
template<typename... BREAKPOINTS, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<xpress::PwlBreakpoint, BREAKPOINTS...>::value>::type> | |||||
auto | pwlOf (Variable input, BREAKPOINTS... breakpoints) const -> xpress::objects::PWLDefinition | ||||
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints evaluated for input . |
|||||
template<typename Strm0 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type> | |||||
auto | pwlOf (Variable input, Strm0 const &breakpoints) const -> xpress::objects::PWLDefinition | ||||
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints evaluated for input . |
|||||
template<typename Strm0 , typename Strm0IsStream = typename std::enable_if<xpress::is_stream<Strm0>::value>::type> | |||||
auto | pwlOf (Variable input, Strm0 const &breakpoints, std::optional< std::string > name) const -> xpress::objects::PWLDefinition | ||||
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints evaluated for input . |
|||||
auto | pwlOf (Variable input, xpress::SizedArray< double const > const &xval, xpress::SizedArray< double const > const &yval) const -> xpress::objects::PWLDefinition | ||||
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by xval /yval evaluated for input . |
|||||
auto | pwlOf (Variable input, xpress::SizedArray< double const > const &xval, xpress::SizedArray< double const > const &yval, std::optional< std::string > name) const -> xpress::objects::PWLDefinition | ||||
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by xval /yval evaluated for input . |
|||||
auto | setLB (double newLB) -> Variable & | ||||
Set the lower bound for this variable. |
|||||
auto | setLimit (double newLimit) -> Variable & | ||||
Set the limit for this variable. |
|||||
auto | setName (std::optional< std::string > newName) -> Variable & | ||||
Set the name of this variable. |
|||||
auto | setType (xpress::ColumnType newType) -> Variable & | ||||
Set the type for this variable. |
|||||
auto | setUB (double newUB) -> Variable & | ||||
Set the upper bound for this variable. |
|||||
auto | square () -> xpress::objects::QuadTerm | ||||
Create a quadratic term by multiplying this variable with itself. |
|||||
virtual auto | toString () const -> std::string override | ||||
Returns the name from getName() . |
|||||
virtual auto | uminus () const -> xpress::objects::Expression override | ||||
Create a expression that represents the unary minus of this one.
|
|||||
auto | updateIndex (int delta) -> void override | ||||
Public Member Functions inherited from xpress::objects::Expression | |||||
virtual auto | minus (double arg) const -> xpress::objects::Expression | ||||
Create a expression that represents the difference of this and arg . |
|||||
virtual auto | minus (xpress::objects::Expression arg) const -> xpress::objects::Expression | ||||
Create a expression that represents the difference of this and arg . |
|||||
virtual auto | plus (double arg) const -> xpress::objects::Expression | ||||
Create a expression that represents the sum of this and arg . |
|||||
virtual auto | plus (xpress::objects::Expression arg) const -> xpress::objects::Expression | ||||
Create a expression that represents the sum of this and arg . |
|||||
Public Member Functions inherited from xpress::objects::Index |
Detailed Description
A reference to a variable.
- Since
- 44.00
Member Function Documentation
absOf()
|
inline |
Create a constraint that requires this variable to be the absolute value of x
.
- Parameters
-
x Argument for the absolute value constraint.
- Returns
-
this = abs(x)
.
- Since
- 44.00
andOf() [1/3]
|
inline |
Create a constraint that requires this variable to be the and of the specified arguments.
- Parameters
-
variables Variables in the and constraint.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typeVariable
.
- Returns
-
this = and(variables, value)
.
- Since
- 44.00
andOf() [2/3]
|
inline |
Create a constraint that requires this variable to be the and of the specified other variables.
- Parameters
-
variables Variables in the and constraint.
- Returns
-
this = and(variables)
.
- Since
- 44.00
andOf() [3/3]
|
inline |
Create a constraint that requires this variable to be the and of the specified arguments.
- Parameters
-
variables Variables in the and constraint. name Constraint name, can be std::nullopt
to indicate the constraint has no name.
- Returns
-
this = and(variables, value)
.
- Since
- 44.00
chgCoef()
|
inline |
Change the coefficient for this variable in a row.
- Parameters
-
r Inequality for which to change the coefficient. newCoef New coefficient.
- Since
- 44.00
chgCoefs()
|
inline |
Change the coefficients for this variable in multiple rows.
- Parameters
-
r Inequalities for which to change the coefficient. newCoef New coefficients.
- Since
- 44.00
chgObj()
|
inline |
Change objective coefficient for this variable.
- Parameters
-
newCoef New objective coefficient.
- Returns
- Always returns this instance.
- Since
- 44.00
chgObjN()
|
inline |
Change objective coefficient for this variable.
- Parameters
-
objidx Index of objective function to change. newCoef New objective coefficient.
- Returns
- Always returns this instance.
- Since
- 44.00
compareTo()
|
inlinefinalvirtual |
- Since
- 44.00
div() [1/3]
|
inline |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
- The expression.
- Since
- 44.00
div() [2/3]
|
inlineoverridevirtual |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
-
Quotient of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
div() [3/3]
|
inlineoverridevirtual |
Create a expression that represents the quotient of this
and arg
.
- Parameters
-
arg Divisor.
- Returns
-
Quotient of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
eq() [1/2]
|
inlineoverridevirtual |
Create an "equals" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
eq() [2/2]
|
inlineoverridevirtual |
Create an "equals" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
evaluate()
|
inlineoverridevirtual |
Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).
- Parameters
-
solution Solution values for which the expression is evaluated.
- Returns
-
The value of this expression evaluated at
solution
.
- Since
- 44.00
- Parameters
-
solution Solution values for which the expression is evaluated.
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
fix()
|
inline |
Fix this variable to a value.
Set the lower bound and upper bound in the XpressProblem
instance to which this variable belongs.
- Parameters
-
value New lower and upper bound.
- Returns
- This variable
- Since
- 44.00
geq() [1/2]
|
inlineoverridevirtual |
Create a "greater than or equal" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
geq() [2/2]
|
inlineoverridevirtual |
Create a "greater than or equal" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
getCallbackRedCost()
|
inline |
Get reduced cost value for this variable from the solution associated with the current callback.
Note: This functions uses xpress::XPRSProblem#getCallbackRedCosts(bool *, Array<double> const &, int, int) const
under the hood.
Note: Calling this function for multiple variables is not efficient. If you need to get values for multiple variables then consider using xpress::objects::XpressProblem#getCallbackRedCosts() const
to get the values for all variables and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular variable.
- Returns
- Reduced cost for this variable.
- Since
- 44.00
getCallbackSolution()
|
inline |
Get value for this variable from the solution associated with the current callback.
Note: This functions uses xpress::XPRSProblem#getCallbackSolution(bool *, Array<double> const &, int, int) const
under the hood.
Note: Calling this function for multiple variables is not efficient. If you need to get values for multiple variables then consider using xpress::objects::XpressProblem#getCallbackSolution() const
to get the values for all variables and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular variable.
- Returns
- Solution value for this variable.
- Since
- 44.00
getHashCode()
|
inlinefinalvirtual |
- Since
- 44.00
getIndex()
|
inlineoverridevirtual |
Get the index that this object has in the underlying model.Attention: this is a very advanced function. Use it only if you know exactly what you are doing.
- Returns
- The index of this object in the underlying model.
- Since
- 44.00
- Since
- 44.00
Implements xpress::objects::Index.
getIndexForProb()
|
inlineoverridevirtual |
Get the index stored in this object but raise an exception if the problem that created this object is not prob
.
- Parameters
-
xprob The problem for which the index is queried. If this object does not belong to prob
then an execption is raised.
- Returns
-
The low-level index for this object in
prob
.
- Since
- 44.00
- Since
- 44.00
Implements xpress::objects::Index.
getLB()
|
inline |
Get the lower bound for this variable.
Queries the xpress::objects::XpressProblem
instance to which this variable belongs and returns the lower bound obtained from that instance.
- Since
- 44.00
getName()
|
inlineoverridevirtual |
Get the name of this object.Queries the problem instance that owns this object and returns the name from that instance.
- Returns
- The name of this object.
- Since
- 44.00
- Since
- 44.00
Implements xpress::objects::Index.
getObj()
|
inline |
Get objective coefficient for this variable.
- Returns
- Objective coefficient for this variable.
- Since
- 44.00
getObjN()
|
inline |
Get objective coefficient for this variable.
- Parameters
-
objIdx Index of objective function to query.
- Returns
- Objective coefficient for this variable.
- Since
- 44.00
getProblem()
|
inlineoverridevirtual |
Get the problem to which this element belongs.
- Returns
-
The problem to which this element belongs. This will be
nullptr
if the element was deleted.
- Since
- 44.00
- Returns
-
The problem to which this element belongs. This will be
nullptr
if the element was deleted.
- Since
- 44.00
Implements xpress::objects::Index.
getRedCost()
|
inline |
Get the current reduced cost value for this variable.
Note: This functions uses xpress::XPRSProblem#getRedCosts(int *, Array<double> const &, int, int) const
under the hood. This is only valid to call if the xpress::objects::XpressProblem
instance owning this variable is currently not under optimization.
Note: Calling this function for multiple variables is not efficient. If you need to get values for multiple variables then consider using xpress::objects::XpressProblem#getRedCosts() const
to get the values for all variables and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular variable. This strategy is also valid from callbacks.
- Returns
- Reduced cost for this variable.
- Since
- 44.00
getSolution()
|
inline |
Get the current solution value for this variable.
Note: This functions uses xpress::XPRSProblem#getSolution(int *, Array<double> const &, int, int) const
under the hood. This is only valid to call if the XpressProblem
instance owning this variable is currently not under optimization.
Note: Calling this function for multiple variables is not efficient. If you need to get values for multiple variables then consider using xpress::objects::XpressProblem#getSolution() const
to get the values for all variables and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular variable. This strategy is also valid from callbacks.
- Returns
- Solution value for this variable.
- Since
- 44.00
getType()
|
inline |
Get the type for this variable.
Queries the XpressProblem
instance to which this variable belongs and returns the name obtained from that instance.
- Returns
- Type of this variable.
- Since
- 44.00
getUB()
|
inline |
Get the upper bound for this variable.
Queries the XpressProblem
instance to which this variable belongs and returns the upper bound obtained from that instance.
- Returns
- The upper bound for this variable.
- Since
- 44.00
getValue()
|
inline |
Get the value of this variable from an array.
The function assumes that data
is an array that stores a value for each variable in the underlying problem and returns the value from this array that corresponds to this variable. data
arrays can be obtained for example from prob.getSolution()
or prob.getCallbackSolution()
.
- Parameters
-
data Data for all variables.
- Returns
-
The value for this variable in
data
.
- Since
- 44.00
ifNotThen()
|
inline |
Create an indicator constraint with this variable as indicator variable.
The constraint will enforce implied
if this variable is set to 0.
- Parameters
-
implied The constraint that should be enforced if this variable is 0.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
ifThen()
|
inline |
Create an indicator constraint with this variable as indicator variable.
The constraint will enforce implied
if this variable is set to 1.
- Parameters
-
implied The constraint that should be enforced if this variable is 1.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
in()
|
inlineoverridevirtual |
Create a range constraint that bounds this expression from below and above.
- Parameters
-
lb Lower bound for this expression. ub Upper bound for this expression.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
leq() [1/2]
|
inlineoverridevirtual |
Create a "less than or equal" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
leq() [2/2]
|
inlineoverridevirtual |
Create a "less than or equal" constraint with this expression as left-hand side.
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
maxOf() [1/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified arguments.
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typeVariable
.Strm1 Something that supports begin()
andend()
and contains values of typedouble
.
- Returns
-
this = max(variables, value)
.
- Since
- 44.00
maxOf() [2/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified other variables.
- Parameters
-
variables Variables in the maximum constraint.
- Returns
-
this = max(variables)
.
- Since
- 44.00
maxOf() [3/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified other variables and values.
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint.
- Returns
-
this = max(variables, value)
.
- Since
- 44.00
maxOf() [4/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified arguments.
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint. name Constraint name, can be std::nullopt
to indicate the constraint has no name.
- Returns
-
this = max(variables, value)
.
- Since
- 44.00
minOf() [1/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified arguments.
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typeVariable
.Strm1 Something that supports begin()
andend()
and contains values of typedouble
.
- Returns
-
this = min(variables, value)
.
- Since
- 44.00
minOf() [2/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified other variables.
- Parameters
-
variables Variables in the minimum constraint.
- Returns
-
this = min(variables)
.
- Since
- 44.00
minOf() [3/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified other variables and values.
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint.
- Returns
-
this = min(variables, value)
.
- Since
- 44.00
minOf() [4/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified arguments.
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint. name Constraint name, can be std::nullopt
to indicate the constraint has no name.
- Returns
-
this = min(variables, value)
.
- Since
- 44.00
mul() [1/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [2/5]
|
inlineoverridevirtual |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
-
Product of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
mul() [3/5]
|
inlineoverridevirtual |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
-
Product of
this
andarg
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
mul() [4/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [5/5]
|
inline |
Create a expression that represents the product of this
and arg
.
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
orOf() [1/3]
|
inline |
Create a constraint that requires this variable to be the or of the specified arguments.
- Parameters
-
variables Variables in the or constraint.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typeVariable
.
- Returns
-
this = or(variables, value)
.
- Since
- 44.00
orOf() [2/3]
|
inline |
Create a constraint that requires this variable to be the or of the specified other variables.
- Parameters
-
variables Variables in the or constraint.
- Returns
-
this = or(variables)
.
- Since
- 44.00
orOf() [3/3]
|
inline |
Create a constraint that requires this variable to be the or of the specified arguments.
- Parameters
-
variables Variables in the or constraint. name Constraint name, can be std::nullopt
to indicate the constraint has no name.
- Returns
-
this = or(variables, value)
.
- Since
- 44.00
pwlOf() [1/5]
|
inline |
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints
evaluated for input
.
- Parameters
-
input Input for piecewise linear constraint. breakpoints Breakpoints for constraint.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
pwlOf() [2/5]
|
inline |
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints
evaluated for input
.
- Parameters
-
input Input for piecewise linear constraint. breakpoints Breakpoints for constraint.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typexpress::PwlBreakpoint
.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
pwlOf() [3/5]
|
inline |
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by breakpoints
evaluated for input
.
- Parameters
-
input Input for piecewise linear constraint. breakpoints Breakpoints for constraint. name Name for constraint, can be std::nullopt
.
- Template Parameters
-
Strm0 Something that supports begin()
andend()
and contains values of typexpress::PwlBreakpoint
.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
pwlOf() [4/5]
|
inline |
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by xval
/yval
evaluated for input
.
- Parameters
-
input Input for piecewise linear constraint. xval X coordinates of breakpoints. yval X coordinates of breakpoints.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
pwlOf() [5/5]
|
inline |
Create a piecewise linear constraint that requires this variable to be the value of the piecewise linear function specified by xval
/yval
evaluated for input
.
- Parameters
-
input Input for piecewise linear constraint. xval X coordinates of breakpoints. yval X coordinates of breakpoints. name Name of the constraint, can be std::nullopt
.
- Returns
- Definition for the constraint described by the arguments.
- Since
- 44.00
setLB()
|
inline |
Set the lower bound for this variable.
Set the lower bound in the XpressProblem
instance to which this variable belongs.
- Parameters
-
newLB New lower bound.
- Returns
- This variable
- Since
- 44.00
setLimit()
|
inline |
Set the limit for this variable.
Set the limit in the XpressProblem
instance to which this variable belongs. Note that limits are ignored unless the variable is semi-continuous, semi-integer, or partial integer.
- Parameters
-
newLimit New limit.
- Returns
- This variable
- Since
- 44.00
setName()
|
inline |
Set the name of this variable.
Sets the name of this variable in the problem instance that owns the object.
- Parameters
-
newName The name to be set.
- Returns
- Always returns this instance.
- Since
- 44.00
setType()
|
inline |
Set the type for this variable.
Set the type in the XpressProblem
instance to which this variable belongs.
- Parameters
-
newType New type.
- Returns
- This variable
- Since
- 44.00
setUB()
|
inline |
Set the upper bound for this variable.
Set the upper bound in the XpressProblem
instance to which this variable belongs.
- Parameters
-
newUB New upper bound.
- Returns
- This variable
- Since
- 44.00
square()
|
inline |
Create a quadratic term by multiplying this variable with itself.
- Returns
- The term representing the product of this variable with itself.
- Since
- 44.00
toString()
|
inlineoverridevirtual |
Returns the name from getName()
.
- Returns
- This variable's name.
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
uminus()
|
inlineoverridevirtual |
Create a expression that represents the unary minus of this one.
- Returns
-
Expression representing
-this
.
- Since
- 44.00
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
updateIndex()
|
inlineoverridevirtual |
- Since
- 44.00
Implements xpress::objects::Index.
The documentation for this class was generated from the following file:
- xpress_objects.hpp
© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.