« Homework Syllabus for all sect | Main | Lecture #Syllabus for all sect »
April 05, 2006
Project #Syllabus for all sect
In which you use the Simplex Method to solve a simple linear programming problem. The code is easy to write, there's not much to the report but you do need to turn in your code. No improvement project required.
Note that nothing will be accepted after the last day of classes (even if you have late days left over).
Posted by jones at April 5, 2006 09:49 AM
Comments
So I found a couple of things that were easier for me to understand:
Wikipedia Example (this is simpler than the one we've learned. The optimality test is easier if you just check for non-zeros)
http://en.wikipedia.org/wiki/Simplex_algorithm_method
Java applet that does the whole algorithm step by step. (And gives you and answer to check yours against!)
http://www-fp.mcs.anl.gov/otc/Guide/CaseStudies/simplex/applet/SimplexTool.html
Posted by: drfindley
at April 14, 2006 11:17 AM
Thanks for the tips, drfindley. I found the algorithm in wikipedia and in the java applet sufficiently different from class that it was more confusing than just reading the pdf from class. But being able to compare my answers with the applet's was very helpful and reassuring.
Here are a few tips of my own:
First, be sure to have read at least the implementation section (section 4) of the linear programming notes before getting started on the project. I wasted 4+ hours trying to figure out how to get the indices in B and N right until I read that paper.
Second, the paper doesn't have any examples of actually doing the math using matrices, and although it talks about growing the matrix and vectors to twice their size, it doesn't say where to put all the zeros. So here's the pattern:
A matrix: make it n+m wide and tall, and put the original A matrix data (that is only m high and n wide) in the lower-left corner of that matrix. Some thinking about what each corner of the matrix represents should make the reason clear.
b vector: add n zeros in front of whatever data is there.
c vector: add m zeros to the end of the vector.
Disclaimer: This worked for me. Your mileage may vary.
Posted by: Andrew Arnott
at April 15, 2006 07:52 AM
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)