-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Refactor run_[revised]_simplex_method; add run_dual_[revised]_simplex_method #19097
Comments
Branch: u/mkoeppe/dual_simplex_method |
Commit: |
comment:2
I would very much appreciate more discussion and planning before charging in with changes to the existing code. As I have said before -
and even here the necessity of first show is questionable since all if does is repeating the old output with different colours that convey no new information - it is just visually pleasing to some extent. With revised dictionaries, however, a student CANNOT determine the leaving variable before setting the entering one and either displaying the dictionary (which will have new information allowing picking leaving) or at least asking for ratios. A typical sequence of commands for a single step is then
where the intermediate show may be dropped since it does not add anything but colours. Of course, that's what one does when working "by hand" and for an automated solution one may want to show ONLY that "unnecessary" intermediate dictionary with all the information and colours. So how about:
In 6.9 it is possible to create
which will work both as HTML code (with MathJax drawing only small formulas rather than everything as a single nested array) and as LaTeX code (with automatic pagination since again formulas are as small as actual formulas rather than the current situation). It is not going to display nicely yet in the notebook or cloud but hopefully we can work on it during 6.10 release cycle. I've made necessary adjustments to the notebook: sagemath/sagenb#350 and work is under way to fit rich output system into cloud. How does this sound? I am happy to implement the above for current dictionaries and leave you the dual ones. New commits:
|
comment:3
Thanks for taking a look. Replying to @novoselt:
Agreed that ELLUL is not a good name. But there's value in a routine that does "one pivot + output" as a subroutine of the simplex method with output.
Yes.
Agreed.
This sounds like a good direction.
Sounds good. |
Changed branch from u/mkoeppe/dual_simplex_method to u/novoselt/dual_simplex_method |
Attachment: 19097.pdf.gz |
comment:5
OK, here is my first take (not ready for final review, not sufficiently tested yet, and almost certainly not working well with floats). For testing in SageNB you need my fix to it - I am attaching a printout for a getting some sense of how things look like. Note nice pagination for In SMC and perhaps Jupiter notebook you can try it right away, I guess. The float problem is demonstrated here: https://sage373.math.ualberta.ca/home/pub/21/ where optimality of the auxiliary dictionary is detected because New commits:
|
comment:6
Thanks a lot, we'll take a look. For working with floating point (which is unavoidable for our "backend dictionaries" in #18804), |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:8
OK, let's just drop floating workarounds here. I've made some more changes, but still didn't test it extensively. By the way - which frontend are you working with? Ideally it should not matter, of course. In this version I got rid of "notruncate" in HTML comments (necessary for SageNB) - it is still present as LaTeX comment inside of environments for dictionaries. |
comment:10
After refactoring adding dual method was almost trivial, so I've done it, ran some tests, and fixed a mistake in handling unbounded/infeasible problems in dictionaries. Ready for review apart from the fact that SageNB support is not there yet. |
comment:11
Replying to @mkoeppe:
What value? In what concrete situation? In the code it does not simplify your work much since it is not a problem to do enter-leave-update with a snapshot at necessary places. For interactive work, as I have pointed out, it does not make sense for revised dictionaries, because it is impossible to pick leaving without looking at the extra stuff computed only after picking entering. I am very much tempted to deprecate the current Note also that the new implementation of |
comment:12
Replying to @novoselt:
I retract my comment. I think your current design is very nice. We can work with it for the cutting plane method. 'll rebase our cutting plane work on top of this branch. I agree that deprecating ELLUL would be a good idea, as it is specific to the primal tableau simplex. Perhaps _preupdate_output should accept an argument whether it's in the primal or the dual, to avoid guessing. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
Replying to @mkoeppe:
I thought about it, but for some reason didn't want to. As I can no longer remember the reason, I've changed it to an argument. Deprecated Changed the message for infeasible problems to indicate the problematic constraint/variable, mirroring "unbounded in x5 direction". |
Reviewer: pjxiao |
Changed author from Peijun Xiao to Andrey Novoseltsev |
comment:18
**Do not merge this until SageNB shipped with Sage supports it! ** |
Work Issues: PR350 to SageNB |
Dependencies: #19616 |
Changed work issues from PR350 to SageNB to none |
comment:20
Reviewer name please... |
Changed reviewer from pjxiao to Peijun Xiao |
Changed branch from u/novoselt/dual_simplex_method to |
This patch refactors the
InteractiveLPProblemStandardForm
methodsrun_simplex_method
andrun_revised_simplex_method
by moving the bulk of their implementations to dictionary methods.It also implements the dual simplex method, adding methods
run_dual_simplex_method
to bothInteractiveLPProblemStandardForm
and dictionary classes.Depends on #19616
CC: @novoselt @yuan-zhou @uduse @pgxiao
Component: numerical
Author: Andrey Novoseltsev
Branch/Commit:
586d0fa
Reviewer: Peijun Xiao
Issue created by migration from https://trac.sagemath.org/ticket/19097
The text was updated successfully, but these errors were encountered: