Giter Site home page Giter Site logo

simplex-method's Introduction

Simplex-Method

A learning tool that performs the simplex method (Phase 2 of the Two-Phase Algorithm). This requires your tableau be in canonical form, has a basic variable in each row, to guarantee termination.

Creates a window containing grid cells representing the input simplex tableau. There are buttons for single-step iteration, iteration to completion, resizing, and undoing. It's still a work in progress, so I expect bugs to arise as it gets used more.

The editor also supports common math functions through mXparser.

Sample Screenshot

Here, the program solves the problem:

Minimize -4X1 - 6X2

Subject to 

 -X1 +   X2 + S1       = 11

  X1 +   X2 +     S2   = 27

2 X1 + 5 X2 +       S3 = 90

X1, X2, S1, S2, S3 >= 0

Where S1, S2, S3 are slack variables added to put this in standard form.

Duality

This program now supports dual programs! You must put it into the form

Minimize f(x,...)

Subject to

Ax >= b

Example:

Minimize 12 X1 + 15 X2

Subject to

60 X1 + 50 X2 >= 200
10 X1 +  3 X2 >= 19
11 X1 + 13 X2 >= 8
X1, X2 >= 0

Sample Screenshot

simplex-method's People

Contributors

iamboorrito avatar

Stargazers

Mariusz Gromada avatar

Watchers

James Cloos avatar  avatar

simplex-method's Issues

Need better undo/redo structure

The current structure saves too much data. Should only need to save changes to the table or tableau and not save copies. Maybe create an enum with the different types of events and process undo/redo actions off of the returned event type.

Better History Stack

Current implementation is pretty much hacked through and should be redesigned to be part of the Frame and not the Tableau Object.

Subclass RXTable or add algorithm to LPFrame to remove Tableau storage.

This project started out as a terminal program using the Tableau class to implement the Simplex Algorithm, but now that it is graphical the table model stores the same data as the underlying representation (thanks to a functioning MathEditor). This makes the Tableau class redundant and should be removed in future versions.

Add set size button

I would like to add a button which displays a dialog, maybe JOptionPane's internal message, and resizes the table/tableau accordingly.

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.