Description
Consider the subsystem:
x == y
where neither x
nor y
participate elsewhere in the model (including in their bounds). We may use x
to eliminate y
or y
to eliminate x
, but in either case we will (a) remove this constraint and (b) not add any expressions else where in the model. So this elimination effectively eliminates two variables. The elimination is not necessarily incorrect, as it doesn't change the solutions for the other variables. However, it is a slightly confusing situation.
I think it's an open question what we should do here. We could:
- Raise an error if we detect this happening
- Raise a warning if we detect this happening
- Don't perform the elimination if we detect that, effectively, multiple variables will be eliminated. (Is this just as simple as checking
len(igraph.get_adjacent_to(var)) == 0
? I don't think so...)
This will require some thought. I'm not even 100% sure how to detect that this is happening, at this point. Regardless, we can punt for now as it shouldn't cause problems, except that it will leave variables undefined that weren't well-defined in the first place.