GeneralConstraint
General constraint. More...
#include <xpress_objects.hpp>

Public Member Functions |
|||
virtual auto | compareTo (GeneralConstraint const &other) const -> int final | ||
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 | 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 | getResultant () -> xpress::objects::Variable | ||
Get the resultant for this constraint. |
|||
auto | getType () -> xpress::GenConsType | ||
Get the type for this constraint. |
|||
auto | getValues () -> std::vector< double > | ||
Get the values in this constraint. |
|||
auto | getVariables () -> std::vector< xpress::objects::Variable > | ||
Get the variables in this constraint. |
|||
auto | setName (std::optional< std::string > newName) -> GeneralConstraint & | ||
Set the name of this general constraint. |
|||
auto | updateIndex (int delta) -> void override | ||
Public Member Functions inherited from xpress::objects::Index |
Static Public Member Functions |
|
static auto | Abs (Variable resultant, Variable variable) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = abs(variable) . |
|
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |
static auto | And (Variable resultant, VARIABLES... variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = and(variables...) . |
|
static auto | And (Variable resultant, xpress::SizedArray< Variable const > const &variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = and(variables...) . |
|
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |
static auto | Max (Variable resultant, VARIABLES... variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = max(variables...) . |
|
static auto | Max (Variable resultant, xpress::SizedArray< Variable const > const &variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = max(variables...) . |
|
template<typename... VALUES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<double, VALUES...>::value>::type> | |
static auto | Max (Variable resultant, xpress::SizedArray< Variable const > const &variables, VALUES... values) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = max(variables, values...) . |
|
static auto | Max (Variable resultant, xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &values) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = max(variables, values...) . |
|
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |
static auto | Min (Variable resultant, VARIABLES... variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = min(variables...) . |
|
static auto | Min (Variable resultant, xpress::SizedArray< Variable const > const &variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = min(variables...) . |
|
template<typename... VALUES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<double, VALUES...>::value>::type> | |
static auto | Min (Variable resultant, xpress::SizedArray< Variable const > const &variables, VALUES... values) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = min(variables, values...) . |
|
static auto | Min (Variable resultant, xpress::SizedArray< Variable const > const &variables, xpress::SizedArray< double const > const &values) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = min(variables, values...) . |
|
template<typename... VARIABLES, typename RestrictPack = typename std::enable_if<xpress::AllConvertible<Variable, VARIABLES...>::value>::type> | |
static auto | Or (Variable resultant, VARIABLES... variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = or(variables...) . |
|
static auto | Or (Variable resultant, xpress::SizedArray< Variable const > const &variables) -> xpress::objects::GeneralConstraintDefinition |
Create a definition for resultant = or(variables...) . |
|
Detailed Description
General constraint.
General constraints are unmodifiable.
- Since
- 44.00
Member Function Documentation
Abs()
|
inlinestatic |
Create a definition for resultant = abs(variable)
.
- Parameters
-
resultant The resultant variable. variable The variable to take the absolute value of.
- Returns
-
resultant = abs(variable)
.
- Since
- 44.00
And() [1/2]
|
inlinestatic |
Create a definition for resultant = and(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = and(variables...)
.
- Since
- 44.00
And() [2/2]
|
inlinestatic |
Create a definition for resultant = and(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = and(variables...)
.
- Since
- 44.00
compareTo()
|
inlinefinalvirtual |
- 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.
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.
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.
getResultant()
|
inline |
Get the resultant for this constraint.
Queries the XpressProblem
instance to which this constraint belongs returns the resultant from that instance.
- Returns
- The resultant for this constraint.
- Since
- 44.00
getType()
|
inline |
Get the type for this constraint.
Queries the XpressProblem
instance to which this constraint belongs returns the type from that instance.
- Returns
- The type of this constraint.
- Since
- 44.00
getValues()
|
inline |
Get the values in this constraint.
Queries the XpressProblem
instance to which this constraint belongs returns the values from that instance.
- Returns
-
The value in this constraint. This may be empty but is never
nullptr
.
- Since
- 44.00
getVariables()
|
inline |
Get the variables in this constraint.
Queries the XpressProblem
instance to which this constraint belongs returns the variables from that instance.
- Returns
-
The variables in this constraint. This may be empty but is never
nullptr
.
- Since
- 44.00
Max() [1/4]
|
inlinestatic |
Create a definition for resultant = max(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = max(variables...)
.
- Since
- 44.00
Max() [2/4]
|
inlinestatic |
Create a definition for resultant = max(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = max(variables...)
.
- Since
- 44.00
Max() [3/4]
|
inlinestatic |
Create a definition for resultant = max(variables, values...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables. values Argument values.
- Returns
-
resultant = max(variables, values...)
.
- Since
- 44.00
Max() [4/4]
|
inlinestatic |
Create a definition for resultant = max(variables, values...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables. values Argument values.
- Returns
-
resultant = max(variables, values...)
.
- Since
- 44.00
Min() [1/4]
|
inlinestatic |
Create a definition for resultant = min(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = min(variables...)
.
- Since
- 44.00
Min() [2/4]
|
inlinestatic |
Create a definition for resultant = min(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = min(variables...)
.
- Since
- 44.00
Min() [3/4]
|
inlinestatic |
Create a definition for resultant = min(variables, values...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables. values Argument values.
- Returns
-
resultant = min(variables, values...)
.
- Since
- 44.00
Min() [4/4]
|
inlinestatic |
Create a definition for resultant = min(variables, values...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables. values Argument values.
- Returns
-
resultant = min(variables, values...)
.
- Since
- 44.00
Or() [1/2]
|
inlinestatic |
Create a definition for resultant = or(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = or(variables...)
.
- Since
- 44.00
Or() [2/2]
|
inlinestatic |
Create a definition for resultant = or(variables...)
.
- Parameters
-
resultant Resultant variable. variables Argument variables.
- Returns
-
resultant = or(variables...)
.
- Since
- 44.00
setName()
|
inline |
Set the name of this general constraint.
Sets the name of this general constraint in the problem instance that owns the object.
- Parameters
-
newName New name.
- Returns
- Always returns this constraint.
- 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-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.