glp
glpk
npm i glpk
glp

glpk

Node js native module for GLPK

by Henri Gourvest

0.0.14 (see all)License:MPL-2.0TypeScript:Not Found
npm i glpk
Readme

Build Status

node-glpk

Node.js native module for GLPK.

Install

$ npm install glpk

Example

var glp = require("glpk");
var prob = new glp.Problem();
 
prob.readLpSync("todd.lpt");
prob.scaleSync(glp.SF_AUTO);
prob.simplexSync({presolve: glp.ON});
if (prob.getNumInt() > 0){
  function callback(tree){
    if (tree.reason() == glp.IBINGO){
      // ...
    }
  }
  prob.intoptSync({cbFunc: callback});
}
console.log("objective: " + prob.mipObjVal());
prob.delete();

Downloads/wk

75

GitHub Stars

17

LAST COMMIT

8mos ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
0.0.14
latest
8mos ago
No alternatives found
No tutorials found
Add a tutorial