Post Reply 
Simplex method in prime how to use the constrains maximise s.t. constraints.
11-15-2023, 08:00 PM
Post: #56
RE: Simplex method in prime how to use the constrains maximise s.t. constraints.
(11-15-2023 07:23 AM)parisse Wrote:  ... translate the call simplex_reduce(A,b,c) to simplex_reduce(tran(-A),-c,-b)?
Quote:2x + 4y >= 22
3x + 2y >= 20
4x + 5y >= 40
6x + 5y >= cost

Not quite. Cost is considered as constraint too. Transpose whole matrix for dual setup.

\(\left(\begin{array}{ccc}
2 & 4 & 22 \\
3 & 2 & 20 \\
4 & 5 & 40 \\
6 & 5 & cost
\end{array}\right)
\quad → \quad
\left(\begin{array}{cccc}
2 & 3 & 4 & 6 \\
4 & 2 & 5 & 5 \\
22 & 20 & 40 & cost
\end{array}\right)
\)

Dual setup, '≥' turned '≤', i.e it search for max(cost), same as simplex_reduce()

Note that original cost coefficients goes to column b
If some of them are negative, we would still get problem of column b < 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Simplex method in prime how to use the constrains maximise s.t. constraints. - Albert Chan - 11-15-2023 08:00 PM



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