Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has anyone seen a simplex library for javascript/nodejs

I've been writing a lot of my scripts in NodeJs, but I need to use something like the GLPK libraries in order to handle some of the optimizations in my scripts. Has anyone heard of a javascript driver? I wonder how hard it would be to port coin to a V8 library.. probably above my pay grade.

like image 941
BHP Avatar asked Jun 22 '11 19:06

BHP


People also ask

Is node js JavaScript library?

js is actually not a framework or a library, but a runtime environment, based on Chrome's V8 JavaScript engine.

What kind of JavaScript library is node js?

Node. js is an open-source, cross-platform JavaScript runtime environment and library for running web applications outside the client's browser. Ryan Dahl developed it in 2009, and its latest iteration, version 15.14, was released in April 2021. Developers use Node.

Is node js a web Stack?

js, AngularJS (or Angular), and Node. js) is a free and open-source JavaScript software stack for building dynamic web sites and web applications.


1 Answers

Javascript Simplex Libraries

  • SimplexJS
  • SimpleSimplex
  • YASMIJ.js

YASMIJ Example:

var input = {
    type: "maximize",
    objective : "x1 + 2x2 - x3",
    constraints : [
        "2x1 + x2 + x3 <= 14",
        "4x1 + 2x2 + 3x3 <= 28",
        "2x1 + 5x2 + 5x3 <= 30"
    ]
};
YASMIJ.solve( input ).toString();
// returns
"{"result":{"slack1":0,"slack2":0,"slack3":0,"x1":5,"x2":4,"x3":0,"z":13}}"
like image 102
Larry Battle Avatar answered Sep 23 '22 19:09

Larry Battle