Sos1Constraint#
- class Sos1Constraint#
A SOS1 (Special Ordered Set type 1) constraint: at most one variable can be non-zero.
This is a structural constraint — no explicit function is stored. Unlike OneHotConstraint, SOS1 allows all variables to be zero.
- __copy__() Sos1Constraint#
- __new__(variables: Sequence[int]) Sos1Constraint#
Create a new SOS1 constraint.
Args:
variables: List of decision variable IDs (at most one can be non-zero)
- __repr__() str#
- property variables: list[int]#
Read-only property.