Add model.add_at_most_one_constraint()
Open
enhancement
- Dominant language
- Linear Programming
- Stars
- 600
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Sorry if I don't understand SOS correctly but if the result of using an SOS type 1 is at that at most one of the boolean variables are 1 then I think the api should reflect this. So for the sake of clarity I purpose that the api gets updated with a method that is easier to understand for a reader that does not know what an SOS is.
Lets say something like this:
```
class Model
----
def add_at_most_one_constraint(self, boolean_variables: List["mip.Var"]:
self.add_sos([(var,1 )for var in boolean_variables],1)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.