|
For whatever its worth I built this about a decade ago because I am a non academic who can't think in tableaus, but still wanted to solve optimization problems. I created a json like schema/struct/whatever to describe the problem. Maybe adopt something like this and more people will be able to see how they could use your tool: https://github.com/JWally/jsLPSolver/blob/master/API.md I need to re go through the docs, but you get the gist. Here is the Berlin Airlift problem for example: const model = {
optimize: "capacity",
opType: "max",
constraints: {
plane: { max: 44 },
person: { max: 512 },
cost: { max: 300000 },
},
variables: {
brit: { capacity: 20000, plane: 1, person: 8, cost: 5000 },
yank: { capacity: 30000, plane: 1, person: 16, cost: 9000 },
},
}; |