Skip to content

Fragile try/except logic in MIS #3407

Open
@blnicho

Description

@blnicho

This issue stems from a comment in PR #3403 posted by @jsiirola in #3403 (review)

The MIS implementation uses a bare (catch-all) "except:" clause when guarding against non-zero solver return codes. This could suppress any number of errors and there would be no way to know what was going on. It would be good to revisit this and see if the bare "except:" can be removed.

    try:
        results = solver.solve(modified_model, tee=tee)
    except:
        results = None

Code from this file: https://github.com/bknueven/pyomo/blob/57f5e06d9549b58099f98b35072f35ded3f50419/pyomo/contrib/iis/mis.py#L285-L288

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions