Simplex Algorithm
|
11-21-2023, 02:05 PM
(This post was last modified: 11-21-2023 05:03 PM by Albert Chan.)
Post: #39
|
|||
|
|||
RE: Simplex Algorithm
(11-21-2023 08:36 AM)ftneek Wrote: Reminder, simplex_core is able to continue iteration on a tableau from any stage. I don't know this requirement. Easy fix. '+' = added, '-' = subtracted simplex() Wrote:IF c > art-(n-=1) THEN continue END simplex_core() Wrote:- IF art THEN /* add artrow */ For efficiency sake, simplex_core assumed pivots are all 1's This is why my version 4 get 20% speedup running test_simplex(). We can add another wrapper to turn pivots to 1, say, call this simplex2 Code: simplex2(a,bv,v,art,ign):= ftneek Wrote:Current simplex_core > simplex2([[2,4,-1,0,0,22],[3,2,0,-1,0,20],[4,5,0,0,-1,40],[6,5,0,0,0,0]],{3,4,5},5,0,0) [320/7,[20/7,40/7,46/7,0,0],[[0,0,1,6/7,-8/7,46/7],[1,0,0,-5/7,2/7,20/7],[0,1,0,4/7,-3/7,40/7],[0,0,0,10/7,3/7,-320/7]],{3,1,2}] These make simplex_core() restartable at any stage. And, run very fast. BTW, is above tableau in standard form? Should all constraints be negated? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)