Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Lecture-4 Linear Programming

Uploaded by

ALIYAN ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lecture-4 Linear Programming

Uploaded by

ALIYAN ALI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

1/10/2023

Modeling with Linear


Programming
By:
Ahsan Ahmed
(Lecturer, MED)

Operations Research
 It is a scientific approach to determine the optimum (best)
solution to a decision problem under the restriction of limited
resources, using the mathematical techniques to model,
analyze, and solve the problem.
 Operations research (OR) is an analytical method of problem-
solving and decision-making that is useful in the
management of organizations.
 The central objective of operations research is optimization,
i.e., "to do things best under the given circumstances."
 Optimization: Means maximization (of profit) or minimization
(of cost like expense).

Ahsan Ahmed 1
1/10/2023

Linear Programming
 Most Prominent Operation Research Technique.
 Linear Programming: is a technique, which optimizes linear
objective function under limited constraints.
 It is designed for models with linear objective and constraint
function.
 It is mostly used for allocation of resources.
 Linear Programming is a technique, designed to help
operation managers and make decisions relative to the trade
offs necessary to allocate resources.

Linear Programming
Objective Function:
 A mathematical expression in linear programming that
maximizes or minimizes some quantity often profit or cost but
any goal may be used.
Constraints:
 Restrictions that limit the degree which manager can pursue
an objective.
 May be expressed as inequalities.

Ahsan Ahmed 2
1/10/2023

Linear Programming
 A solution of the model is feasible if it satisfies all the
constraints.
 It is optimal if, in addition to being feasible, it yields the best
(maximum or minimum) value of the objective function.
 The optimum solution of a model is best only for that model. If
the model happens to represent the real system reasonably
well, then its solution is optimum also for the real situation.
 The number of constraints and decision variables in objective
function depends on the complexity of problem.
 Linear programming maximizes (or minimizes) a linear
objective function subject to one or more constraints.

Main Elements of Linear Programming


1) A set of decision variables:
If we have total revenue or profit, then it should be
maximum
If we have cost / expenses, then it should be minimum
Variables can be given any name:
For example: Prince Biscuit  𝑥 , Rio Biscuit  𝑥

2) Objective Function:
An equation that is needed to be optimized.
Example: Objective function: 𝑧 = 2𝑥 + 3𝑥 (here “z” can
be profit or revenue.
It tells how much should we produce 𝑥 and 𝑥 to
maximize “z”
6

Ahsan Ahmed 3
1/10/2023

Main Elements of Linear Programming


3) A set of constraints:
Constraints are the equations that solution must
satisfy.
Constraints are available resources / condition in terms
of mathematical equations (e.g. machine hours).

4) Variable bounds:
The variable usually have 2 bound / boundaries. (-,+)
Means they are not infinite.
Methods:
1- Graphical Method (only for two variables)
2- Two or more variables
7

Maximize “z”
Q) Max
Subjected to:
i-
ii- Structural Constraints
iii-
(non negativity constraints it means
our case is in 1st quadrant)

Ahsan Ahmed 4
1/10/2023

Maximize “z”
Solution:
Step # 1: Calculating the extreme points of each structural
constraints:
(i)
When then  (0,400)
When then  (1200, 0)

(ii)
When then  (0,500)
When then  (1000, 0)
9

Maximize “z”
Solution: (Cont.)
(iii)  (700,0)

Step # 2 : Plotting
these points in a graph

Step # 3 : Denoting the


feasible area / region
Feasible Area: “0abcd”

10

Ahsan Ahmed 5
1/10/2023

Maximize “z”
Solution: (Cont.)
Step # 4 : Optimum Solution (always lies on any
one of the vertices) Optimum Point
Point Coordinate 𝑧 = 5𝑥 + 8𝑥
0 (0 , 0) 𝑧 =5 0 +8 0 =0
a (0 , 400) 𝑧 = 5 0 + 8 400 = 3200
b (600 , 200) 𝑧 = 5 600 + 8 200 = 4600
intersection of i and ii
c (700 , 150) 𝑧 = 5 700 + 8 150 = 4700
d (700 , 0) 𝑧 = 5 700 + 8 0 = 3500
11

Maximize “z”
Solution: (Cont.)
Step # 5 : Result / Conclusion

Decision: To get maximum profit of Rs. 4700,


company will produce

12

Ahsan Ahmed 6
1/10/2023

The Reddy Mikks Company Model


Q) Reddy Mikks produces both interior and exterior paints from
two raw materials, M1 and M2.The following table provides the
basic data of the problem:

A market survey indicates that the daily demand for interior paint
cannot exceed that for exterior paint by more than 1 ton. Also, the
maximum daily demand for interior paint is 2 tons.
Reddy Mikks wants to determine the optimum (best) product mix
of interior and exterior paints that maximizes the total daily
profit.
13

The Reddy Mikks Company Model


Solution:
 Thus the variables of the model are defined as
𝑥 = Tons produced daily of exterior paint
𝑥 = Tons produced daily of interior paint

 To construct the objective function, note that the company wants


to maximize (i.e., increase as much as possible) the total daily
profit of both paints. Given that the profits per ton of exterior
and interior paints are 5 and 4 (thousand) dollars, respectively, it
follows that
Total profit from exterior paint = 5𝑥 ( thousand ) dollars
Total profit from interior paint = 4𝑥 ( thousand ) dollars

14

Ahsan Ahmed 7
1/10/2023

The Reddy Mikks Company Model


Solution:(Cont.)
 Letting z represent the total daily profit (in thousands of
dollars), the objective of the company is
𝑧 = 5𝑥 + 4𝑥

 Next, we construct the constraints that restrict raw material


usage and product demand. The raw material restrictions are
expressed verbally as

15

The Reddy Mikks Company Model


Solution:(Cont.)
 The daily usage of raw material Ml is 6 tons per ton of exterior
paint and 4 tons per ton of inte rior paint. Thus
Usage of raw material M1 by exterior paint = 6𝑥 tons/day
Usage of raw material M1 by interior paint = 4𝑥 tons/day

 Hence
Usage of raw material M1 by both paints = 6𝑥 + 4𝑥 tons/day
 In a similar manner,
Usage of raw material M2 by both paints = 1𝑥 + 2𝑥 tons/day

16

Ahsan Ahmed 8
1/10/2023

The Reddy Mikks Company Model


Solution:(Cont.)
 Because the daily availabilities of raw materials M1 and M2 are
limited to 24 and 6 tons, respectively, the associated restrictions are
given as
6𝑥 + 4𝑥 ≤ 24 (Raw material M1)
𝑥 + 2𝑥 ≤ 6 (Raw material M2)
 The first demand restriction stipulates that the excess of the
daily production of interior over exterior paint, 𝑥 − 𝑥 , should not
exceed 1ton, which translates to
𝑥 − 𝑥 ≤ 1 (Market Supply)
 The second demand restriction stipulates that the maximum daily
demand of interior paint is limited to 2 tons, which translates to
𝑥 ≤ 2 (Demand Limit)
17

The Reddy Mikks Company Model


Solution:(Cont.)
 An implicit (or "understood-to-be") restriction is that variables 𝑥
and 𝑥 cannot assume negative values. The nounegativity
restrictions, 𝑥 ≥ 0, 𝑥 ≥ 0, account for this requirement.
 The Complete Reddy Mikks model is
Maximize 𝑧 = 5𝑥 + 4𝑥
Subjected to
6𝑥 + 4𝑥 ≤ 24 -------------(1)
𝑥 + 2𝑥 ≤ 6 -------------(2)
𝑥 −𝑥 ≤1 -------------(3)
𝑥 ≤2 -------------(4)
𝑥 ,𝑥 ≥0 -------------(5)
18

Ahsan Ahmed 9
1/10/2023

The Reddy Mikks Company Model


Solution:(Cont.)
 Any values of 𝑥 and 𝑥 that satisfy all five constraints constitute a
feasible solution. Otherwise, the solution is infeasible.
 But the goal of the problem is to find the best feasible solution, or
the optimum, that maximizes the total profit.
Step # 1: Calculating the extreme points of each structural
constraints:
 For eq. 1: 6𝑥 + 4𝑥 ≤ 24 when 𝑥 = 0, 𝑥 = 6  (0,6)
when 𝑥 = 0, 𝑥 = 4  (4,0)
 For eq. 2: 𝑥 + 2𝑥 ≤ 6 when 𝑥 = 0, 𝑥 = 3  (0,3)
when 𝑥 = 0, 𝑥 = 6  (6,0)

19

The Reddy Mikks Company Model


Solution:(Cont.)
 For eq. 3: 𝑥 − 𝑥 ≤ 1 when 𝑥 = 0, 𝑥 = 1  (0,1)
when 𝑥 = 0, 𝑥 = −1  (-1,0)

 For eq. 4: 𝑥 ≤ 2  (0,2)

Step # 2 : Plotting these points in a graph (which is available in the


next slide)

20

Ahsan Ahmed 10
1/10/2023

The Reddy Mikks Company Model

21

The Reddy Mikks Company Model


Solution:(Cont.)
Step # 3 : Determination of the Feasible Solution Space
The feasible area is “ ABCDEF ”
Step # 4 : Determination of the Optimum Solution:
Point Coordinate 𝑧 = 5𝑥 + 4𝑥
A (0 , 0) 𝑧 =5 0 +4 0 =0
B (4 , 0) 𝑧 = 5 4 + 4 0 = 20
C (3, 1.5) 𝑧 = 5 3 + 4 1.5 = 21
D (2 , 2) 𝑧 = 5 2 + 4 2 = 18
E (1 , 2) 𝑧 = 5 1 + 4 2 = 13
F (0,1) 𝑧 =5 0 +4 1 =4

22

Ahsan Ahmed 11
1/10/2023

The Reddy Mikks Company Model


Solution:(Cont.)
Step # 5 : Result / Conclusion

Decision: To get maximum profit of $ 21,000, company will produce a


daily product mix of 3 tons of exterior paint and 1.5 tons of interior
paint.
-X-

23

Note for Considering regions

 If a𝑥 + 𝑏𝑥 ≤ 𝑐 (𝑏𝑒𝑙𝑜𝑤 𝑡ℎ𝑒 𝑙𝑖𝑛𝑒)

 If a𝑥 + 𝑏𝑥 ≥ 𝑐 (𝑎𝑏𝑜𝑣𝑒 𝑡ℎ𝑒 𝑙𝑖𝑛𝑒)

 If a𝑥 + 𝑏𝑥 ≤ 0 (𝑎𝑏𝑜𝑣𝑒 𝑡ℎ𝑒 𝑙𝑖𝑛𝑒 𝑝𝑎𝑠𝑠𝑖𝑛𝑔 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 𝑜𝑟𝑖𝑔𝑖𝑛)

 If a𝑥 + 𝑏𝑥 ≥ 0 (𝑏𝑒𝑙𝑜𝑤 𝑡ℎ𝑒 𝑙𝑖𝑛𝑒 𝑝𝑎𝑠𝑠𝑖𝑛𝑔 𝑡ℎ𝑟𝑜𝑢𝑔ℎ 𝑜𝑟𝑖𝑔𝑖𝑛)

24

Ahsan Ahmed 12
1/10/2023

Minimization (Diet Problem) Model


Q) Ozark Farms uses at least 800 lb of special feed daily. The
special feed is a mixture of corn and soybean meal with the
following compositions:

The dietary requirements of the special feed are at least 30%


protein and at most 5% fiber.
Ozark Farms wishes to determine the daily minimum-cost feed
mix.

25

Minimization (Diet Problem) Model


Solution:
 Thus the decision variables of the model are defined as
𝑥 = lb of corn in the daily mix
𝑥 = lb of soybean meal in the daily mix
 The objective function seeks to minimize the total daily cost (in
dollars) of the feed mix and is thus expressed as
Minimize 𝑧 = 0.3𝑥 + 0.9𝑥
 The constraints of the model reflect the daily amount needed and
the dietary requirements. Because Ozark Farms needs at least
800 lb of feed a day, the associated constraint can be ex pressed
as
𝑥 + 𝑥 ≥ 800

26

Ahsan Ahmed 13
1/10/2023

Minimization (Diet Problem) Model


Solution: (Cont.)
 As for the protein dietary requirement constraint, the amount
of protein included in 𝑥 lb of corn and 𝑥 lb of soybean meal is
(0.09𝑥 + 0.6𝑥 ) lb. This quantity should equal at least 30% of the
total feed mix (𝑥 + 𝑥 ) lb-that is,
0.09𝑥 + 0.6𝑥 ≥ 0.3(𝑥 + 𝑥 )
 In a similar manner, the fiber requirement of at most 5% is
constructed as
0.02𝑥 + 0.06𝑥 ≤ 0.05(𝑥 + 𝑥 )
 The constrain ts are simplified by moving the terms in 𝑥 and 𝑥
to the left-hand side of each inequality, leaving only a constant
on the right-hand side. The complete model thus becomes

27

Minimization (Diet Problem) Model


Solution:(Cont.)
Minimize 𝑧 = 0.3𝑥 + 0.9𝑥
Subjected to
𝑥 + 𝑥 ≥ 800 -------------(1)
0.21𝑥 − 0.30𝑥 ≤ 0 -------------(2)
0.03𝑥 − 0.01𝑥 ≥ 0 -------------(3)
𝑥 ,𝑥 ≥0 -------------(4)

Step # 1: Calculating the extreme points of each structural


constraints:
 For eq. 1: 𝑥 + 𝑥 ≥ 800 when 𝑥 = 0, 𝑥 = 800  (0,800)
when 𝑥 = 0, 𝑥 = 800  (800,0)
28

Ahsan Ahmed 14
1/10/2023

Minimization (Diet Problem) Model


Solution:(Cont.)
 For eq. 2: 0.21𝑥 − 0.30𝑥 ≤ 0 (This constraint passes though the
origin so to plot the associated lines, we need one additional point,
which can be obtained by assigning a value to one of the variables
and then solving for the other variable)
Taking, 𝑥 = 0, 𝑥 = 0  (0,0)
Taking, 𝑥 = 200, 𝑥 = 140  (200,140)
 For eq. 3: 0.03𝑥 − 0.01𝑥 ≥ 0 (This constraint also passes though
the origin so to plot the associated lines, we need one additional
point, which can be obtained by assigning a value to one of the
variables and then solving for the other variable)
Taking, 𝑥 = 0, 𝑥 = 0  (0,0)
Taking, 𝑥 = 100, 𝑥 = 300  (100,300)
29

Minimization (Diet Problem) Model


Solution:(Cont.)
Step # 2 : Plotting these points
in a graph

Step # 3 : Determination of the


Feasible Solution Space
The feasible unbounded area
has been highlighted having
corner points A and B.

30

Ahsan Ahmed 15
1/10/2023

Minimization (Diet Problem) Model


Solution:(Cont.)
Step # 4 : Determination of the Optimum Solution:
Point Coordinate 𝑧 = 0.3𝑥 + 0.9𝑥
A (200 , 600) 𝑧 = 0.3 200 + 0.9 600 = 600
B (470.6 , 329.4) 𝑧 = 0.3 470.6 + 0.9 329.4 = 437.64

Step # 5 : Result / Conclusion

Decision: The associated minimum cost of the feed mix is $437.65 per
day at 𝑥 = 470.6 and 𝑥 = 329.4.

31

Furniture Model
Q) Aadat Company uses 03 machines to construct tables and
chairs as follows
Machine Chairs (hrs) Tables (hrs) Available hrs / week
M1 3 3 36
M2 5 2 50
M3 2 6 60

If Aadat company gets a profit of $20 / chair and $30 / table. Then
how should Aadat company schedule his production in order to get
the maximum profit.

32

Ahsan Ahmed 16
1/10/2023

Furniture Model
Solution
 The Aadat company model is
Maximize 𝑧 = 20𝑥 + 30𝑥
Subjected to
3𝑥 + 3𝑥 ≤ 36 -------------(1)
5𝑥 + 2𝑥 ≤ 50 -------------(2)
2𝑥 + 6𝑥 ≤ 60 -------------(3)
𝑥 ,𝑥 ≥0 -------------(4)

33

Furniture Model
Solution: (Cont.)
Step # 1: Calculating the extreme points of each structural
constraints:
 For eq. 1: 3𝑥 + 3𝑥 ≤ 36 when 𝑥 = 0, 𝑥 = 12  (0,12)
when 𝑥 = 0, 𝑥 = 12  (12,0)

 For eq. 2: 5𝑥 + 2𝑥 ≤ 50 when 𝑥 = 0, 𝑥 = 25  (0,25)


when 𝑥 = 0, 𝑥 = 10  (10,0)

 For eq.3: 2𝑥 + 6𝑥 ≤ 60 when 𝑥 = 0, 𝑥 = 10  (0,10)


when 𝑥 = 0, 𝑥 = 30  (30,0)

34

Ahsan Ahmed 17
1/10/2023

Furniture Model
Solution: (Cont.)
Step # 2 : Plotting these points in
a graph

Step # 3 : Determination of the


Feasible Solution Space
The feasible area : 0abcd

35

Furniture Model
Solution:(Cont.)
Step # 4 : Determination of the Optimum Solution:
Point Coordinate 𝑧 = 20𝑥 + 30𝑥
o (0 , 0) 𝑧 = 20 0 + 30 0 = 0
a (0 , 10) 𝑧 = 20 0 + 30 10 = 300
b (3, 9) 𝑧 = 20 3 + 30 9 = 330
c (8.67 , 3.33) 𝑧 = 20 8.67 + 30 3.33 = 273.3
d (10 , 0) 𝑧 = 20 10 + 30 0 = 200

Step # 5 : Result / Conclusion


Decision: Aadat Company can get a max. profit of $330 by selling 3
chairs and nine tables
36

Ahsan Ahmed 18

You might also like