Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

How to use? #3

Open
TheOddler opened this issue Apr 22, 2014 · 3 comments
Open

How to use? #3

TheOddler opened this issue Apr 22, 2014 · 3 comments

Comments

@TheOddler
Copy link

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!

@IainNZ
Copy link
Owner

IainNZ commented Apr 22, 2014

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.

@TheOddler
Copy link
Author

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

@ghost
Copy link

ghost commented Oct 14, 2017

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants