Post Reply 
Simplex method in prime how to use the constrains maximise s.t. constraints.
11-11-2023, 07:21 PM (This post was last modified: 11-12-2023 04:29 PM by ftneek.)
Post: #53
RE: Simplex method in prime how to use the constrains maximise s.t. constraints.
(11-11-2023 06:59 PM)Albert Chan Wrote:  
(11-11-2023 12:39 PM)Albert Chan Wrote:  Third way is to remove all "=" constraints, and "simplex" sub-matrix.

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],... ]\)

Nice. I'm curious if there are any computation savings from this, or is it essentially pre computing some things before calling simplex? It seems fine for the Primal system. But if you consider the Dual system, the 15/7 may or may not lead you to an incorrect solution.

(11-11-2023 04:54 AM)ftneek Wrote:  > simplex2([[3,2,1,1,0,10],[2,5,3,0,1,15],[-2,-3,-4,0,0,0],[0,0,0,1,1,0]],{4,5},5,2,0)
[-130/7,[15/7,0,25/7,0,0],...]
This problem should have one solution at x1=15/7,x2=0,x3=25/7.

For anyone interested, I made a thread in the software forum to discuss the simplex program. Thanks to Albert, there is already a small patch that allows for numeric input.

- neek
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. - ftneek - 11-11-2023 07:21 PM



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