Comments (4)
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:
-
Create the model that way
-
Call model.relax(boolean);
-
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.
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.
from ojalgo.
from ojalgo.
Related Issues (20)
- how to use Expression to form expression like x/1-x? HOT 1
- Solution does not balance based on weight HOT 3
- make ExpressionsBasedModel.isInfeasible() public HOT 13
- Expression should have "add" method that takes Variable as argument. HOT 4
- Eigenvalues and Eigenvectors differing from MatLab implementation? HOT 3
- getEigenpairs() doesn't work on hermitian complex matrix HOT 2
- Generalised Eigenvalue Problems do not work on complex matrices HOT 4
- Array index out of bounds exception while using IntegerStrategy HOT 7
- Non linear programming HOT 2
- hardware profile HOT 6
- Add a bibtex reference for citing this software HOT 1
- Do you have the ojAlgo js library HOT 1
- Get UNEXPLORED status after sometime, HOT 4
- Request: Support Implicit Expansion with Arithmetic Operations HOT 2
- Issue with Cholesky decomposition - symmetric positive-definite matrix decomposition is not solvable HOT 2
- invert method got wrong result HOT 3
- Solver returns INFEASIBLE on a simple problem with a clear solution HOT 6
- Allocation of number of non-zero elements in SparseStore HOT 4
- QR Decomposition's getInPlace returns null HOT 4
- ConvexSolver didn't found correct solution HOT 3
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 ojalgo.