Simplex Algorithm
|
11-20-2023, 03:34 PM
(This post was last modified: 11-20-2023 04:17 PM by Albert Chan.)
Post: #35
|
|||
|
|||
RE: Simplex Algorithm
Question about simplex_int(a,bv,v,art,ign,integers)
Code: // Step 3: solve with new constraint From documentation, v is the number of variables (true + slack + artificial) Since we keep addding slack variables to a, should (v+1) be more? However, v is only used for simplex_core sol(a,v), so I guess doc is wrong. It may meant to solve v leftmost variables. And, why the +1? What about simplex_int last argument, what is integers? How to setup problem with it? I thought variable v is redundant = matrix columns - 1 Now that I know better, I am replacing art_row(v,art) as artrow(col,art) If v=col-1, both matched. If not, using columns is safer. Below will be on my next update. >artrow(col,art):=append(makelist(k->k>col-art,2,col),0); >artrow(9,2) → [0,0,0,0,0,0,1,1,0] |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)