Very often we need constraints such as
model = Model()
x = model.binary((5, 5))
model.add_constraint((x.sum(axis=0) == 1).all())
which specifies that each column can have exactly one 1 in it.
It would be nice to be able to make such constraints implicit. Maybe an API like
x = model.binary((5, 5), subject_to=(axis, operator, rhs))
so the above example would be
x = model.binary((5, 5), subject_to=(0, '==', 1))
This would also allow us to deprecate the DisjointBitSets and DisjointBitSet symbols.
Very often we need constraints such as
which specifies that each column can have exactly one
1in it.It would be nice to be able to make such constraints implicit. Maybe an API like
so the above example would be
This would also allow us to deprecate the
DisjointBitSetsandDisjointBitSetsymbols.