Or Assignment Final
Or Assignment Final
Or Assignment Final
Individual Assignment I
By: -
Name ID NO
1. Misganaw Engdasew BDU 1501565
Profit ($) 3 5
Solution:-
Step1:-
Determine Decision Variables: - These are the variables, whose quantitative values are to be found
from the solution of the model so as to maximize or minimize the objective function. The decision
variables are usually denoted by x1, x2, x3 … xn. It may be controllable or uncontrollable.
Controllable variables are those, whose values are under control of the decision makers.
Uncontrollable variables are those, whose values are not under control. Let x1 and x2 be the
number of units produced product X1 and X2 respectively. Therefore, x1 and x2 be treated as
decision variables.
1
Step 2:-
Determine Objective Function: - It is the determinants of quantity either to be maximized or to
be minimized. An objective Function must include all the possibilities with profit or cost
coefficient per unit of output. It is denoted by Z. The objective function can be stated as
Max Z= 3x1 + 5x2
Step 3:-
Constraints are a set of functional equalities or inequalities that represent physical, economic,
technological, legal, ethical, or other restrictions on what numerical values can be assigned to the
decision variables. The limitations on resource availability.
Subject To:-
X1 + 2X2 ≤ 2000
X1 + X2 ≤ 1500
X2≤ 600
X1; X2 ≥ 0
Find the Graph of the above given constraints by treating each inequality as equality
X1 + 2X2 ═ 2000
X1 + X2 ═ 1500
X2 ═ 600
Then find the value of X1 and X2 based on the given inequality constraint,
2
Step 4 :-
Find the value of objective function at each value of constraint , Means in the 1stconstrain , in
the 2nd constraint and in the 3rdconstrain
Z═ 3X1 + 5X2
Corner Point Z value
(0,0) 0
(1500,0) 4500
(0,600) 3000
(800,600) 5400
Therefor the optimal product mix for product X1 is 1000 and product X2 is 500.
Step5:-
Finally locate the feasible region and the corner point’s asper the value of X1 and X2 in each
constraint and also draw the graph.
3
2. Based on question number 1, study the sensitivity of (1) the parameter related to the first
decision variable (X1) in the objective function and (2) the availability value (right side)
of the first constraint (machine A). In both cases, show for what range of values of the
parameters does the optimal solution remains optimal.
Solution
Step1:- Sensitivity analysis is a systematic study of how sensitive (duh) solutions are to (small)
changes in the data.
The basic idea is to be able to give answers to questions of the form:
If the objective function changes
If resources available change
If a constraint is added to the problem
Sensitivity of the parameter related to the first decision variable (X1) in the objective function
Draw the Iso profit line
Iso profit line: - ISO profit line is the line which passes through the points of optimal solution
(Maximum Profit). The slope of the iso-profit line depends on the objective function.
The objective function is: Z═ 3X1 + 5X2
How to find slope of iso-profit line: Equation of a straight line: y = mx + c
Where, m = slope of the straight line in our case, y means ' X2' and X means' X1'. C means 'Z'.
X2 = m. X1 + Z
Converting original objective function in this format:
Z═ 3X1 + 5X2
∴ X2 ═ −3𝑋1
5
+
𝑍
5
4
Step 2:- Let C1 be the contribution of profit for the Product X1 then the value of product X1 in
the current basis optimal point.
5
The slope of each Iso-profit line will be calculated as -C1/5
Therefore if the Iso profit line is flatter than machine A constraint, the optimal point D changes to
point C that is if -C1/5 > -1/2 or C1 < 5/2
The optimal point will be point C (800,600)
If the Iso-profit line is steeper than the machine “E” constraint, then the optimal solution will
change from point “C” to point “B”
6
The slope of Machine B constraint is -1
If – C1/5 < -1 or C1 > 5, then the current basis is no longer optimal and point B, (1500, 0),
will be optimal. Therefore Sensitivity of the parameter related to the first decision variable
(X1) in the objective function will be as follows , If all other parameters remain unchanged,
the current basis remains optimal in a range of 5/2 < C1 < 5 , Then range of optimality for
C1 is 5/2 ≤ 𝐶1 ≤ 5
Sensitivity of the availability value (right side) of the first constraint (machine A) Let b1 be
the number of available machine hour of machine A , Currently b1 = 2000
b1 < 1500 , If the Machine A constraint line goes too farther right than D the current basis is no
longer in the feasible region. (The new point F (900,600)) then 900 + 2(600) = 2100
b1 > 2100
If all other parameters remain unchanged, the current basis remains optimal if 1500 ≤
𝑏1 ≤ 2100
7
3. Use the primal simplex algorithm to solve the following LP and find all alternative
solutions (hint: read about alternative optimal solutions)
𝑋1 , 𝑋2 ≥ 0
Solution:-
Step 1: Formulate LPP Model
Max
Subject to: 5𝑋1 + 7𝑋2 ≤ 35
−𝑋1 + 2𝑋2 ≤ 2
𝑋1 , 𝑋2 ≥ 0
Step 2: Standardize the problem
Standard form is necessary because it creates an ideal starting point for solving the Simplex method
as efficiently as possible as well as other methods of solving optimization problems. To transform
a minimization linear program model into a maximization linear program model, simply multiply
both the left and the right sides of the objective function by -1.
0 ═ Z + 3X1 – 6X2
1 5𝑋1 + 7𝑋2 + 𝑆1 = 35 𝑆1 = 35
2 𝑆2 = 2
−𝑋1 + 2𝑋2 + 𝑆2 = 2
Introducing the slack variables, the equation in step II, Where S1 and S2 are the slack variables. An
auxiliary variable introduced to convert an inequality constraint to an equation.
8
Step 3:- Obtain the initial simplex tableau
To check optimality using the tableau, all values in the last row must contain values greater
than or equal to zero. If a value is less than zero, it means that variable has not reached its
optimal value.
0 Z 3 -6 0 0 1 0
1 S1 5 7 1 0 0 35
2 S2 -1 2 0 1 0 2
Entering Variable
0 Z 3 -6 0 0 1 0 -
Leaving
1 S1 5 7 1 0 0 35 5
Variabl
e
2 S2 -1 2 0 1 0 2 1
X2 – entering Variable
S2 - leaving Variable
ERO 2: - Replace row 0 with 6*(row 2 after ERO 1 = row 2’) + row 0 to create a zero
coefficient for X2 in row 0
9
ERO 3: - Replace row 1 with -7*(row 2) + row 1, to create a zero coefficient for X2 in row 1
0 Z 0 0 0 3 1 6
1 S1 17/2 0 1 -7/2 0 28
2 X2 -½ 1 0 ½ 0 1
From the above table all the values of non-basic variables in row 0” are 0. This value indicates that
the problem have need another (alternative) solution.
0 Z 0 0 0 3 1 6 -
2 X2 -1/2 1 0 1/2 0 1 -
The only non-basic variable left is X1 therefore X1 will be entering variable because X2 is
already made basic variable.
S1 - leaving variable, since the ratio value obtained is 3.29 which is for S1
10
ERO 1:- To make the coefficient of X1 1 in row 1, multiply row 1 by 1/8.5
ERO 2:- Replace row 2 with 0.5*(row 1 after ERO 1 = row 1) + row 2 to create a zero
coefficient for X2 in row 2
0 Z 0 0 0 3 1 6
X1 =0 Z = -3(0) + 6(1)
X2 =1 Z=6
X2 =2.647 Z=6
The Simplex method is an approach for determining the optimal value of a linear program by hand.
The method produces an optimal solution to satisfy the given constraints and produce a maximum
zeta value. A linear program is a method of achieving the best outcome given a maximum or
minimum equation with linear constraints.
The optimal objective value is 6. When the value of X1═ 0 and X2 ═ 1, when the X2 ═
2.6497 and X1 ═ 3.294 no change the value of objective function .
11
4. Solve the dual of the LP in question number three.
Step 1:- Convert Normal max (Primal) problem in to Normal min (Dual) problem.
𝑋1 , 𝑋2 ≥ 0 𝑌1 , 𝑌2 ≥ 0
Subject to 5𝑌1 − 𝑌2 ≥ −3
7𝑌1 + 2𝑌2 ≥ 6
𝑌1 , 𝑌2 ≥ 0
Convert the ‘≥’ type inequalities of given LPP, if any, into those of ‘≤’ type by multiplying the
corresponding constraints by -1 both sides to convert the ≥ to ≤.
Max
𝑍 = −35𝑌1 − 2𝑌2
−5𝑌1 + 𝑌2 ≤ 3
Subject to
−7𝑌1 − 2𝑌2 ≤ −6
𝑌1 , 𝑌2 ≥ 0
12
Step 3:- Introduce slack variables and standardize the problem
0 𝑍=0
𝑍 + 35𝑌1 + 2𝑌2 =0
1 −5𝑌1 + 𝑌2 + 𝑆1 =3 𝑆1 = 3
2 −7𝑌1 − 2𝑌2 + 𝑆2 = −6 𝑆2 = −6
0 Z 35 2 0 0 1 0
1 S1 -5 1 1 0 0 3
2 S2 -7 -2 0 1 0 -6
0 Z 35 2 0 0 1 0
1 S1 -5 1 1 0 0 3
2 S2 -7 -2 0 1 0 -6
13
ERO 1: - Multiply row 2 by -1/2
0 Z 28 0 0 1 1 -6
1 S1 -6 0 1 ½ 0 0
2 Y2 7/2 1 0 -1/2 0 3
14