# 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.)

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