Coder Social home page Coder Social logo

Comments (7)

ebongo1 avatar ebongo1 commented on September 3, 2024

Is CBC still using CPU time instead of wall clock time? I know Pulp updated the time limit to default to wall clock time, but the code snippet below makes me think that it's not updated in CBC.
image

from cbc.

tkralphs avatar tkralphs commented on September 3, 2024

There is a parameter timeMode that can be set and you are correct that this has default of cpu. One could argue whether this is the most natural default, but you can over-ride it.

Welcome to the CBC MILP Solver
Version: 2.10
Build Date: Jun  1 2023

CoinSolver takes input from arguments ( - switches to stdin)
Enter ? for list of commands or help
Coin:timeMode
timeMode has value cpu

With regard to the code snippet above. if I'm not mistaken, this is about a time limit for a subprocess, not the overall solution process. Whenever the code decides whether to halt the solution process altogether, it should check whether to use elapsed or cpu time.

from cbc.

ebongo1 avatar ebongo1 commented on September 3, 2024

I double checked, and the log I attached above says that "Option for timeMode changed from cpu to elapsed", so it should be using elapsed wall clock time. So it should still be running to the full 1200 seconds and not stopping at 739.64.

Thank you for clarifying the code snippet I sent above.

from cbc.

tkralphs avatar tkralphs commented on September 3, 2024

Ah, OK, I didn't check the log, since I assumed the issue must be that you didn't set the parameter (otherwise, the default is irrelevant). This could be a bug then. It looks like you are using the master branch. Could you try the latest release and see if you observe the same behavior?

from cbc.

ebongo1 avatar ebongo1 commented on September 3, 2024

I am using PuLP 2.7.0, and when I tried updating it, it said I had the latest version. Is there something else I should update instead?

from cbc.

tkralphs avatar tkralphs commented on September 3, 2024

Oops, sorry, I assumed you were using Cbc directly. I now see from the output that you are actually using 2.10.3, though the source code you were pointing to is that of master. You could try updating to the latest release of Cbc. It's possible a bug has been fixed since 2.10.3, which is pretty old now. There are many ways of getting the latest release, depending on your platform. You can check the README for details. PuLP allows you to point to a different installed version.

But in any case, this is not a case of elapsed versus wallclock, since I now see also that the reported elapsed and wallclock are the same (which means you are using the sequential version). It's possible that the reported wallclock is incorrect. I remember that at some point, the wallclock being used for termination was not quite the same as the wallclock that was reported. It looks like you have a very large instance for which the preprocessing time maybe substantial (the time reported after processing the root is already ~500 s). It's possible that some significant part of the running time isn't being included in what's reported. Did you try measuring the running time externally to see what it really is?

from cbc.

ebongo1 avatar ebongo1 commented on September 3, 2024

Ok that is good to know that PuLP can point to a different version of Cbc - we can try doing that to see if that helps.

I believe we are wrapping the program in our own timer and are still seeing the total time be less than the time limit.

from cbc.

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.