dwavesystems / dwavebinarycsp

Map constraint satisfaction problems with binary variables to binary quadratic models.
https://docs.ocean.dwavesys.com/projects/binarycsp/en/latest
Apache License 2.0
20 stars 27 forks source link

Add optional name argument to add_constraint() method in ConstraintSatisfactionProblem() class #21

Open JoelPasvolsky opened 6 years ago

JoelPasvolsky commented 6 years ago

I can do:

csp1.add_constraint(operator.eq, ['a', 'b'])

I want to be able to do:

csp1.add_constraint(operator.eq, ['a', 'b'], name='aNOT_EQUALb')

so I can see:

csp1.constraints [Constraint.from_configurations(frozenset([(0, 0), (1, 1)]), ('a', 'b'), Vartype.BINARY, name='aNOT_EQUALb'),