Starting from:

$25

ORL-Lab 3 Solved

LAB QUESTIONS ON SIMPLEX METHOD

Instructions: Make a menu driven program with the following options (a)

List of all BFS (b) Number of Iterations to solve the problem (c) List of all Non-basic variables along with net evaluations in ith (user input) iteration (d) List of Basic variables along with min ratios in ith iteration (e) simplex table of ith (user input) iteration (f) optimal solution (if exists otherwise generate report showing reason for infeasibility, unboundedness, alternative optimum etc.)

FOLLOW THE INSTRUCTIONS ABOVE CAREFULLY

Consider the following LPP:

                                                            maxcTx         s.to Ax = b,x ≥ 0,bi ≥ 0

where c = (c1,c2,...,cn), a column vector. A is a m×n real matrix (aij), i = 1,2,...,m;j =

1,2,....,n

b = (b1,b2,...,bm). x = (1,2,...,n).

1.    Write code to express any LPP in standard form as above using slack/surplusvariables.

2.    Write code to print

•    a(j) = col(a1j,a2j,...,amj)

•    A = [a(1),a(2),...,a(j),...a(n)]

•    B = (b(1),b(2),...,b(m)), which is basis matrix.

•    Basic solution xB = B−1b = col(xBi,i = 1,2,...,m)

•    cB = col(cB1,cB2,...,cBm), cBi being the coefficient of basic variable xBi,i = 1,2,...,m in the objective function.

•    y(j) = col(y1j,y2j,...,yij,...,ymj) = B−1a(j),j = 1,2,...,n

•    z(xB) = cTBxB and zj = cTBy(j),j = 1,2,...,n

3.    Write code to calculate zj − cj for all j.

4.    Write code to determine pivot element and minimum ratio. Declare pivot row andpivot column.

5.    Write code to revise the simplex table and complete one iteration. Then print nextsolution, objective value.

6.    Write code to solve the following LPP by SIMPLEX method.

                                                                     max        s.to Ax ≤ b,xj ≥ 0,bi ≥ 0

7.    Test the following numerical problems using your code.

(A)     MAX Z = 5x1 + 10x2 + 8x3 subject to

3x1 + 5x2 + 2x3 ≤ 60

4x1 + 4x2 + 4x3 ≤ 72 2x1 + 4x2 + 5x3 ≤ 100 and x1,x2,x3 ≥ 0

(B)     MAX Z = 4x1 + 3x2 subject to

2x1 + x2 ≤ 1000 x1 + x2 ≤ 800 x1 ≤ 400 x2 ≤ 700 and x1,x2 ≥ 0

(C)      MAX Z = 3x1 + 3x2 + 2x3 + x4 subject to

2x1 + 2x2 + 5x3 + x4 ≤ 12 3x1 + 3x2 + 4x3 ≤ 11

and x1,x2,x3,x4 ≥ 0

(D)     MAX Z = 3x1 + 5x2 + 4x3 subject to

2x1 + 3x2 ≤ 8

2x2 + 5x3 ≤ 10 3x1 + 2x2 + 4x3 ≤ 15 and x1,x2,x3 ≥ 0

(E)      MIN Z = 3x1 + 3x2 + 2x3 - x4 subject to

2x1 + 2x2 + 5x3 + x4 ≥ 43

3x1 - 3x2 + 4x3 ≥ 11 4x1 - 2x2 + 3x3 - x4 ≥ 25 and x1,x2,x3,x4 ≥ 0

(F)      MAX Z = 6x1 + 4x2 subject to

2x1 + 3x2 ≤ 30 3x1 + 2x2 ≤ 24 x1 + x2 ≥ 3

and x1,x2 ≥ 0

More products