Variable
A reference to a variable. More...
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 Strm_variables , is-stream(Strm_variables) > | |||||
| auto | andOf (Strm_variables const &variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
| Create a constraint that requires this variable to be the and of the specified arguments. |
|||||
| template<typename Strm_variables , is-stream(Strm_variables) > | |||||
| auto | andOf (Strm_variables 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. |
|||||
| 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 | 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.Examples using eq:
eq: |
|||||
| virtual auto | eq (Expression const &rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create an "equals" constraint with this expression as left-hand side.Examples using eq:
eq: |
|||||
| 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).Examples using evaluate:
evaluate: |
|||||
| 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 | ||||
| virtual auto | getIndex () const -> int final | ||||
| virtual auto | getIndexForProb (XpressProblem const *xprob) const -> int final | ||||
| auto | getLB () const -> double | ||||
| Get the lower bound for this variable. |
|||||
| virtual auto | getName () const -> std::string final | ||||
Examples using getName: |
|||||
| auto | getObj () const -> double | ||||
| Get objective coefficient for this variable. |
|||||
| auto | getObjN (int objIdx) const -> double | ||||
| Get objective coefficient for this variable. |
|||||
| virtual auto | getProblem () const -> xpress::objects::XpressProblem *final | ||||
| 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.Examples using in:
in: |
|||||
| virtual auto | leq (double rhs) const -> xpress::objects::InequalityDefinition override | ||||
Create a "less than or equal" constraint with this expression as left-hand side.Examples using leq:
leq: |
|||||
| 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.Examples using leq:
leq: |
|||||
| template<typename Strm_variables , typename Strm_values , is-stream(Strm_variables) , is-stream(Strm_values) > | |||||
| auto | maxOf (Strm_variables const &variables, Strm_values const &values) const -> xpress::objects::GeneralConstraintDefinition | ||||
| Create a constraint that requires this variable to be the maximum of the specified arguments. |
|||||
| template<typename Strm_variables , typename Strm_values , is-stream(Strm_variables) , is-stream(Strm_values) > | |||||
| auto | maxOf (Strm_variables const &variables, Strm_values 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... 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. |
|||||
| template<typename Strm_variables , typename Strm_values , is-stream(Strm_variables) , is-stream(Strm_values) > | |||||
| auto | minOf (Strm_variables const &variables, Strm_values const &values) const -> xpress::objects::GeneralConstraintDefinition | ||||
| Create a constraint that requires this variable to be the minimum of the specified arguments. |
|||||
| template<typename Strm_variables , typename Strm_values , is-stream(Strm_variables) , is-stream(Strm_values) > | |||||
| auto | minOf (Strm_variables const &variables, Strm_values 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. |
|||||
| 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 | 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.Examples using mul:
mul: |
|||||
| virtual auto | mul (Expression arg) const -> xpress::objects::Expression override | ||||
Create a expression that represents the product of this and arg.Examples using mul:
mul: |
|||||
| 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 Strm_variables , is-stream(Strm_variables) > | |||||
| auto | orOf (Strm_variables const &variables) const -> xpress::objects::GeneralConstraintDefinition | ||||
| Create a constraint that requires this variable to be the or of the specified arguments. |
|||||
| template<typename Strm_variables , is-stream(Strm_variables) > | |||||
| auto | orOf (Strm_variables 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... 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. |
|||||
| 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 Strm_breakpoints , is-stream(Strm_breakpoints) > | |||||
| auto | pwlOf (Variable input, Strm_breakpoints 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 Strm_breakpoints , is-stream(Strm_breakpoints) > | |||||
| auto | pwlOf (Variable input, Strm_breakpoints 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.
|
|||||
| 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.
Examples using absOf:
- 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.
Examples using andOf:
- Parameters
-
variables Variables in the and constraint.
- Template Parameters
-
Strm_variables 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 arguments.
Examples using andOf:
- Parameters
-
variables Variables in the and constraint. name Constraint name, can be std::nulloptto indicate the constraint has no name.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.
- Returns
-
this = and(variables, value).
- Since
- 44.00
andOf() [3/3]
|
inline |
Create a constraint that requires this variable to be the and of the specified other variables.
Examples using andOf:
- Parameters
-
variables Variables in the and constraint.
- Returns
-
this = and(variables).
- Since
- 44.00
chgCoef()
|
inline |
Change the coefficient for this variable in a row.
Examples using chgCoef:
- 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.
Examples using chgObj:
- 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
thisandarg.
- 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
thisandarg.
- 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.Examples using eq:
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
eq:
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
eq() [2/2]
|
inlineoverridevirtual |
Create an "equals" constraint with this expression as left-hand side.Examples using eq:
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
eq:
- 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).Examples using evaluate:
- Parameters
-
solution Solution values for which the expression is evaluated.
- Returns
-
The value of this expression evaluated at
solution.
- Since
- 44.00
evaluate:
- 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.
Examples using fix:
- 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.
Examples using getCallbackSolution:
- Returns
- Solution value for this variable.
- Since
- 44.00
getHashCode()
|
inlinefinalvirtual |
- Since
- 44.00
getIndex()
|
inlinefinalvirtual |
- Since
- 44.00
getIndexForProb()
|
inlinefinalvirtual |
- Since
- 44.00
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()
|
inlinefinalvirtual |
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()
|
inlinefinalvirtual |
- Returns
-
The problem to which this element belongs. This will be
nullptrif the element was deleted.
- Since
- 44.00
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.
Examples using getSolution:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- tsp.cpp
- 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().
Examples using getValue:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PiecewiseLinear.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- QuadraticProgramming.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- 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.
Examples using ifNotThen:
- 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.
Examples using ifThen:
- 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.Examples using in:
- Parameters
-
lb Lower bound for this expression. ub Upper bound for this expression.
- Returns
- The constraint.
- Since
- 44.00
in:
- 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.Examples using leq:
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
leq:
- 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.Examples using leq:
- Parameters
-
rhs Right-hand side of constraint.
- Returns
- The constraint.
- Since
- 44.00
leq:
- 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.
Examples using maxOf:
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.Strm_values 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 arguments.
Examples using maxOf:
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint. name Constraint name, can be std::nulloptto indicate the constraint has no name.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.Strm_values Something that supports begin()andend()and contains values of typedouble.
- Returns
-
this = max(variables, value).
- Since
- 44.00
maxOf() [3/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified other variables.
Examples using maxOf:
- Parameters
-
variables Variables in the maximum constraint.
- Returns
-
this = max(variables).
- Since
- 44.00
maxOf() [4/4]
|
inline |
Create a constraint that requires this variable to be the maximum of the specified other variables and values.
Examples using maxOf:
- Parameters
-
variables Variables in the maximum constraint. values Values in the maximum constraint.
- 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.
Examples using minOf:
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.Strm_values 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 arguments.
Examples using minOf:
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint. name Constraint name, can be std::nulloptto indicate the constraint has no name.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.Strm_values Something that supports begin()andend()and contains values of typedouble.
- Returns
-
this = min(variables, value).
- Since
- 44.00
minOf() [3/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified other variables.
Examples using minOf:
- Parameters
-
variables Variables in the minimum constraint.
- Returns
-
this = min(variables).
- Since
- 44.00
minOf() [4/4]
|
inline |
Create a constraint that requires this variable to be the minimum of the specified other variables and values.
Examples using minOf:
- Parameters
-
variables Variables in the minimum constraint. values Values in the minimum constraint.
- Returns
-
this = min(variables, value).
- Since
- 44.00
mul() [1/5]
|
inline |
Create a expression that represents the product of this and arg.
Examples using mul:
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [2/5]
|
inlineoverridevirtual |
Create a expression that represents the product of this and arg.Examples using mul:
- Parameters
-
arg Factor.
- Returns
-
Product of
thisandarg.
- Since
- 44.00
mul:
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
mul() [3/5]
|
inlineoverridevirtual |
Create a expression that represents the product of this and arg.Examples using mul:
- Parameters
-
arg Factor.
- Returns
-
Product of
thisandarg.
- Since
- 44.00
mul:
- Since
- 44.00
Reimplemented from xpress::objects::Expression.
mul() [4/5]
|
inline |
Create a expression that represents the product of this and arg.
Examples using mul:
- Parameters
-
arg Factor.
- Returns
- The expression.
- Since
- 44.00
mul() [5/5]
|
inline |
Create a expression that represents the product of this and arg.
Examples using mul:
- 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.
Examples using orOf:
- Parameters
-
variables Variables in the or constraint.
- Template Parameters
-
Strm_variables 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 arguments.
Examples using orOf:
- Parameters
-
variables Variables in the or constraint. name Constraint name, can be std::nulloptto indicate the constraint has no name.
- Template Parameters
-
Strm_variables Something that supports begin()andend()and contains values of typeVariable.
- Returns
-
this = or(variables, value).
- Since
- 44.00
orOf() [3/3]
|
inline |
Create a constraint that requires this variable to be the or of the specified other variables.
Examples using orOf:
- Parameters
-
variables Variables in the or constraint.
- Returns
-
this = or(variables).
- 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.
Examples using pwlOf:
- 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.
Examples using pwlOf:
- Parameters
-
input Input for piecewise linear constraint. breakpoints Breakpoints for constraint.
- Template Parameters
-
Strm_breakpoints 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.
Examples using pwlOf:
- Parameters
-
input Input for piecewise linear constraint. breakpoints Breakpoints for constraint. name Name for constraint, can be std::nullopt.
- Template Parameters
-
Strm_breakpoints 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.
Examples using pwlOf:
- 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.
Examples using pwlOf:
- 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.
Examples using setLB:
- 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.
Examples using setName:
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- GeneralConstraints.cpp
- ProductionPlanning_Index.cpp
- RecursiveFinancialPlanning.cpp
- 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.
Examples using setUB:
- Parameters
-
newUB New upper bound.
- Returns
- This variable
- Since
- 44.00
square()
|
inline |
Create a quadratic term by multiplying this variable with itself.
Examples using square:
- Returns
- The term representing the product of this variable with itself.
- Since
- 44.00
toString()
|
inlineoverridevirtual |
Returns the name from getName().
Examples using toString:
- 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.
The documentation for this class was generated from the following file:
- xpress_objects.hpp
© 2001-2025 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.
