ORL Lab 3 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

Rate this product

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

  1. Test the following numerical problems using your code.
  • MAX Z = 5×1 + 10×2 + 8×3 subject to

3×1 + 5×2 + 2×3 ≤ 60

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

  • MAX Z = 4×1 + 3×2 subject to

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

  • MAX Z = 3×1 + 3×2 + 2×3 + x4 subject to

2×1 + 2×2 + 5×3 + x4 ≤ 12 3×1 + 3×2 + 4×3 ≤ 11

and x1,x2,x3,x4 ≥ 0

  • MAX Z = 3×1 + 5×2 + 4×3 subject to

2×1 + 3×2 ≤ 8

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

  • MIN Z = 3×1 + 3×2 + 2×3 – x4 subject to

2×1 + 2×2 + 5×3 + x4 ≥ 43

3×1 – 3×2 + 4×3 ≥ 11 4×1 – 2×2 + 3×3 – x4 ≥ 25 and x1,x2,x3,x4 ≥ 0

  • MAX Z = 6×1 + 4×2 subject to

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

and x1,x2 ≥ 0