Code Monkey home page Code Monkey logo

Comments (4)

amosr avatar amosr commented on August 16, 2024

Hi! I'm glad you like it. ILP is really interesting.

Ah, I suspect we've never tested the non-embedded flag with different versions. It's probably using the local header file (2.8.6) with your system implementation (2.9.8), and because it's C++ there's more likely to be private implementation stuff inside the header files. If the parts of the public C++ API we're using hasn't changed between 2.8.6 and 2.9.8, we should be able to support 2.9.8 by using the system header files instead.

I think this should be easy enough to fix, but don't have a VM set up or multiple versions of CBC installed. If I push a change, are you keen to test it?

I think to fix this, we just need an #if inside our Cbc.cpp (the C wrapper around the C++):

#if CBC_EMBEDDED
#include "./coin/CbcModel.hpp" // local
#include "./coin/OsiClpSolverInterface.hpp"
#else
#include <coin/CbcModel.hpp> // system
#include <coin/OsiClpSolverInterface.hpp>
#endif

Unfortunately, I don't know how to specify "include coin/CbcModel.hpp, but not the local one" – but I think we can just rename the local coin implementation directory to coin-local and include from coin-local or coin.

from limp-cbc.

UnkindPartition avatar UnkindPartition commented on August 16, 2024

Thanks for the quick response!

Sure, I am happy to test patches.

Unfortunately, I don't know how to specify "include coin/CbcModel.hpp, but not the local one"

Couldn't you achieve this by manipulating include-dirs? Is local coin/CbcModel.hpp picked up because it's inside cbits and cbits is in include-dirs? In that case, perhaps moving coin out of cbits (e.g. to the top level) would help?

from limp-cbc.

amosr avatar amosr commented on August 16, 2024

I've changed it to use pkgconfig-depends to add coin/ to the include-dirs and now we can just #include <CbcModel.hpp>. I tried with 2.9.9 from my system and it seems to work.

Give this a go:
c2d7fce

from limp-cbc.

UnkindPartition avatar UnkindPartition commented on August 16, 2024

Works now, cheers!

from limp-cbc.

Related Issues (6)

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.