-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Add basis status functions get_col_stat, get_row_stat to GLPK backend #18685
Comments
comment:2
I am curious to know how you would use it in Sage, but you will not have any problem exposing them. That's easy Cython. |
Commit: |
New commits:
|
comment:5
Your code needs documentation and doctests. You can mimic what is done on the other functions of the same file, and will find some documentation here: http://doc.sagemath.org/html/en/developer/coding_basics.html#documentation-strings Nathann |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
Doctests have been added; please review |
comment:10
Could you protect against reading out-of-bounds constraints? Right now it crashes Sage. Could you also add a doctest for that? Nathann |
comment:11
I am not sure if this ticket is the right place to introduce bounds checking for these functions. Does this rather need to be handled with sig_on() / sig_off() somehow?
|
comment:12
If you are ready to pay for a Python function call, you may as well avoid segfaults.
Oh. Right. Well, that's because we hardly ever use this function by giving it integers, I'd say. We always give it symbolic LP variable, for which it is not a problem. You can fix both here if you like, but you should at least make the one you introduce check for this.
No, Nathann |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
Looks good! The patchbot complains that there are 'tab' characters in |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
Gooooooood to go! Nathann P.S.: Please fill the "Author" field with your full name |
Reviewer: Nathann Cohen |
Author: Yuan Zhou |
comment:18
Thanks! |
Changed branch from u/yzh/add_basis_status_functions_get_col_stat__get_row_stat_to_glpk_backend to |
Expose the GLPK functions get_col_stat, get_row_stat in Sage's GLPKBackend class.
These functions are essential for any serious linear programming.
For example, if one wants to extract the exact rational basic solution from the dictionary, one needs the information returned by these functions.
CC: @nathanncohen @yuan-zhou
Component: numerical
Keywords: glpk
Author: Yuan Zhou
Branch/Commit:
30eef17
Reviewer: Nathann Cohen
Issue created by migration from https://trac.sagemath.org/ticket/18685
The text was updated successfully, but these errors were encountered: