sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.38k stars 469 forks source link

Wrong LP solver ordering #9570

Closed 6bdad4c1-1e26-4f2f-a442-a01a2292c181 closed 14 years ago

6bdad4c1-1e26-4f2f-a442-a01a2292c181 commented 14 years ago

At the moment, GLPK is the solver used regardless of the presence of CBC or CPLEX. This is just because of a line written ten lines too high in the file !

Nathann

Component: numerical

Author: Nathann Cohen, Leonardo Sampaio

Reviewer: Nathann Cohen, Leonardo Sampaio

Merged: sage-4.5.2.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/9570

6bdad4c1-1e26-4f2f-a442-a01a2292c181 commented 14 years ago
comment:1

Attachment: trac_9570.patch.gz

ce334df3-e1c6-464b-8708-de34788e4c32 commented 14 years ago

Fixes the AttributeError that was returned when no mip solver was specified by the user

ce334df3-e1c6-464b-8708-de34788e4c32 commented 14 years ago
comment:2

Attachment: trac_9570-fix.patch.gz

I applied your patch, but while trying to solve an MIP without specifying a solver, I've got an AttributeError, since the attribute '_default_solver' was not defined. I just fixed this by adding a line stating that _default_solver = None. If you agree with my changes, I think the patch can be said to be reviwed.

6bdad4c1-1e26-4f2f-a442-a01a2292c181 commented 14 years ago
comment:3

Excellent ! Thank you very much for your help :-)

Both apply fine and in the end, it works... Now the annoying part is #8880 because CPLEX is called by next-to-any method in the LP library XD

Nathann

6bdad4c1-1e26-4f2f-a442-a01a2292c181 commented 14 years ago

Author: Nathann Cohen, Leonardo Sampaio

6bdad4c1-1e26-4f2f-a442-a01a2292c181 commented 14 years ago

Reviewer: Nathann Cohen, Leonardo Sampaio

ce334df3-e1c6-464b-8708-de34788e4c32 commented 14 years ago
comment:5

ok, thanks for the advice =)