-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Fix chaining of MILP constraints #14540
Comments
comment:1
|
comment:2
Well, in any script that does not wrap integers with Nathann |
comment:3
Replying to @nathanncohen:
and it's not only |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:10
I'm investigating this. |
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
Commit: |
New commits:
|
New commits:
|
comment:25
It seems to work, except for bizarre behavior if one does try to chain in comparisons between constants.
(The documentation should probably explain what is expected to work and what is not!) I note that the unrelated comparison-hack code for SR silently throws away chained inequalities.
Also, should
Someone should probably review your changes to |
comment:26
Replying to @mkoeppe:
There are theoretical limits to what can work without fundamentally changing Python (or the preparser if you want to go that way), that's why it is called a "hack". I could add a bit of documentation, although a full explanation would probably be too technical. |
comment:27
Replying to @jdemeyer:
It would suffice to explain that you can chain linear expressions with the same comparison, and also use constants at the very left hand side and the very right hand side. If the user tries anything beyond that, there's either an error or weirdness. |
comment:28
Replying to @mkoeppe:
Constants in the middle also work, just not two constants next to eachother. For example, |
comment:29
I know, it was just a suggestion how you could simplify the story when you write that documentation. |
Changed reviewer from Matthias Köppe to Matthias Koeppe |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:33
Looks good to me, but the changes to |
Changed reviewer from Matthias Koeppe to Matthias Koeppe, Travis Scrimshaw |
comment:35
The changes in |
comment:36
Thanks, Travis! |
comment:38
The patchbot complains about decreased coverage, though |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:42
Thanks! |
Changed branch from u/jdemeyer/milp_constraints_do_no_deal_with_python_ints_properly to |
This can never work due to the way Python handles chained comparisons:
Depends on #20478
CC: @vbraun @dimpase @mkoeppe @videlec @tscrim
Component: linear programming
Author: Jeroen Demeyer
Branch/Commit:
96e133e
Reviewer: Matthias Koeppe, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/14540
The text was updated successfully, but these errors were encountered: