-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
InteractiveLPBackend: Implement set_verbosity #20433
Comments
comment:1
No it should not and we had this discussion already! Verbosity is more or less for debugging purposes and should be just plain text. The point of And the code should NEVER make any assumptions/adjustments for behaviour in different interfaces, there is the output framework which allows creating new frontends without digging in the whole Sage library and tweaking things. Displaying side effects are quite unpleasant to deal with for frontend maintainers (well, at least for me). |
comment:2
Replying to @novoselt:
Note that this ticket is about the MIP backend, not the InteractiveLP code itself. |
comment:3
Good point, although in that case the output should probably be close to what other methods show and I still would expect only text output. Printing HTMLFragment will show you raw HTML code, I think, which is hardly useful. |
comment:4
Right. I guess I'll wait with this wishlist-item ticket until a need for verbosity arises in some problem where the code doesn't seem to finish... |
comment:5
In that case you actually want things to be printed on every step, not in an assembled form. I would be also curious what can possibly go wrong as long as you stay with exact rings - theory suggests that simplex method will terminate sooner or later ;-) With inexact rings everything can go wrong in this backend and that's more of a feature. |
comment:6
Replying to @novoselt:
Yes.
Well, it could be cycling, unless your code implements a non-cycling pivot rule (I didn't look). It could actually be a nice exercise to implement the lexicographic simplex method by allowing the right-hand-side values to come from an ordered module over the base ring.
Probably the code should signal an error or warning when a problem is set up with an inexact field... |
comment:7
It uses Bland's rule, so no cycles should happen. I don't see a point in warnings (and especially errors) for inexact field, otherwise we should start with warnings about stuff like
In teaching I found it quite natural to use my module with |
comment:8
Replying to @novoselt:
The pivot rule used would probably be worth mentioning in the documentation.
I think there's a difference between basic arithmetic and a packaged algorithm implementation. One usually one would expect that an implementation that accepts floating point numbers has some kind of accommodation for floating point fuzz in the form of some epsilon. But, in any case, just a suggestion. |
InteractiveLPBackend
should somehow display the output fromrun_simplex_method
as a side-effect when the backend's verbosity level is high enough.Can I just
print
theHtmlFragment
output fromrun_simplex_method
? Will this work in all notebook interfaces?CC: @novoselt
Component: numerical
Issue created by migration from https://trac.sagemath.org/ticket/20433
The text was updated successfully, but these errors were encountered: