GithubHelp home page GithubHelp logo

nol0n / discrete_optimization Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 102 KB

some LP algorithms that can solve some problems

CMake 4.87% C++ 95.13%
cutting-plane cutting-plane-method dual-simplex gomory gomory-cut simplex simplex-algorithm integer-cutting-plane

discrete_optimization's People

Watchers

 avatar

discrete_optimization's Issues

Overflow error in Gomory Cutting Plane method

How to reproduse

in application main.cpp

...
obv::Table table;
table.readFile("./test.txt"); // with problem given below

obv::lpalgs::simplexMethod(table);
obv::lpalgs::cuttingPlane(table);
std::cout << table << "\n\n";
...

Example

problem

max F = 1 * x1 + 15 * x2 + 24 * x3 + 3 * x4

3 * x1 +  4 * x2 +  1 * x3 +  2 * x4 <= 29
2 * x1 + 15 * x2 + 12 * x3 +  3 * x4 <= 61
3 * x1 +  5 * x2 +  2 * x3 + 14 * x4 <= 37
2 * x1 + 98 * x2 + 32 * x3 + 23 * x4 <= 57

format for input file

4  4
1 15 24  3
3  4  1  2 29
2 15 12  3 61
3  5  2 14 37
2 98 32 23 57

Expected answer

9 * x1 + x3 = 33

Now

It can't solve this problem because of integer overflow

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.