Giter Club home page Giter Club logo

Comments (4)

apete avatar apete commented on August 20, 2024

There is no trick. What you need is for the linear solver to make use of sparse data structures. Currently it does not (the convex solver does to some extent). Implementing this shouldn't be hard.

The ojAlgo solvers are not comparable to native (commercial) solvers in terms of performance and resource consumption. They're pure Java alternatives for smaller/simpler cases.

If you want solve the linear relaxation you have several options:

  1. Create the model that way

  2. Call model.relax(boolean);

  3. Supply your own Optimisation.Integration using ExpressionsBasedModel.addIntegration(...) If you write your code in the org.ojalgo.optimisation package you can instantiate and delegate to any of the existing implementation.

I guess writing a GLPK integration shouldn't be too hard either, provided they have a Java interface.

With your little trick to solve the relaxed problem execution time goes down from 8s to 6s. This makes me think you never actually make use of the MIP solver.

from ojalgo.

djahandarie avatar djahandarie commented on August 20, 2024

Aha! Sparse vs dense certainly seems like it could account for the difference.

If I relax the model using methods 1 or 2, it actually does not speed up at all. Not sure why...

As for integrations, I in fact started with ojAlgo in an effort to eliminate unpure code (I was using GLPK before via https://www.xypron.de/projects/linopt/), but perhaps it's unavoidable...

Unless you want to keep this ticket open to track sparse linear solving, I'm fine with it being closed. Thank you for your quick response!

from ojalgo.

apete avatar apete commented on August 20, 2024

from ojalgo.

apete avatar apete commented on August 20, 2024

from ojalgo.

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.