-
-
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
Deprecate MixedIntegerLinearProgram.gen(), __call__, linear_function, which do not do anything useful; add default_variable method #20602
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Author: Matthias Koeppe |
Commit: |
comment:5
If the old methods were indeed always broken and could not be used for anything useful, I say - just delete (or fix) them instead of deprecating... |
comment:6
It's possible that there's some user code around that uses these methods as part of a workaround for the many bugs that had to be fixed in |
comment:7
doc does not build + failing doctests, see patchbot report
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Still 2 failing doctests |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:11
I've changed the doctests to no longer use the deprecated methods. |
comment:12
ready for review. |
comment:13
patchbots report nonsense; errors in a line that does not exist in the file |
comment:14
Replying to @dimpase:
The patchbot report was for 7.3.b6, and there was a real issue with guava, which has since |
comment:15
patchbot is green (the 4 failures are not related to this ticket) |
comment:16
OK, looks good. |
Reviewer: Dima Pasechnik |
comment:18
Replying to @mkoeppe: oh, right... |
Changed branch from u/mkoeppe/mixedintegerlinearprogram_gen___does_not_do_anything_useful to |
As observed in the comments in #20461:
To summarize, the
gen
method pretends that it can refer to backend variables (and so dolinear_function
and the special__call__
method that is identical tolinear_function
). In reality, these methods cannot be use for anything except for what is tested in the docstring: printing some meaningless stuff.This patch deprecates these three methods and removes the corresponding confusing and useless examples from the class documentation.
In return, the notion of the "default MIP variable" (which
__getitem__
refers to) is explained; and it is exposed to the user by new methoddefault_variable
.CC: @nbruin @dimpase @videlec @jdemeyer @fchapoton @novoselt
Component: numerical
Author: Matthias Koeppe
Branch/Commit:
684e91c
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/20602
The text was updated successfully, but these errors were encountered: