Giter VIP home page Giter VIP logo

sdlp's Introduction

SDLP

Seidel's LP Algorithm: Linear-Complexity Linear Programming (LP) for Small-Dimensions

About

  1. This solver is super efficient for small-dimensional LP with any constraint number, mostly encountered in computational geometry. It enjoys linear complexity about the constraint number.

  2. The speed is at least an order of magnitude faster than GLPK in small-dimensional LP (<10) with a large constraints number (>100).

  3. This solver is adapted from the linear-fractional programming (LFP) from Mike Hohmeyer at UC Berkeley based on Raimund Seidel's algorithm. Kernel functions are reorganized. Previously-existed bugs are fixed here. An easy-to-use interface for LP via Eigen is also added.

  4. Only a header file is all you need.

Interface

To solve a linear programming:

    min cTx, 
    s.t. Ax<=b,

where x and c are d-dimensional vectors, b an m-dimensional vector and A an mxd matrix. It is assumed that d is small (<10) while m can be arbitrary value (1<= m <= 1e+8).

Only one function is all you need:

template <int d>
double linprog(const Eigen::Matrix<double, d, 1> &c,
               const Eigen::Matrix<double, -1, d> &A,
               const Eigen::Matrix<double, -1, 1> &b,
               Eigen::Matrix<double, d, 1> &x);

Input:

    c: objective coefficient
    A: constraint matrix
    b: constraint bound

Output:

    x: optimal solution if solved
    return: finite value if solved
            -infinity if unbounded
            infinity if infeasible

Reference

  1. Megiddo, N., 1984. Linear programming in linear time when the dimension is fixed. Journal of the ACM (JACM), 31(1), pp.114-127.
  2. Seidel, R., 1991. Small-dimensional linear programming and convex hulls made easy. Discrete & Computational Geometry, 6(3), pp.423-434.

sdlp's People

Contributors

zhepeiwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sdlp's Issues

Enquiries on dimension

Hi, first of all, I would like to thank you for creating this repo, and I have only one simple question concerning the content of this library. As you have mentioned in the README file, this solver works super efficient when the preset dimension is <10. Thus, my question is that what would happen if I increase the number of the dimension, say like above 50? Thank you in advance for your time.

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.