Open alessandrozocca opened 10 months ago
Thanks for the report @alessandrozocca, you are correct that that XOR is a typo and should be an OR. We enforce an XOR over the two indicator variables, but not over the algebraic expressions themselves. Most precisely, that Pyomo model reads as: $Y_1 \implies (x = 0)$ $Y_2 \implies (y = 0)$ $Y_1 \veebar Y_2$
The documentation of the GDP extension says
This suggests that if the indicator variable $Y_i$ is false the constraints in the corresponding disjunction are simply ignored. In particular, all the logical operators seem to be applied only to the indicator variables $Y_i$. That seems to be true until the provided additional examples where a direct xor between disjunctions is presented
$[x = 0] \veebar [y = 0]$
A minimal Pyomo model below shows that the xor between disjunctions does not hold, as both $x$ and $y$ have a final value of $0$.
I believe that this part of Pyomo's documentation is incorrect and might lead users to an incorrect interpretation of the provided functionality.
Pyomo version: 6.6.2 Python version: 3.11 Operating system: macOS 13 How Pyomo was installed: poetry Solver: CBC, but other solvers result in the same mistake