Code Monkey home page Code Monkey logo

Comments (7)

h-g-s avatar h-g-s commented on May 31, 2024 1

it should be self.model.vars could you try to modify in your version and see if it works ?

from python-mip.

h-g-s avatar h-g-s commented on May 31, 2024

tentative fix on 1.3.14, could you try ?

from python-mip.

sgreysond avatar sgreysond commented on May 31, 2024

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.

sgreysond avatar sgreysond commented on May 31, 2024

That does the trick! Thanks!

from python-mip.

h-g-s avatar h-g-s commented on May 31, 2024

good. I released 1.3.15 with the fix, please check my update if it works ok.

from python-mip.

sgreysond avatar sgreysond commented on May 31, 2024

Yes, the update does seem to work. Really appreciate the quick fix, and the package as a whole.

from python-mip.

h-g-s avatar h-g-s commented on May 31, 2024

you're welcome!

from python-mip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.