Inequality
A reference to an equation, inequality, or ranged row. More...
#include <xpress_objects.hpp>

Public Member Functions |
|||
auto | chgCoef (Variable v, double newCoef) -> Inequality & | ||
Change the coefficient for a variable in this row. |
|||
auto | chgCoefs (xpress::SizedArray< Variable const > const &v, xpress::SizedArray< double const > const &newCoef) -> Inequality & | ||
Change the coefficients for multiple variables in this row. |
|||
virtual auto | compareTo (Inequality const &other) const -> int final | ||
auto | getCallbackDual () -> double | ||
Get the dual value value for this row from the solution associated with the current callback. |
|||
auto | getCallbackSlack () -> double | ||
Get the slack value for this row from the solution associated with the current callback. |
|||
auto | getDual () const -> double | ||
Get the current dual value value for this row. |
|||
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 | getLhs () -> xpress::objects::Expression | ||
Get the left-hand side of this inequality. |
|||
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 | getProblem () const -> xpress::objects::XpressProblem *override | ||
Get the problem to which this element belongs.
|
|||
auto | getRhs () -> double | ||
Get the right-hand side for this row. |
|||
auto | getRhsRange () -> double | ||
Get the right-hand side range for this row. |
|||
auto | getSlack () const -> double | ||
Get the current slack value for this row. |
|||
auto | getType () -> xpress::RowType | ||
Get the type for this row. |
|||
auto | getValue (xpress::SizedArray< double const > const &data) const -> double | ||
Get the value of this row from an array. |
|||
auto | setName (std::optional< std::string > newName) -> Inequality & | ||
Set the name of this inequality. |
|||
auto | setRhs (double newRhs) -> Inequality & | ||
Set the right-hand side for this row. |
|||
auto | setRhsRange (double newRange) -> Inequality & | ||
Set the right-hand side range for this row. |
|||
auto | setType (xpress::RowType newType) -> Inequality & | ||
Set the type for this row. |
|||
auto | updateIndex (int delta) -> void override | ||
Public Member Functions inherited from xpress::objects::Index |
Detailed Description
A reference to an equation, inequality, or ranged row.
- Since
- 44.00
Member Function Documentation
chgCoef()
|
inline |
Change the coefficient for a variable in this row.
- Parameters
-
v Variable for which to change the coefficient. newCoef New coefficient.
- Returns
- Always returns this instance.
- Since
- 44.00
chgCoefs()
|
inline |
Change the coefficients for multiple variables in this row.
- Parameters
-
v Variables for which to change the coefficient. newCoef New coefficients.
- Returns
- Always returns this instance.
- Since
- 44.00
compareTo()
|
inlinefinalvirtual |
- Since
- 44.00
getCallbackDual()
|
inline |
Get the dual value value for this row from the solution associated with the current callback.
Note: This function uses xpress::XPRSProblem#getCallbackDuals(bool *, Array<double> const &, int, int) const
under the hood.
Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using xpress::objects::XpressProblem#getCallbackDuals() const
to get the values for all rows and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular row.
- Returns
- Dual value for this row.
- Since
- 44.00
getCallbackSlack()
|
inline |
Get the slack value for this row from the solution associated with the current callback.
Note: This function uses xpress::XPRSProblem#getCallbackSlacks(bool *, Array<double> const &, int, int) const
under the hood.
Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using xpress::objects::XpressProblem#getCallbackSlacks() const
to get the values for all rows and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular row.
- Returns
- Slack for this row.
- Since
- 44.00
getDual()
|
inline |
Get the current dual value value for this row.
Note: This function uses xpress::XPRSProblem#getDuals(int *, Array<double> const &, int, int) const
under the hood. This is only valid to call if the xpress::objects::XpressProblem
instance owning this row is currently not under optimization.
Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using xpress::objects::XpressProblem#getDuals() const
to get the values for all rows and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular row. This strategy is also valid from callbacks.
- Returns
- Dual value for this row.
- 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.
getLhs()
|
inline |
Get the left-hand side of this inequality.
- Returns
- The left-hand side of this inequality.
- 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
- Returns
- Name of this inequality.
- Since
- 44.00
Implements xpress::objects::Index.
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.
getRhs()
|
inline |
Get the right-hand side for this row.
Queries the xpress::objects::XpressProblem
instance to which this row belongs and returns the right-hand side from that instance.
- Returns
- Right-hand side of this inequality.
- Since
- 44.00
getRhsRange()
|
inline |
Get the right-hand side range for this row.
Queries the xpress::objects::XpressProblem
instance to which this row belongs and returns the right-hand side range from that instance.
- Returns
- Right-hand side range of this inequality.
- Since
- 44.00
getSlack()
|
inline |
Get the current slack value for this row.
Note: This function uses xpress::XPRSProblem#getSlacks(int *, Array<double> const &, int, int) const
under the hood. This is only valid to call if the xpress::objects::XpressProblem
instance owning this row is currently not under optimization.
Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using xpress::objects::XpressProblem#getSlacks() const
to get the values for all rows and then use getValue(SizedArray<double const> const &) const
to extract the value for a particular row. This strategy is also valid from callbacks.
- Returns
- Slack for this row.
- Since
- 44.00
getType()
|
inline |
Get the type for this row.
Queries the xpress::objects::XpressProblem
instance to which this row belongs and returns the name obtained from that instance.
- Returns
- Type of this inequality.
- Since
- 44.00
getValue()
|
inline |
Get the value of this row from an array.
The function assumes that data
is an array that stores a value for each row in the underlying problem and returns the value from this array that corresponds to this row. data
arrays can be obtained for example from prob.getSlacks()
or prob.getCallbackSlacks()
.
- Parameters
-
data Array data with data for this inequality.
- Returns
-
The value for this inequality in
data
.
- Since
- 44.00
setName()
|
inline |
Set the name of this inequality.
Sets the name of this inequality in the problem instance that owns the object.
- Parameters
-
newName The name to be set.
- Returns
- Always returns this instance.
- Since
- 44.00
setRhs()
|
inline |
Set the right-hand side for this row.
Set the right-hand side in the xpress::objects::XpressProblem
instance to which this row belongs.
- Parameters
-
newRhs New rhs.
- Returns
- This row
- Since
- 44.00
setRhsRange()
|
inline |
Set the right-hand side range for this row.
Sets the right-hand side range value in the xpress::objects::XpressProblem
instance to which this row belongs.
- Parameters
-
newRange The range value for this row.
- Returns
- This row.
- Since
- 44.00
setType()
|
inline |
Set the type for this row.
Set the type in the xpress::objects::XpressProblem
instance to which this row belongs.
- Parameters
-
newType New type.
- Returns
- This row
- Since
- 44.00
updateIndex()
|
inlineoverridevirtual |
- Since
- 44.00
Implements xpress::objects::Index.
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.