javascript-lp-solver
Version:
Easy to use, JSON oriented Linear Programming and Mixed Int. Programming Solver
32 lines (31 loc) • 601 B
JSON
{
"name": "Generic Business Problem",
"optimize": "profit",
"opType": "max",
"constraints": {
"size": {
"max": 2400
},
"units": {
"min": 50
}
},
"variables": {
"large": {
"size": 60,
"units": 1,
"profit": 250
},
"small": {
"size": 40,
"units": 1,
"profit": 150
}
},
"expects": {
"feasible": true,
"large": 20,
"small": 30,
"result": 9500
}
}