npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

glpk

0.0.12 • Public • Published

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();

Keywords

install

npm i glpk

Downloadsweekly downloads

59

version

0.0.12

license

MPL-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability