Skip to content

Raise warning if an elimination causes multiple variables to be eliminated #8

Open
@Robbybp

Description

@Robbybp

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:

  1. Raise an error if we detect this happening
  2. Raise a warning if we detect this happening
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions