Opened 11 years ago
Closed 11 years ago
#7333 closed enhancement (fixed)
CBC spkg updated because of modifications in sage.numerical.mip
Reported by: | ncohen | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3 |
Component: | packages: optional | Keywords: | |
Cc: | Merged in: | ||
Authors: | Nathann Cohen | Reviewers: | Martin Albrecht |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Since the new version of sage.numerical.mip, which is now in the standard distribution of Sage, the old CBC spkg was not working anymore because of many changes in the structure of class MIP. This patch fixes this, by mainly changing some variables' names to the new ones, and Cythonizing part of the code when it was possible !
The spkg is available in two locations :
- On sage.math at ~ncohen/cbc-2.3.p1.spkg
- At http://www-sop.inria.fr/members/Nathann.Cohen/cbc-2.3.p1.spkg
Thank you for your help !!!!
Change History (12)
comment:1 Changed 11 years ago by
- Status changed from new to needs_review
- Summary changed from CBC spkg to CBC spkg updated because of modifications in sage.numerical.mip
comment:2 Changed 11 years ago by
- Report Upstream set to N/A
- Reviewers set to Martin Albrecht
- Status changed from needs_review to needs_work
comment:3 Changed 11 years ago by
I should have got rid of this before... :p
This is just caused by the fact that the problem that is optimized is symmetric in the two variables x[3] and y. CBC returnd x[3] set to two, and Coin returns the other one to 2, both being good answers :p
But I thought this had been updated... Did you test it on the last alpha version ?
comment:4 Changed 11 years ago by
Yes, alpha1.
comment:5 Changed 11 years ago by
Sorry, then I did not check on the good file. I can not find any occurrence of p.get_values(x[3]) in mip.pyx. Could you tell me which file contains it please ? :-)
I'll fix it immediately after !!!
Nathann
comment:6 Changed 11 years ago by
Line 477:
EXAMPLE:: sage: p = MixedIntegerLinearProgram() sage: x = p.new_variable() sage: y = p.new_variable(dim=2) sage: p.set_objective(x[3] + y[2][9] + x[5]) sage: p.add_constraint(x[3] + y[2][9] + 2*x[5], max=2) sage: p.solve() # optional - requires Glpk or COIN-OR/CBC 2.0 sage: # sage: # Returns the optimal value of x[3] >>> sage: p.get_values(x[3]) # optional - requires Glpk or COIN-OR/CBC 2.0
comment:7 Changed 11 years ago by
comment:8 Changed 11 years ago by
Yes, sorry for the misunderstanding :-)
comment:9 Changed 11 years ago by
- Status changed from needs_work to needs_review
comment:10 Changed 11 years ago by
- Status changed from needs_review to positive_review
comment:11 Changed 11 years ago by
Thank you ! :-)
comment:12 Changed 11 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
Merged in with the optional packages.
I get a bunch of
--optional
doctest errors if only CBC but not GLPK is installed. Most of them are fine (they point out that I need GLPK), but this one isn't:Other than that, it looks fine. I have been using it over the last week or so and cannot report any problems.