SimplexJS icon indicating copy to clipboard operation
SimplexJS copied to clipboard

How to use?

Open TheOddler opened this issue 11 years ago • 3 comments

I've been trying to figure out how to use this project. I looked at the TestSimplexJS.js though didn't really understand. You use variables A, b, c, m, n without explanation what they are. (I assume xLB en xUB are lower and upper bound.)

This would be the first time I use a linear solver, so perhaps I'm just missing something obvious. Could you explain what is what a little more?

Thanks a lot!

TheOddler avatar Apr 22 '14 16:04 TheOddler

I think I just sort of assumed familiarity with these things, sorry about that. The solver expects input in (something like) standard computational form, i.e.

min c^T x
subject to A x = b
         xLB <= x <= xUB

so if you have less-than/greather-than constraints, you'll need to add a slack/surplus variables to make the constraints equality constraints. If you have a maximization objective, just simply flip the sign on your objective coefficients. Everything is a vector except the A matrix, which is stored as a list-of-lists, where each row is an inner list.

IainNZ avatar Apr 22 '14 21:04 IainNZ

No problem, thanks a lot for the explanation, and the very fast reply!

TheOddler avatar Apr 23 '14 01:04 TheOddler

I guess variable n is the dimension of x, but what's the meaning of variable m? The number of equality constraints?

Thanks a lot!

ghost avatar Oct 14 '17 13:10 ghost