-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the LP sensitivity report print function for solution_summary
#2794
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2794 +/- ##
==========================================
+ Coverage 94.26% 94.36% +0.10%
==========================================
Files 43 43
Lines 5524 5576 +52
==========================================
+ Hits 5207 5262 +55
+ Misses 317 314 -3
Continue to review full report at Codecov.
|
Have you ever used Excel? The reason for a table is that Excel has a sensitivity report function that is often used to teach students in a LP-101 class. I expect this functionality to be used very rarely in JuMP outside the classroom, so we should put it in a separate function and reproduce exactly what teachers expect: https://www.solver.com/how-correctly-interpret-sensitivity-reports-premium-solver It's also going to be slow, so we don't want to run this for large LPs, and it won't work for any other type of problem, which are other reasons for putting this in a separate function. |
Unfortunately, I have not used Excel sensitivity report.
OK. Do you mean a separate function means a separate print function? |
We already have JuMP.jl/src/lp_sensitivity2.jl Lines 9 to 63 in 744888c
So perhaps we should implement Base.show(io::IO, report::SensitivityReport) or Base.print(io::IO, report::SenstivityReport) I'm not sure whether we should print it to the screen, or print it as a CSV for people to open in Excel. I've used this before: https://github.com/ronisbr/PrettyTables.jl. Not sure if we want it as a JuMP dependency though. |
end | ||
|
||
""" | ||
solution_summary(model::Model; verbose::Bool = false) | ||
solution_summary(model::Model; verbose::Bool = false, sensitivity = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solution_summary(model::Model; verbose::Bool = false, sensitivity = false) | |
solution_summary(model::Model; verbose::Bool = false, lp_sensitivity = false) |
since its only for LP
I'm going to close this as stale. @AtsushiSakai thanks for taking a stab. It's always useful to see different design ideas, even if they don't end up being integrated. We're still interested in something like this, but it should be a separate print-out using the SensitivityReport, and be in the form of a table, not part of |
Ah, @AtsushiSakai I see you were following my suggestion in #2662. I guess that was bad advice. Apologies. 😄 |
I'm sorry I left this PR. It is OK to close this PR. I will try this again when I have time. |
I added the LP sensitivity report print function for
solution_summary
to fix #2662.Currently, just a printing function is added, not using Table.jl interfaces.
This is a print example:
I'm not sure how to get
slack or surplus value
for each constraint.If someone can advise me how to do it, I'd like to add it.