Opened 11 years ago
Closed 11 years ago
#7311 closed defect (fixed)
Improve the add_constraint method from MixedIntegerLinearProgram
Reported by: | ncohen | Owned by: | jkantor |
---|---|---|---|
Priority: | critical | Milestone: | sage-4.4 |
Component: | numerical | Keywords: | |
Cc: | abmasse | Merged in: | sage-4.4.alpha0 |
Authors: | Nathann Cohen | Reviewers: | Alexandre Blondin Massé |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The min and max arguments should accept variables too, and not just real values or None. This is now possible, along with more complex expressions inside of add_constraint and without even using min/max ( which are still the most efficient way to define constraints )
Also fixes an important bug (copy was used instead of deepcopy, which produced wrong results)
Attachments (2)
Change History (29)
comment:1 Changed 11 years ago by
- Summary changed from Change min/max arguments to Change min/max arguments of MixedIntegerLinearProgram
comment:2 Changed 11 years ago by
- Description modified (diff)
- Report Upstream set to N/A
comment:3 Changed 11 years ago by
- Description modified (diff)
- Status changed from new to needs_review
- Summary changed from Change min/max arguments of MixedIntegerLinearProgram to Improve the add_constraint method from MixedIntegerLinearProgram
comment:4 Changed 11 years ago by
- Description modified (diff)
comment:5 Changed 11 years ago by
comment:6 Changed 11 years ago by
- Priority changed from minor to critical
comment:7 Changed 11 years ago by
- Cc abmasse added
comment:8 Changed 11 years ago by
I started looking at your patch. I think it shouldn't be too hard to review. All tests pass !
However, I have one question: is there a reason why you implement all operators <, >, >=, etc. ? You could only implement __richcmp__
and would do the same job with only one function.
Another strange thing is that the tests pass only when I install GLPK. With CBC, nothing works. Is that normal ?
comment:9 Changed 11 years ago by
Hello !!!!
I remember having tried the two This patch has had many different versions At some point some of these classes were "cdef class", then got back to usual python... I remember having noticed at some point that if I were to define < > == ... using richcmp instead of the usual python operators, other low-level comparators would be used by default instead of mine. Well, I had many troubles with this class, so perhaps I should give it a try again now that it works again :-)
It is not normal at all that nothing works with CBC :-/ Could you tell me which kind of errors you get ?
Thank youuuuuuuuu !!
Nathann
comment:10 Changed 11 years ago by
Here is what I did:
- I tested all sage with
sage -testall
and all tests passed.
- I tried
sage -t -optional
on the folder sage/numerical. Of course, some tests didn't pass.
- I installed CBC. All tests passed with
sage -t *
in the sage/numerical folder, but when I typesage -t -optional *
, I get the following:
[~/Applications/sage/devel/sage-linear/sage/numerical]$ sage -t -optional * sage -t -optional "devel/sage-linear/sage/numerical/__init__.py" [0.2 s] sage -t -optional "devel/sage-linear/sage/numerical/all.py" [0.1 s] sage -t -optional "devel/sage-linear/sage/numerical/knapsack.py" [13.8 s] sage -t -optional "devel/sage-linear/sage/numerical/mip.pyx" ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip.pyx", line 444: sage: p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_12[6]>", line 1, in <module> p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK###line 444: sage: p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK File "mip.pyx", line 453, in sage.numerical.mip.MixedIntegerLinearProgram.write_mps (sage/numerical/mip.c:4108) raise NotImplementedError("You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk') ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip.pyx", line 476: sage: p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_13[6]>", line 1, in <module> p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK###line 476: sage: p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK File "mip.pyx", line 484, in sage.numerical.mip.MixedIntegerLinearProgram.write_lp (sage/numerical/mip.c:4329) raise NotImplementedError("You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk') ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip.pyx", line 978: sage: p.solve(solver='GLPK', objective_only=True) # optional - requires GLPK Expected: Traceback (most recent call last): ... RuntimeError Got: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_23[21]>", line 1, in <module> p.solve(solver='GLPK', objective_only=True) # optional - requires GLPK###line 978: sage: p.solve(solver='GLPK', objective_only=True) # optional - requires GLPK File "mip.pyx", line 1004, in sage.numerical.mip.MixedIntegerLinearProgram.solve (sage/numerical/mip.c:7627) raise NotImplementedError("GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk') ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip.pyx", line 1175: sage: p.solve(solver="GLPK") # optional - requires GLPK Expected: Traceback (most recent call last): ... MIPSolverException: 'GLPK : Solution is undefined' Got: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_30[9]>", line 1, in <module> p.solve(solver="GLPK") # optional - requires GLPK###line 1175: sage: p.solve(solver="GLPK") # optional - requires GLPK File "mip.pyx", line 1004, in sage.numerical.mip.MixedIntegerLinearProgram.solve (sage/numerical/mip.c:7627) raise NotImplementedError("GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk') ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip.pyx", line 1191: sage: p.solve(solver="GLPK") # optional - requires GLPK Expected: Traceback (most recent call last): ... MIPSolverException: 'GLPK : Solution is undefined' Got: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_30[16]>", line 1, in <module> p.solve(solver="GLPK") # optional - requires GLPK###line 1191: sage: p.solve(solver="GLPK") # optional - requires GLPK File "mip.pyx", line 1004, in sage.numerical.mip.MixedIntegerLinearProgram.solve (sage/numerical/mip.c:7627) raise NotImplementedError("GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: GLPK is not installed and cannot be used to solve this MixedIntegerLinearProgram. To install it, you can type in Sage: install_package('glpk') ********************************************************************** 4 items had failures: 1 of 7 in __main__.example_12 1 of 7 in __main__.example_13 1 of 22 in __main__.example_23 2 of 17 in __main__.example_30 ***Test Failed*** 5 failures. For whitespace errors, see the file /Users/alexandre/.sage//tmp/.doctest_mip.py [3.1 s] sage -t -optional "devel/sage-linear/sage/numerical/mip_coin.pyx" [2.6 s] sage -t -optional "devel/sage-linear/sage/numerical/mip_glpk.pyx" ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip_glpk.pyx", line 41: sage: from sage.numerical.mip_glpk import solve_glpk # optional - requires Glpk Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_1[2]>", line 1, in <module> from sage.numerical.mip_glpk import solve_glpk # optional - requires Glpk###line 41: sage: from sage.numerical.mip_glpk import solve_glpk # optional - requires Glpk ImportError: No module named mip_glpk ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip_glpk.pyx", line 49: sage: solve_glpk(p, objective_only=True) # optional - requires Glpk Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_1[9]>", line 1, in <module> solve_glpk(p, objective_only=True) # optional - requires Glpk###line 49: sage: solve_glpk(p, objective_only=True) # optional - requires Glpk NameError: name 'solve_glpk' is not defined ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip_glpk.pyx", line 123: sage: p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_2[6]>", line 1, in <module> p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK###line 123: sage: p.write_mps(SAGE_TMP+"/lp_problem.mps") # optional - requires GLPK File "mip.pyx", line 453, in sage.numerical.mip.MixedIntegerLinearProgram.write_mps (sage/numerical/mip.c:4108) raise NotImplementedError("You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk') ********************************************************************** File "/Users/alexandre/Applications/sage/devel/sage-linear/sage/numerical/mip_glpk.pyx", line 164: sage: p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK Exception raised: Traceback (most recent call last): File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/Users/alexandre/Applications/sage/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_3[6]>", line 1, in <module> p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK###line 164: sage: p.write_lp(SAGE_TMP+"/lp_problem.lp") # optional - requires GLPK File "mip.pyx", line 484, in sage.numerical.mip.MixedIntegerLinearProgram.write_lp (sage/numerical/mip.c:4329) raise NotImplementedError("You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk')") NotImplementedError: You need GLPK installed to use this function. To install it, you can type in Sage: install_package('glpk') ********************************************************************** 3 items had failures: 2 of 10 in __main__.example_1 1 of 7 in __main__.example_2 1 of 7 in __main__.example_3 ***Test Failed*** 4 failures. For whitespace errors, see the file /Users/alexandre/.sage//tmp/.doctest_mip_glpk.py [2.6 s] sage -t -optional "devel/sage-linear/sage/numerical/optimize.py" [5.7 s] sage -t -optional "devel/sage-linear/sage/numerical/test.py" [5.7 s] ---------------------------------------------------------------------- The following tests failed: sage -t -optional "devel/sage-linear/sage/numerical/mip.pyx" sage -t -optional "devel/sage-linear/sage/numerical/mip_glpk.pyx" Total time for all tests: 33.9 seconds
- I then installed GLPK, and then all tests passed, with the command
sage -t *
as well as the commandsage -t -optional *
.
If I'm not mistaken and if my installation is not broken, it means that the examples you included in the docstring are based on GLPK and not CBC.
comment:11 Changed 11 years ago by
Then it is not a problem at all :-)
The errors you see are in no way related to the present patch. You can see in all of your error messages that the line at fault if followed by : optional - requires GLPK. Note that there is no mention of CBC in those.
These lines are GLPK-specific as they are those who define the functions exporting a LP to a .mps or a .lp file, which make use of the GLPK library.
You had me worried for a while ! :-)
Nathann
comment:12 Changed 11 years ago by
Great ! Sorry for my comments, I'm not familiar enough with these two optional packages. I'll resume reviewing the patch later today.
comment:13 Changed 11 years ago by
I looked once again at your patch. It seems correct, but I have a few comments:
- Around line 711, you write
f = linear_function.f
Woudn't be better to access this value by a function that LinearFunction? provides ? More precisely, LinearFunction? objects should have a method f()
or function()
and a private attribute _f
. This is not a big problem, but seems cleaner. Same remark with linear_function.constraints
of line 733 and linear_function.equality
of line 735.
- This is more a style remark. You tend to put a lot of space in your code, but I feel there is too much, which causes the body of the functions to span more lines than terminals can display.
Short of that, the code seems ok, and all tests even optional pass. There are some typos in the doc, but I can fix it while reviewing. As soon as you answer/correct item 1, I should be able to finish reviewing it.
comment:14 Changed 11 years ago by
Here it is ! A new .dict() method for LinearFunction? :-)
I looked for long lines in the code, but I did not know how to fold them without making it much harder to understand... :-/
If you find one you think can be safely cut, do not hesitate though :-)
Thank you again for your help !
Nathann
comment:15 Changed 11 years ago by
Hello again Nathann !
I looked once again at your patch. You'll see that I added one on top of yours: it only modifies the formatting in the code and in the documentation, nothing major. In particular, I removed empty lines where they didn't seem necessary to me. I should give a positive review to your ticket very soon, but before that, there are some questions I would like you to answer.
- There is a parameter
name
to theadd_constraint
function ofMixedIntegerLinearProgram
. Why do you need such a parameter ? I'm sure there is a good reason, but it would be nice to illustrate by an example why this is helpful.
- Around line 715, you have
constant_coefficient = f.pop(-1,0)
. Isn't it dangerous ? If I'm not mistaken, this modifies the parameterlinear_function
and could have unsuspected side effects ?
- Since functions such as
__init__
,__eq__
, etc. do not appear in the documentation, it would be better to have more detailed documentation just under the declaration of the class. Instead ofA class to represent Linear Constraints
, you could describe in detail what it is used for and give some examples.
Sorry again for bothering you ! Don't forget to apply my patch if you want to add some modifications to yours. Next time should be a positive review !
comment:16 Changed 11 years ago by
- There are still lines of code of the form
functions = linear_function.constraints if linear_function.equality:
It's true that you do not modify the linear_function
object (you seem only to access the constraints
and equality
objects, but this would be cleaner to have methods that give you access to these.
comment:17 follow-up: ↓ 18 Changed 11 years ago by
Hello !! I will be answering your questions today :-)
Meanhile, I understand that I access many fields without calling methods, but in the end as this class is very short (and as I don't directly access fields without calling methods when outside of the definition of this class), I feel like adding many other methods would just create more calls to function, thus slowing it a bit, without really improving the readability.
Well, I don't mind changing it anyway, but ... What do you think ?
Nathann
comment:18 in reply to: ↑ 17 Changed 11 years ago by
I agree with you, since speed is very important in MILPs, it is reasonable... Forget about what I said. However, I still think there is a reasonable way to extract the constant coefficient without having to modify the object returned by the dict()
function. As for item 4, maybe this could be addressed in another ticket.
comment:19 Changed 11 years ago by
Hello !!!!
First, this new patch contains first my file trac_7311.patch, along with your corrections from trac_7311_review-abm.patch (and my thanks for your time!).
# (we talked about this together, but for the completeness of this ticket...). The names for Variables and Constraints are totally "useless" at the moment. Well, they can be useful only when one is trying to export a MixedIntegerLinearProgram? object to a .mps or a .lp file using the methods write_mps and write_lp. This way, anyone can export the program and try to solve it using a different solver, as these files are standard types to encode a LP, and clearly having names in such a file instead of having variables like x1 x2 x3, .... and constraints like c1 c2 c3, ... can help at some point :-)
Besides, I have not lost hope of touching the .show() method so that it would use the names of these variables/constraints when the user wants to see his LP.
# It is dangerous. And it is a mistake :-)
# I thought the documentation from init appeared when typing MixedIntegerLinearProgram?? .... A bit silly not to have noticed it until now.... You're perfectly right ! I copied the documentation from init several lines above and added a few lines to explain what the class does. It is likely no one but developpers will ever get interested in this class, as it does not appear when using LP.
And here is the new version of the patch :-)
Nathann
Changed 11 years ago by
comment:20 Changed 11 years ago by
- Reviewers set to Alexandre Blondin Massé
I tested Nathann's patch on sage-4.3.3. All tests passed and the documentation builds fine, except for the signature of many functions since the main involved file is a Cython file (this issue seems to have been solved in #8244).
Note that all non optional tests passed with neither GLPK nor CBC installed, and all tests including optional ones pass when I installed both GLPK and CBC.
I made some minor changes on code formatting and documentation. If Nathann agrees with my changes, I allow him to set this ticket to a positive review.
comment:21 Changed 11 years ago by
Thank you very much !! But what do you mean about problems with the signatures of functions ? O_o
Nathann
comment:22 Changed 11 years ago by
When you run sage -docbuild reference html
, you get the following warnings:
/Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.LinearFunction.dict: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MIPVariable.depth: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MIPVariable.items: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MIPVariable.keys: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MIPVariable.values: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.add_constraint: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.constraints: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.get_max: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.get_min: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.get_values: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.is_binary: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.is_integer: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.is_real: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.new_variable: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_binary: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_integer: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_max: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_min: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_objective: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_objective_name: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_problem_name: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.set_real: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.show: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.solve: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.write_lp: arg is not a Python function /Users/alexandre/Applications/sage/devel/sage/doc/en/reference/sage/numerical/mip.rst:6: (WARNING/2) error while formatting signature for sage.numerical.mip.MixedIntegerLinearProgram.write_mps: arg is not a Python function
Sphinx has some problem to deal with Cython files when generating the documentation and this issue was discussed in #8244.
comment:23 Changed 11 years ago by
- Status changed from needs_review to positive_review
OOps, ok, I see.... Then I accept your positive review and your fixes :-)
Thank you very much !!!!
Nathann
comment:24 Changed 11 years ago by
- Status changed from positive_review to needs_work
While retesting the patch, I noticed that some tests didn't pass when one doesn't have CBC or GLPK installed.
This means that some doctest wasn't tagged "optional" properly. Sorry about that, Nathann, but there is still some work to do. I'll try to identify the bugs tonight.
comment:25 Changed 11 years ago by
- Status changed from needs_work to needs_review
Sorry about my last comment, everything seems fine. This is very complicated to test optional packages properly... I have too many copies of sage on my computer. Positive review.
comment:26 Changed 11 years ago by
- Status changed from needs_review to positive_review
comment:27 Changed 11 years ago by
- Merged in set to sage-4.4.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
Merged into 4.4.alpha0:
- trac_7311.patch
- trac_7311_review-abm.patch
Jeffrey Kantor smartly noticed it may not be a good idea to have > be an alias for >= when dealing with integer programs... Fixed :-)
Nathann