dwavebinarycsp icon indicating copy to clipboard operation
dwavebinarycsp copied to clipboard

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

Open JoelPasvolsky opened this issue 7 years ago • 0 comments

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'),

JoelPasvolsky avatar May 04 '18 20:05 JoelPasvolsky