Post Reply 
Simplex method in prime how to use the constrains maximise s.t. constraints.
11-11-2023, 06:59 PM
Post: #52
RE: Simplex method in prime how to use the constrains maximise s.t. constraints.
(11-11-2023 12:39 PM)Albert Chan Wrote:  Third way is to remove all "=" constraints, and "simplex" sub-matrix.
(11-11-2023 01:43 AM)Albert Chan Wrote:  > m := [[3,2,1,10], [2,5,3,15], [-2,-3,-4,0]]
> m[1] /= m[1][1]
> m := pivot(m,1,1)
> m[2] /= m[2][2]
> m := pivot(m,2,2)

\(\left(\begin{array}{cccc}
1 & 0 & \frac{-1}{11} & \frac{20}{11} \\
0 & 1 & \frac{7}{11} & \frac{25}{11} \\
0 & 0 & \frac{-25}{11} & \frac{115}{11}
\end{array}\right) \)

We can solve it all, directly!
Think of (x, y) as the slack variables, both "=" constraints turned "≤"

> simplex_le(m, -∞)

\(\displaystyle
[\frac{-130}{7},[\frac{15}{7},0,\frac{25}{7},\frac{15}{7},0],\left(\begin{array}{cccccc}
1 & \frac{1}{7} & 0 & 1 & \frac{1}{7} & \frac{15}{7} \\
0 & \frac{11}{7} & 1 & 0 & \frac{11}{7} & \frac{25}{7} \\
0 & \frac{25}{7} & 0 & 0 & \frac{25}{7} & \frac{130}{7}
\end{array}\right) ]\)
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-11-2023 06:59 PM



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