Post Reply 
Simplex Program
02-28-2016, 11:29 PM
Post: #6
RE: Simplex Program
(02-28-2016 06:27 PM)markelg Wrote:  
(02-28-2016 06:18 PM)dbbotkin Wrote:  Three cheers for even trying to implement a complex LP algorithm on a pocket calculator--I too attempted this task many years ago on an HP41c, with no success at all.

It would be helpful to have your sample input data as well as the current output you got. Also, what do you mean by "exact answers"? If my memory serves, "integer" programming might be necessary if you want, for example, the optimal number of machines needed to satisfy the constraint in a production model. (i.e. you can't have 2.57 machines)

For example, if I input 5 variables x 2 constraints, then input the values
Quote:Max: 0 36 24 0 6
then
6 2 1 0 0 = 11
0 28 -1 6 0 = 31
it will output my answer as for x5=5.1667.
This is close to correct, but I need it to be 5.16666666667 so that I can convert that to 31/6 (the correct answer option on a piece of homework I'm working on). When I convert 5.1667 to a fraction it's 51667/1000.

There may be another way around this, I'm new to the prime and programming so sorry if it's not making much sense or if I'm overlooking a simple setting to fix it.
Ah yes, a 'homework assignment' where exact answers matter. In the real world, an LP problem, or other algorithm for that matter, is bound not only by the constraints applied to the variables but also by the precision and accuracy of the input data. Often these data are either forecasts or averages with only a few significant digits, neither of which would support an answer out to 12 places. Besides, a repeating decimal like .1666...7 is best regarded as just plain one-sixth and the same goes for the other repeating-series answers.

If it is any comfort, I had the same frustration back in grad-school cranking out Simplex solutions by doing the matrix math by hand. A fraction like '1/3' says all that can be said about the data at that point in the computation and using decimals makes it harder.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Simplex Program - markelg - 02-28-2016, 05:15 PM
RE: Simplex Program - dbbotkin - 02-28-2016, 06:18 PM
RE: Simplex Program - markelg - 02-28-2016, 06:27 PM
RE: Simplex Program - dbbotkin - 02-28-2016 11:29 PM
RE: Simplex Program - fhub - 03-01-2016, 05:48 PM
RE: Simplex Program - dbbotkin - 03-01-2016, 06:30 PM
RE: Simplex Program - fhub - 03-01-2016, 06:39 PM
RE: Simplex Program - Gerson W. Barbosa - 03-01-2016, 11:23 PM
RE: Simplex Program - DrD - 02-28-2016, 07:24 PM
RE: Simplex Program - markelg - 02-28-2016, 08:23 PM
RE: Simplex Program - DrD - 02-28-2016, 11:45 PM
RE: Simplex Program - markelg - 02-29-2016, 05:14 AM
RE: Simplex Program - DrD - 02-29-2016, 10:23 AM
RE: Simplex Program - markelg - 02-29-2016, 05:52 PM
RE: Simplex Program - Han - 02-29-2016, 12:54 AM
RE: Simplex Program - informach - 03-02-2016, 11:47 PM
RE: Simplex Program - cclinus - 10-08-2016, 05:00 AM
RE: Simplex Program - cclinus - 11-11-2016, 02:53 PM
RE: Simplex Program - cclinus - 11-19-2016, 10:59 AM
RE: Simplex Program - cclinus - 11-26-2016, 07:57 AM
RE: Simplex Program - cclinus - 12-01-2016, 01:35 PM
RE: Simplex Program - cclinus - 12-02-2016, 01:25 PM
RE: Simplex Program - cclinus - 12-09-2016, 01:49 PM
RE: Simplex Program - jrozsas - 12-09-2016, 04:35 PM
RE: Simplex Program - cclinus - 12-10-2016, 05:30 AM
RE: Simplex Program - jrozsas - 12-10-2016, 12:40 PM
RE: Simplex Program - cclinus - 12-10-2016, 01:17 PM
RE: Simplex Program - jrozsas - 12-12-2016, 08:20 AM
RE: Simplex Program - cclinus - 12-12-2016, 03:00 AM
RE: Simplex Program - cclinus - 12-17-2016, 05:12 AM



User(s) browsing this thread: 2 Guest(s)