-
Notifications
You must be signed in to change notification settings - Fork 101
Set cbc to default solver #2
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
Conversation
I've come across a bug; on Linux (but I think it's multi os) I installed only mip and, when launching my script using it, I got a NameError: name 'ffi' is not defined. I searched where the problem was (line 264 of gurobi.py file, called in line 485 of model.py __init__), tried to fix it, but the problem was that in the first try except block ffi was initializated AFTER the raise of exception (going into the except block), causing the has_gurobi to be False and ffi to not exist in the workspace. TL;DR setting the solver_name to cbc (the one that comes included with installation btw) there isn't any problem and everything works
|
Hi, are you using the last Python-MIP version (1.3) ? I think that in
previous versions cffi was not included as a dependency, not it is and I
think that installing it will also install cffi. Could you check it ?
…--
=============================================================
Haroldo Gambini Santos
Computing Department
Universidade Federal de Ouro Preto - UFOP
email: haroldo@ufop.edu.br
Haroldo.GambiniSantos@cs.kuleuven.be
home/research page: www.decom.ufop.br/haroldo
It has long been an axiom of mine that the little things are infinitely
the most important.
-- Sir Arthur Conan Doyle, "A Case of Identity"
On Mon, 17 Jun 2019, Cristiano wrote:
I've come across a bug; on Linux (but I think it's multi os) I installed only mip and, when
launching my script using it, I got a NameError: name 'ffi' is not defined.
I searched where the problem was (line 264 of gurobi.py file, called in line 485 of model.py
init), tried to fix it, but the problem was that in the first try except block ffi was
initializated AFTER the raise of exception (going into the except block), causing the
has_gurobi to be False and ffi to not exist in the workspace.
TL;DR setting the solver_name to cbc (the one that comes included with installation btw) there
isn't any problem and everything works
_______________________________________________________________________________________________
You can view, comment on, or merge this pull request online at:
#2
Commit Summary
* Set cbc to default solver
File Changes
* M mip/model.py (2)
Patch Links:
* https://github.com/coin-or/python-mip/pull/2.patch
* https://github.com/coin-or/python-mip/pull/2.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute thethread.[AB4VZOTUDQDJK5427A2NV4LP3BZQLA5CNFSM4HY4QSDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45
C7NFSM4G2BOISQ.gif]
|
|
If you look at the fork, the parent commit to the PR is d88a1da, which is 1.3. |
Yes, I'm using the lastest MIP version. EDIT |
|
It was really a bug for detecting gurobi. I applied a version of your
patch (without the formatting changes) and released 1.3.1. Thanks a lot
for the fix.
…--
=============================================================
Haroldo Gambini Santos
Computing Department
Universidade Federal de Ouro Preto - UFOP
email: haroldo@ufop.edu.br
Haroldo.GambiniSantos@cs.kuleuven.be
home/research page: www.decom.ufop.br/haroldo
It has long been an axiom of mine that the little things are infinitely
the most important.
-- Sir Arthur Conan Doyle, "A Case of Identity"
On Tue, 18 Jun 2019, Cristiano wrote:
Hi, are you using the last Python-MIP version (1.3) ? I think that in previous
versions cffi was not included as a dependency, not it is and I think that
installing it will also install cffi. Could you check it ?
Yes, I'm using the lastest MIP version.
I noticed that with my PR gurobi won't be ever selected (because solver_name is always equal to
cbc), so instead I think it's better to raise an exception into gurobi.py in the except section
(after has_gurobi = False)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute thethread.[AB4VZOVG6GQ2BFR47CO6KKDP3D2GXA5CNFSM4HY4QSDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJK
TDN5WW2ZLOORPWSZGODX65XTY.gif]
|
|
You're welcome! |
I've come across a bug; on Linux (but I think it's multi os) I installed only mip and, when launching my script using it, I got a
NameError: name 'ffi' is not defined.I searched where the problem was (line 264 of gurobi.py file, called in line 485 of model.py
__init__), tried to fix it, but the problem was that in the first try except block ffi was initializated AFTER the raise of exception (going into the except block), causing the has_gurobi to be False and ffi to not exist in the workspace.TL;DR setting the solver_name to cbc (the one that comes included with installation btw) there isn't any problem and everything works