InequalityDefinition
Class representing a <=
, >=
, ==
, or ranged constraint. More...
#include <xpress_objects.hpp>

Public Member Functions |
|
InequalityDefinition (double lhs, xpress::RowType type, xpress::objects::Expression rhs, std::optional< std::string > name) | |
Create a inequality with constant left-hand side. |
|
InequalityDefinition (Expression expr, double lb, double ub, std::optional< std::string > name) | |
Create a inequality that constrains an expression to be within bounds. |
|
InequalityDefinition (xpress::objects::Expression lhs, xpress::RowType type, double rhs, std::optional< std::string > name) | |
Create a inequality with constant right-hand side. |
|
InequalityDefinition (xpress::objects::Expression lhs, xpress::RowType type, xpress::objects::Expression rhs, std::optional< std::string > name) | |
Create a inequality constraint. |
|
auto | getLhs () const -> xpress::objects::Expression |
Left-hand side of the inequality [get]. |
|
auto | getRange () const -> std::vector< double > |
Lower and upper bound for range constraint [get]. |
|
auto | getRhs () const -> xpress::objects::Expression |
Right-hand side of the inequality [get]. |
|
auto | getType () const -> xpress::RowType |
Sense of the inequality [get]. |
|
auto | setName (std::optional< std::string > newName) -> InequalityDefinition & |
Set the name of the constraint. |
|
Public Member Functions inherited from xpress::objects::ConstraintDefinition< Inequality > | |
virtual auto | getName () const -> std::optional< std::string > |
Get the name of this constraint. |
|
virtual auto | setConstraintName (std::optional< std::string > newName) -> ConstraintDefinition< Inequality > &final |
Set the name of this constraint. |
|
Detailed Description
Class representing a <=
, >=
, ==
, or ranged constraint.
Instances of this class describe a constraint that has not yet been added but can be added using XpressProblem.addConstraint()
or XpressProblem.addConstraint()
. Users should usually not have to deal with this class explicitly.
- Since
- 44.00
Constructor & Destructor Documentation
InequalityDefinition() [1/4]
|
inline |
Create a inequality constraint.
- Parameters
-
lhs Left-hand side of constraint. type Sense of constraint. rhs Right-hand side of constraint. name Name of constraint. Can be std::nullopt
.
- Since
- 44.00
InequalityDefinition() [2/4]
|
inline |
Create a inequality with constant right-hand side.
- Parameters
-
lhs Left-hand side of constraint. type Sense of constraint. rhs Right-hand side of constraint. name Name of constraint. Can be std::nullopt
.
- Since
- 44.00
InequalityDefinition() [3/4]
|
inline |
Create a inequality with constant left-hand side.
- Parameters
-
lhs Left-hand side of constraint. type Sense of constraint. rhs Right-hand side of constraint. name Name of constraint. Can be std::nullopt
.
- Since
- 44.00
InequalityDefinition() [4/4]
|
inline |
Create a inequality that constrains an expression to be within bounds.
- Parameters
-
expr The constraint expression. lb Lower bound. ub Upper bound. name Name of constraint. Can be std::nullopt
.
- Since
- 44.00
Member Function Documentation
getLhs()
|
inline |
Left-hand side of the inequality [get].
- Since
- 44.00
getRange()
|
inline |
Lower and upper bound for range constraint [get].
This is nullptr
unless the instance represents a range constraint.
- Since
- 44.00
getRhs()
|
inline |
Right-hand side of the inequality [get].
This is nullptr
if
the instance represents a range constraint.
- Since
- 44.00
getType()
|
inline |
Sense of the inequality [get].
- Since
- 44.00
setName()
|
inline |
Set the name of the constraint.
This is the same as ConstraintDefinition#setConstraintName(std::optional<std::string>)
but with a different return type.
- Parameters
-
newName New name.
- Returns
- Always returns this instance.
- Since
- 44.00
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.