Skip to content

Java application that essentially solves systems of equations

Notifications You must be signed in to change notification settings

Jtwoolbright/Simplex-LP-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Simplex Linear Program Solver

Background

A Linear Program is a method of maximizing or minimizing an equation based off a set of constraints that is often used to express optimization problems in the field of Operations Research (See https://en.wikipedia.org/wiki/Linear_programming to learn more). As more and more constraints and variables are introduced, Linear Programs can grow substantially in size, and it can be very difficult, if not impossible, to solve these problems by simple methods such as elimination or substitution. Fortunately, a US Army Air Force veteran and mathematical scientist by the name of George Dantzig discovered an easier way of solving these problems which he named the Simplex Algorithm (See https://en.wikipedia.org/wiki/Simplex_algorithm). The Simplex Algorithm is effective at solving a large subset of Linear Programs and has since been built upon to solve many more.

Description

StandardForm

The Simplex Linear Program Solver uses the original Simplex Algorithm, and it requires the Linear Program to be in standard form prior to user input (See above image). The qn is referred to as the right hand side constraints when prompting for user input, and it cannot include numbers that are <= 0. The pk is referred to as the the constants of the equation to maximize, and they also cannot be <= 0. The ank is referred to as the constraint variable constants, and the user must type in constants for all variables, including those with zero constants, in the constraints.

Requirements

CommandLine

To run from command line, you must have a Java kit installed and your system's environment variables properly configured. You can also run it by uploading the files to an online java environment such as https://www.onlinegdb.com/online_java_compiler.

Output

Output

The above output is the result from a standard LP,

Maximize P = 3x1 + 5x2

Subject to:

x1 <= 4

2x1 + 3x2 <= 12

2x2 <= 18

And: x1, x2 >= 0

About

Java application that essentially solves systems of equations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages