UNPKG

javascript-lp-solver

Version:

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

32 lines (31 loc) 657 B
{ "name": "Chocolate Problem", "optimize": "cost", "opType": "min", "constraints": { "semisweet": { "min": 30000 }, "milk chocolate": { "min": 60000 } }, "variables": { "Kansas": { "semisweet": 3000, "milk chocolate": 2000, "cost": 1000 }, "Oklahoma": { "semisweet": 1000, "milk chocolate": 6000, "cost": 1500 } }, "expects": { "feasible": true, "Kansas": 7.5, "Oklahoma": 7.5, "result": 18750 } }