SOSDefinition
A special ordered set constraint. More...
#include <xpress_objects.hpp>

Public Member Functions |
|
SOSDefinition (xpress::SetType type, xpress::SizedArray< Variable const > const &items, xpress::SizedArray< double const > const &weights, std::optional< std::string > name) | |
Create a SOS constraint. |
|
auto | setName (std::optional< std::string > newName) -> SOSDefinition & |
Set the name of the constraint. |
|
Public Member Functions inherited from xpress::objects::ConstraintDefinition< SOS > | |
virtual auto | getName () const -> std::optional< std::string > |
Get the name of this constraint. |
|
virtual auto | setConstraintName (std::optional< std::string > newName) -> ConstraintDefinition< SOS > &final |
Set the name of this constraint. |
|
Detailed Description
A special ordered set constraint.
Instances of this class describe a constraint that has not yet been added but can be added using XpressProblem.addConstraint()
or XpressProblem.addConstraints()
. Users should usually not have to deal with this class explicitly.
- Since
- 44.00
Constructor & Destructor Documentation
SOSDefinition()
|
inline |
Create a SOS constraint.
- Parameters
-
type Type of constraint. items The elements in this constraint. weights Weights for the elements. This can be nullptr
in which case default weights 1, 2, 3, ... will be used. If notnullptr
it must have the same length asitems
and values must be unique.name Name of the constraint, can be std::nullopt
.
- Since
- 44.00
Member Function Documentation
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.