Skip to content

Better output for infeasibility explainer #3523

Open
@dallan-keylogic

Description

@dallan-keylogic

Summary

When computing an infeasibility explanation, presently the infeasibility explanation refers to model.name. However, the default model name is unknown, which creates some cryptic log messages and exceptions. The utility should check for this default name and substitute in something sensible (or just omit the name).

Rationale

A graduate student approached asking help with the exception Exception: Found model unknown to be feasible! which sounds like garbled English saying that the infeasibility explanation couldn't determine whether or not the model was feasible. When you view the actual code,

raise Exception(f"Found model {model.name} to be feasible!")

it's clear that the provided model was feasible, but it's still confusing. Also, a naked Exception is code smell.

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