UNPKG

javascript-lp-solver

Version:

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

40 lines (39 loc) 735 B
{ "name": "Integer Wood Problem", "optimize": "profit", "opType": "max", "constraints": { "wood": { "max": 300 }, "labor": { "max": 110 }, "chairs": { "max": 8 } }, "variables": { "table": { "wood": 30, "labor": 5, "profit": 6 }, "chair": { "wood": 20, "labor": 10, "profit": 8, "chairs": 1 } }, "ints": { "table": 1, "chair": 1 }, "expects": { "feasible": true, "table": 4, "chair": 8, "result": 88 } }