Coder Social home page Coder Social logo

victordomene / lpsolvers Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.28 MB

This repository contains a few different implementations of LP solvers, including Simplex with several pivot rules, Interior Point Methods, and the Ellipsoid Algorithm.

CMake 0.81% C++ 99.19%

lpsolvers's Introduction

LP Solving Benchmarks

This repository contains a few different implementations of LP solvers, including Simplex with several pivot rules, Interior Point Methods, and the Ellipsoid Algorithm. Benchmarks will be performed in the future.

Building Instructions

The following instructions are for Mac OS X. There is no guarantee that this will work on Linux environments (but there is no particular reasons why it shouldn't).

To build, you will need CMake. This can be installed easily via brew or apt-get.

Once you have that, the following commands should work:

mkdir Debug cd Debug cmake .. make

This will generate the lpsolver file on the Debug directory. The reason why we force a Debug compilation is simply because FLENS has code that is a bit older, and compilers will get annoyed in the Release option.

  • If you want to run without printing the tableaus and debugging information, simply edit the CMakeLists.txt file and remove the definition -DDEBUG.

Once that works, you can run the lpsolver as follows. In the Debug subdirectory,

./lpsolver [opt: bland/dantzig/random] <filename>

which will output the solution to the linear program specified by filename, an MPS file. (If the file is invalid, the code will assert; this has yet to be fixed.)

A few examples of tests that are run can be found in tests. For instance, running

./lpsolver dantzig ../tests/slide.mps

should give you back the maximum of 17, at the vector (1, 2, 0). The order of the results printed out is the order in which the variables appear in the MPS file.

You may find a few tests available in /src/tests. Most tests will likely hang the simplex solver, mostly because of the lack of support for sparse matrices in our current implementation. Smaller tests, such as afiro.mps, small.mps and slide.mps will work, though. There are also some imprecisions in computation, and that is likely due to FLENS problems. (In the end, I think I should not have used FLENS and just stuck with Numpy or something simpler, but oh well...)

Installing FLENS

All you have to do to install FLENS is to do

git clone git://github.com/michael-lehn/FLENS.git

inside the src folder.

Benchmarks

The benchmarks present in the paper were performed using GLPK and lpsolve. Both of these tools are freely available online in the links below:

lpsolve

glpk

On a Mac, you can easily install these via brew commands.

lpsolvers's People

Contributors

victordomene avatar

Watchers

James Cloos avatar  avatar

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.