0.0.3 • Published 9 years ago

simplex-solver v0.0.3

Weekly downloads
25
License
-
Repository
github
Last release
9 years ago

Simplex Solver

Simplex Solver solves linear programs given an arbitrary number of constraints. Learn more about the Simplex Algorithm.

Live Example

To see the Simplex Solver in action, take a look here: simplex.samduvall.com.

Code Example

To use Simplex Solver in your own application, follow the example below.

var simplex = require('simplex-solver');

var result = simplex.maximize('2x + 3y + 4z', [
  '3x + 2y + z <= 10',
  '2x + 5y + 3z <= 15'
]);

The example above will yield the following object

result = {max: 20, x: 0, y: 0, z: 5, tableaus: [...]}

Install

npm install simplex-solver

Documentation

simplex.maximize(equation, constraints)

Maximizes equation such that it meets all of the constraints.

Arguments

  • equation - A string
  • constraints - An array of strings. The operator for each constraint can be either <=, >= or =
0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago