UNPKG

javascript-lp-solver

Version:

Easy to use, JSON oriented Linear Programming and Mixed Int. Programming Solver

32 lines (31 loc) 651 B
{ "name": "Computer Problem", "optimize": "profit", "opType": "max", "constraints": { "cost": { "max": 70000 }, "size": { "max": 1000 } }, "variables": { "computer": { "size": 12, "cost": 1000, "profit": 1000 }, "printer": { "size": 8, "cost": 300, "profit": 350 } }, "expects": { "feasible": true, "computer": 59.09090909090909, "printer": 36.36363636363636, "result": 71818.18181818182 } }