A) Graphical Method
Suppose that the following objective function is to be maximized subject to constraints:
Maximize 4y1 + 5y2
Where, y1 and y2 are two commodities. The 4 and 5 represent the price per unit of y1 and y2, respectively. The constraints are:
Resource or input x1: 2y1 + 1y2 ≤ 12
Resource or input x2: 1y1 + 2y2 ≤ 16
:y1, y2 ≥ 0
There are 12 units of resource or input x1 available and 16 units of resource or input x2 available. Units of commodity y1 each require 2 units of x1 and 1 unit of x2. Units of commodity x2 each require 1 unit of x1 and 2 units of x2.
All the available X1 and X2 need not be used.
Y1 |
Y2 |
|
2 |
1 |
X1 |
1 |
2 |
X2 |
If only Y1 were produced, 12/2 = 6 units units could be produced
If only Y2 were produced, 12/1 = 12 units units could be produced
The slope of the first constraint would be 12/6 = 2:1
If only Y1 were produced, 16/1 = 16 units could be produced
If only Y2 were produced, 16/2 = 8 units could be produced
The slope of the second constraint would be 8/16 = 1:2
The area inside both constraints represents the feasible solution area.
The price ratio for this problem of 4/5 falls within this range. If this combination were produced, revenue would be 4*2.67 + 5*6.67 = 44. The $44 represents the maximum revenue possible given the price ratios and the two constraints.
B) Simplex Method
Suppose that the following objective function is to be maximized subject to constraints:
Maximize 4y1 + 5y2
Where, y1 and y2 are two commodities. The 4 and 5 represent the price per unit of y1 and y2, respectively. The constraints are:
Resource or input x1: 2y1 + 1y2 ≤ 12
Resource or input x2: 1y1 + 2y2 ≤ 16
y1, y2 ≥ 0
There are 12 units of resource or input x1 available and 16 units of resource or input x2 available. Units of commodity y1 each require 2 units of x1 and 1 unit of x2. Units of commodity x2 each require 1 unit of x1 and 2 units of x2.
Here, find two slack variables (s1 and s2) which are used to convert inequalities into equalities.
One is required for each inequality constraint. The coefficients of slack variables are initially zeros in the objective function. The coefficient on a slack variable that appears in an equation is 1, and the coefficient on the slack variables not appearing in an equation is zero. At the start, no y1 or y2 is produced, and therefore the value of the objective function is zero.
2y1 + 1y2 + 1s1 + 0s2 = 12 ……..eqn 1
1y1 + 2y2 + 0s1 + 1s2 = 16 ………eqn 2
4y1 + 5y2 + 0s1 + 0s2 = 0 ……….eqn 3
The problem can be rewritten as follows:Where, RHS = Right hand side
|
Y1 |
Y2 |
S1 |
S2 |
RHS |
X1 |
2 |
1 |
1 |
0 |
12 |
X2 |
1 |
2 |
0 |
1 |
16 |
Objective |
4 |
5 |
0 |
0 |
0 |
- Now higher price of objective function is chosen i.e. y2 could be chosen. Thus, y2 becomes what is called the pivotal column.
- Since the objective function is to be maximized, the most limiting input must be determined.
- Each unit of y2 requires 2 units of x2 and 16 units of x2 are available. Each unit of y2 requires 1 unit of x1 and 12 units of x1 are available. Thus, x2 is most limiting (16/2 = 8<12/1 = 12). The row labeled x2 becomes what is called the pivotal row.
- Intersection of pivotal column and pivotal row is 2 and use this value to divide pivotal row.
- This results in a table with a new row nx2.
|
Y1 |
Y2 |
S1 |
S2 |
RHS |
X1 |
2 |
1 |
1 |
0 |
12 |
nX2 |
½=0.5 |
2/2=1 |
0/2=0 |
½=0.5 |
16/2=8 |
Objective |
4 |
5 |
0 |
0 |
0 |
- The new row nx1 is found by subtracting nx2 row from the old x1 row.
|
Y1 |
Y2 |
S1 |
S2 |
RHS |
nX1 |
1.5 |
0 |
1 |
-0.5 |
4 |
nX2 |
½=0.5 |
1 |
0 |
0.5 |
8 |
Objective |
4 |
5 |
0 |
0 |
0 |
- A similar approach is used on the objective function row. The new element for the intersection of the objective row and column y1 is 4-0.5*5 = 1.5.
- The new element for the intersection of the objective row and the right-hand side is 0-8*5 = -40. This number is the negative of the current objective function value. The completed matrix is:
|
Y1 |
Y2 |
S1 |
S2 |
RHS |
nX1 |
1.5 |
0 |
1 |
-0.5 |
4 |
nX2 |
0.5 |
1 |
0 |
0.5 |
8 |
Objective |
1.5 |
0 |
0 |
-2.05 |
-40 |
- If all the numbers appearing in the columns representing outputs are 0 or negative, the optimal solution has been found. In this example, the value at the intersection of the y1 column and the new objective row is positive; indicating that production of the y1 will further increase profits.
- Following the same procedure, a new table is constructed. However, this time the entering row is y1. The resultant new table is:
|
Y1 |
Y2 |
S1 |
S2 |
RHS |
nnX1 |
1 |
0 |
-0.67 |
-0.33 |
2.67 |
nnX2 |
0 |
1 |
-0.33 |
0.67 |
6.67 |
Nn Objective |
0 |
0 |
-1.00 |
-2.00 |
-44 |
- The optimal solution has been found that maximizes revenue from the sale of y1 and y2 subject to the two constraints.
- The 2.67 and 6.67 represent the output of y1 and y2, respectively.
- The – 44.00 is the negative of the objective function value. The solution produces $44 of revenue.