Initializing help system before first use

Inequality

A reference to an equation, inequality, or ranged row. More...

#include <xpress_objects.hpp>

Inheritance diagram for xpress::objects::Inequality:
xpress::objects::Index

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.
Returns
The index of this object in the underlying model.
Since
44.00

 
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.
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

 
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.
Returns
The name of this object.
Since
44.00

 
auto  getProblem () const -> xpress::objects::XpressProblem *override
  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

 
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()

auto xpress::objects::Inequality::chgCoef ( Variable v,
double newCoef ) -> Inequality&
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()

auto xpress::objects::Inequality::chgCoefs ( xpress::SizedArray< Variable const > const & v,
xpress::SizedArray< double const > const & newCoef ) -> Inequality&
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()

auto xpress::objects::Inequality::compareTo ( Inequality const & other ) const -> int
inlinefinalvirtual

Since
44.00

getCallbackDual()

auto xpress::objects::Inequality::getCallbackDual ( ) -> double
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()

auto xpress::objects::Inequality::getCallbackSlack ( ) -> double
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()

auto xpress::objects::Inequality::getDual ( ) const -> double
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()

auto xpress::objects::Inequality::getHashCode ( ) const -> std::size_t
inlinefinalvirtual
Since
44.00

getIndex()

auto xpress::objects::Inequality::getIndex ( ) const -> int
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()

auto xpress::objects::Inequality::getIndexForProb ( XpressProblem const * xprob ) const -> int
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()

auto xpress::objects::Inequality::getLhs ( ) -> xpress::objects::Expression
inline

Get the left-hand side of this inequality.

Returns
The left-hand side of this inequality.
Since
44.00

getName()

auto xpress::objects::Inequality::getName ( ) const -> std::string
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()

auto xpress::objects::Inequality::getProblem ( ) const -> xpress::objects::XpressProblem *
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()

auto xpress::objects::Inequality::getRhs ( ) -> double
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()

auto xpress::objects::Inequality::getRhsRange ( ) -> double
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()

auto xpress::objects::Inequality::getSlack ( ) const -> double
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()

auto xpress::objects::Inequality::getType ( ) -> xpress::RowType
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()

auto xpress::objects::Inequality::getValue ( xpress::SizedArray< double const > const & data ) const -> double
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()

auto xpress::objects::Inequality::setName ( std::optional< std::string > newName ) -> Inequality&
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()

auto xpress::objects::Inequality::setRhs ( double newRhs ) -> Inequality&
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()

auto xpress::objects::Inequality::setRhsRange ( double newRange ) -> Inequality&
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()

auto xpress::objects::Inequality::setType ( xpress::RowType newType ) -> Inequality&
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()

auto xpress::objects::Inequality::updateIndex ( int delta ) -> void
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.