Alex Zucca

Results 5 comments of Alex Zucca

I kinda wanted to have them on the embedded problem, but I'll test it first.

If you want to check whether the constraint is hard or soft you can use ``` try: print(cqm1._soft["Soft constraint"]) except KeyError: print("not a soft constraint") ``` and that will show...

we need to add something like this: ``` elif sense is Sense.Ne: # hard-coding violation of not equal constraints to 1 violation = 0 if activity != 0 else 1...

I would also raise a `ValueError` when trying to add a constraint with real values, unless we think they make sense.

Another solution to add the `x != a` constraint is to add an extra binary variable `y` to the model and add the following constraint: `2 x*y - x >...