E-TE0504 — Invalid comparison operator for a constraint
Error Type |
|
|---|---|
Phase |
building constraints |
Python exception |
|
Message
Invalid comparison for a constraint: expected one of `<=`, `>=`, or `==`, but got `{...}`
Cause
A constraint uses a comparison operator other than <=, >=, or == — most commonly a strict inequality < or >, or !=.
Fix
Rewrite the constraint using a non-strict inequality or equality:
problem.Constraint("c", x <= 3) # OK
problem.Constraint("c", x < 3) # error: strict inequality