Node.js [1] is an application platform based on server side JavaScript.

Node-glpk edit

Node-glpk [2] is a handcrafted language binding to access the GLPK library from NodeJS. It is subject to the Mozilla public license 2.0 [3].

Installation edit

The package is installed using the npm [4] package manager.

npm install glpk

Example edit

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});
}
prob.delete();