Giter Site home page Giter Site logo

devdudeio / yasmij.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from larrybattle/yasmij.js

0.0 1.0 0.0 781 KB

YASMIJ - Yet Another Simplex Method Library for javascript

License: MIT License

JavaScript 96.89% CSS 0.13% HTML 1.89% Go 1.08%

yasmij.js's Introduction

Note

Project is retired and not under active development.

YASMIJ.js

Purpose:

YASMIJ stands for Yet Another Simplex Method Library for Javascript.
The purpose of this project is to provide a simple Simplex Method library for Javascript.
The simplex method is a popular algorithm for linear programming.
It is used to solve optimization by using of artifical variables and/or branch and bound.

Notes:

  • Yasmij.js is a small side project that I work on in my spare time.
  • CommonJS bundlers will place a global YASMIJ onto the window Please feel free to contribute.

Version

BETA 0.2.5 - (unstable)

Dependencies

None

Installation

  • require('yasmij'), or
  • include <script src="./dist/yasmij.js"></script> from this repo

Environment

Run the test cases to determine support.
In general, yasmij.js should be supported in Javascript ES5 environments.
Ex. Chrome 10+, Firefox 12+, IE9+ and Node.js

Documentation

Refer to the docs folder

Please read the test cases to understand how everything works.

Change Log

Refer to history.md

Issues / Help

Please raise a ticket for help.

Example:

Maximize x1 + 2x2 - x3

Subject to
2x1 + x2 + x3 <= 14,
4x1 + 2x2 + 3x3 <= 28,
2x1 + 5x2 + 5x3 <= 30

where 0 <= x1, x2, x3

Input

var input = {
	type: "maximize",
	objective : "x1 + 2x2 - x3",
	constraints : [
		"2x1 + x2 + x3 <= 14",
		"4x1 + 2x2 + 3x3 <= 28",
		"2x1 + 5x2 + 5x3 <= 30"
	]
};
var output = YASMIJ.solve( input );

Output

JSON.stringify(output, null, 2)
// returns
"{
  "result": {
	"slack1": 0,
	"slack2": 0,
	"slack3": 0,
	"x1": 5,
	"x2": 4,
	"x3": 0,
	"z": 13
  }
}"

Roadmap

Version 0.3:

  • Add support for Minimization (Standard and Non-standard)
  • Add documentation.
  • Add build script

Version 0.4:

  • Add support for unrestricted variables.

yasmij.js's People

Contributors

larrybattle avatar

Watchers

DevDude avatar

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.