jump-dev / JuMP.jl

Modeling language for Mathematical Optimization (linear, mixed-integer, conic, semidefinite, nonlinear)
http://jump.dev/JuMP.jl/
Other
2.17k stars 390 forks source link

Fix printing when show called on invalid variable or constraint #3763

Closed odow closed 1 month ago

odow commented 1 month ago

Closes https://github.com/jump-dev/JuMP.jl/issues/3762

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.38%. Comparing base (99ab0b2) to head (78018cc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3763 +/- ## ======================================= Coverage 98.38% 98.38% ======================================= Files 44 44 Lines 5873 5879 +6 ======================================= + Hits 5778 5784 +6 Misses 95 95 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

odow commented 1 month ago

So you're okay with just printing "InvalidXXX"?

blegat commented 1 month ago

Yes, the variable is invalid so using it in a model should throw but we could allow printing it and InvalidXXX seems reasonable.