Comments (7)
it should be self.model.vars could you try to modify in your version and see if it works ?
from python-mip.
tentative fix on 1.3.14, could you try ?
from python-mip.
I can see what you did (i.e., adding the parentheses to self.num_cols on line 409). But I now get
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
m.objective
File "/usr/local/lib/python3.7/site-packages/mip/model.py", line 933, in objective
return self.solver.get_objective()
File "/usr/local/lib/python3.7/site-packages/mip/cbc.py", line 409, in get_objective
return xsum(obj[j]*self.vars[j] for j in range(self.num_cols())
File "/usr/local/lib/python3.7/site-packages/mip/model.py", line 1952, in xsum
for term in terms:
File "/usr/local/lib/python3.7/site-packages/mip/cbc.py", line 410, in
if abs(obj[j]) >= 1e-15)
AttributeError: 'SolverCbc' object has no attribute 'vars'
from python-mip.
That does the trick! Thanks!
from python-mip.
good. I released 1.3.15 with the fix, please check my update if it works ok.
from python-mip.
Yes, the update does seem to work. Really appreciate the quick fix, and the package as a whole.
from python-mip.
you're welcome!
from python-mip.
Related Issues (20)
- Issues running the latest versions of Python-MIP on AWS lambda functions HOT 8
- Name 'cbclib' is not defined HOT 12
- Wrong results
- Supporting SCIP
- Improve Example Code Readability HOT 3
- Lazy Callback Question HOT 1
- Incorrect n-Queens Constraints? HOT 1
- Output search tree HOT 1
- Confusing Behaviour with disposing of Gurobi Environment HOT 1
- Incorrect file extension when call write() with CBC solver HOT 1
- Explicitly provide supported versions of Cbc HOT 2
- Passing Solver explicitly causes UnboundLocalError
- [1.15.0] Tests fail: ImportError: cannot import name '__version__' from 'mip._version' (/usr/ports/math/py-mip/work-py39/mip-1.15.0/mip/_version.py) HOT 1
- More verbose errors? HOT 3
- still logging when verbose=0 (on a recent version of CBC)
- Support Python 3.12
- Add py.typed marker HOT 1
- Infeasibility Issue in Python-MIP When Incrementing an Integer Constant HOT 2
- `add_constr` returns broken object when adding constraint without variables HOT 3
- help support mac arm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-mip.