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

Linear Programming

The document discusses linear programming and its applications. It provides objectives for understanding linear programming, defining the necessary components of a linear programming model including decision variables, objective function, constraints, and non-negativity constraints. It then gives steps for solving linear programming problems and provides an example problem. Finally, it explains how to represent a linear programming model graphically and find the optimal solution for a maximization problem.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Linear Programming

The document discusses linear programming and its applications. It provides objectives for understanding linear programming, defining the necessary components of a linear programming model including decision variables, objective function, constraints, and non-negativity constraints. It then gives steps for solving linear programming problems and provides an example problem. Finally, it explains how to represent a linear programming model graphically and find the optimal solution for a maximization problem.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

GROUP II

CHAPTER 2

The Linear Programming


Prayer
RECAP
ENERGIZER…

4 PICS ONE WORD


Correct Answer…
P___R_____G
Correct Answer…
L_N__R
Correct Answer…
Objectives
● Understand and define linear programming
● Identify all necessary items that must be included in a model
● Write verbal statement of the objective function and each constraint
● Define the decision variables
● Write the objective function in terms of the decision variables
● Write the constraints in terms of decision variables
● Makes a decision about the solution of the problem
Linear Programming

Also called Linear Optimization, a method to achieve the


best outcome in a mathematical model whose requirements
are presented by linear relationships.

It is a widely used mathematical modeling technique


to determine the optimum allocation of scarce resources
among competing demands.
Steps in Solving Linear Programming
Problems
Step 1: Identify the decision variables

Step 2: Formulate the objective function

Step 3: Write down the constraints

Step 4: Ensure that the decision variables are greater than or


equal to 0

Step 5: Solve the linear programming problem using either the


simplex or graphical method
Linear Programming in Business

Business use linear programming methods to determine the


best ways to increase profits and decrease operational costs,
thus, it is used to solve problems in many aspects of business
administration including:

● Production Planning

● Marketing Mix

● Product Distribution
Example of Problem that can be
Efficiently Solved Using L.P Technique

● A product Mix Problem

● Manufacturing Problem

● Advertising Application

● Portfolio Selection

● Staffing Problem
Linear Programming:
MODEL
FORMULATION
A linear programming model is
m ad e up o f s e v e r a l c o m m o n
components.
The model’s components include:

1. Decision Variables
2. Objective Function
3. Model Constraints
4. Non-negativity Constraints
Sample Problem
One kind of cake requires 200g of flour and
25g of fat, and another kind of cake requires
100 g of flour and 50 g of fat Find the
maximum number of cakes that can be
made from 5 kg of flour and 1 kg of fat
assuming that there is no shortage of the
other ingredients, used in making the cakes.
DECISION VARIABLES
● The variables should completely describe
the decision to be made by the management.

X= cake no.1
Y= cake no. 2
OBJECTIVE FUNCTION
● are linear mathematical relationships
that describes the firm’s objective in
terms of decision variables.

● The objective of the firm always consists


of either maximizing or minimizing some
value.
OBJECTIVE FUNCTION
● TFl = TFL of X + TFl of Y
TFL = 200X +
100Y

● TFA = TFA of X + TFA of Y


TFA = 25X + 50Y

Z =X
+Y
CONSTRAINTS
● are also linear relationships between
decision variables.

● They represent the restrictions placed on


the firm by the operating environment.
CONSTRAINTS
●200X + 100Y ≤ 5kg
200X + 100Y ≤ 5000g

●25X + 50Y ≤ 1kg


25gX + 50Y ≤ 1000
NON- NEGATIVITY CONSTRAINTS

● Both decision variables have rational sign


restrictions: because the values of variables
reflect numbers of toys made, we would
expect them not to be negative:

X, Y ≥ 0
Steps in LP Mathematical Formulation
1) Clearly define the decision variables
2) Construct the objective function
3) Formulate the constraints
LP Model Formulation
A Maximization Example
● Beaver Creek Pottery Company
● How many bowls and mugs should be produced to
MAXIMIZE profits given labor and materials constraints?
● Product resource requirements and unit profit:
LP Mathematical Formulation
LP Mathematical Formulation
LP Solutions
FEASIBLE SOLUTION - does not violate ANY of
the constraints

INFEASIBLE SOLUTION -violates at least one of


the constraints

OPTIMAL SOLUTION - solution with maximum


profit without violating the constraints
FEASIBLE SOLUTION
b=5; m=10
40(5)+50(10)=700
b+2m≤40 4b+3m≤120
5+2(10)≤40 4(5)+3(10)≤120
25≤40 50≤120
INFEASIBLE SOLUTION
b=10; m=20
40(10)+50(20)=1 400
b+2m≤40 4b+3m≤120
10+2(20)≤40 4(10)+3(20)≤120
50≤40 100≤120
OPTIMAL SOLUTION
b=24; m=8
40(24)+50(8)=1 360
b+2m≤40 4b+3m≤120
24+2(8)≤40 4(24)+3(8)≤120
40≤40 120≤120
GRAPHICAL SOLUTIONS OF
LP MODELS
● Graphical solution is limited to linear programming
models containing only two decision variables (can
be used with three variables but only with great
difficulty).

● Graphical methods provide visualization of how a


solution for a linear programming problem is
obtained.
GRAPHICAL SOLUTIONS OF
LP MODELS
● Can provide clearer understanding of how the
computer and mathematical solution approaches
presented in subsequent chapters work and, thus, a
better understanding of the solutions.

● The product mix model will be used to demonstrate


the graphical interpretation of a linear programming
problem.
EXAMPLE PROBLEM

Beaver creek pottery company’s attempt


to decide how many bowls and mugs to
produce daily, given limited amounts of
labor and clay. The complete linear
programming model was formulated as:
Figure 2.2 is a set of
coordinates for the
decision variables and ,
on which the graph of
our model will be
drawn. Note that only
the positive quadrant
is drawn (i.e., the
quadrant where x₁
and x₂ will always be
positive) because of
the nonnegativity
constraints,
x₁ ≥ 0 and x₂ ≥ 0.
1. Constraint lines are plotted as equations
The first step in drawing the graph of the
model is to plot the constraints on the graph.
This is done by treating both constraints as
equations (or straight lines) and plotting
each line on the graph.

(Line 1) x₁ + 2x₂ ≤ 40 hr. of labor


(Line 2) 4x₁ + 3x₂ ≤ 120 lb. of clay
1. Constraint lines are plotted as equations cont.

Let’s consider the labor constraint line first:


x₁ + 2x₂ = 40

A simple procedure for plotting this line is to determine


two points that are on the line and then draw a straight
line through the points. One point can be found by
letting x₁ = 0 and solving for x₂ :
(0) + 2x₂ = 40
x₂ = 20
Thus, one point is at the coordinates x₁ = 0 and x₂ = 20.
1. Constraint lines are plotted as equations cont.

A second point can be found by letting x₂ =


0 and solving for x₁ :
x₁ + 2(0) = 40
x₁ = 40

Now we have a second point, x₁ = 40, x₂ = 0


Thus, for the labor constraint, the first point is x₁
= 0 and x₂ = 20, and second point, x₁ = 40, x₂ =
0. This is Line 1.
1. Constraint lines are plotted as equations cont.

The line on the


g r a p h
representing this
equation is
d r a w n b y
connecting these
two points, as
shown in Figure
2.3.
1. Constraint lines are plotted as equations cont.

We draw the line for the clay constraint (Line 2) the


same way as the one for the labor constraint— by finding
two points on the constraint line and connecting them
with a straight line. First, let x₁ = 0 and solve for x₂ :

4(0) + 3x₂ = 120


x₂ = 40
Performing this operation results in a point, x₁ =0,
x₂ = 40. Next, we let x₂ = 0 and then solve for x₁ :
1. Constraint lines are plotted as equations cont.

4x₁ + 3(0) = 120


4x₁ = 120
x₁ = 30

This operation yields a second point, x₁ = 30, x₂ =


0.
Thus, for the clay constraint, the first point is
x₁ = 0, x₂ = 40, and second point, x₁ = 30, x₂ =
0. This is the Line 2.
Graphical Solution of a Maximization Model

Plotting these
points on the
g r a p h a n d
connecting them
with a line gives
the constraint
line and area for
clay, as shown in
Figure 2.5.
Graphical Solution of a Maximization Model

Combining the
two individual
graphs for both
labor and clay
(Figures 2.3 and
2.5) produces a
graph of the
model constraints,
as shown in
Figure 2.6.
The Optimal Solution Point

The second step


in the graphical
solution method is
to locate the
point in the
feasible solution
area that will
result in the
greatest total
profit.
The Solution Values
The third step in the graphical solution approach is to solve for the
values of x₁ and x₂ once the optimal solution point has been
found.
Point A is x₁ = 0 and x₂ = 20
Point C is x₁ = 30 and x₂ = 0
But what are the coordinates of point B?
It is possible to determine the x₁ and x₂ coordinates of point B
directly from the graph, as shown in 2.11. The graphical coordinates
corresponding to point B in Figure 2.11 are x₁ = 24 and x₂ = 8.
However, unless an absolutely accurate graph drawn, it is
frequently difficult to determine the correct solution directly from
the graph.
The Solution Values cont.
A more exact approach is to determine the solution values
mathematically once the optimal point on the graph has been
determined.
The values of x₁ and x₂ coordinates of point B can be found
by solving the two equations simultaneously:
First, we convert both equations to functions of x₁ :
x₁ + 2x₂ = 40
x₁ = 40 – 2x₂ and
4x₁ + 3x₂ = 120
4x₁ = 120 – 3x₂
x₁ = 30–(3x₂ /4)
The Solution Values cont.
Now, we let x₁ in the first equation equal x₁ in the second
equation:
40 –2x₂ = 30 – (3x₂ /4)
and solve for x₂ :
40 –2x₂ = 30 – (3x₂ /4)
[40 –2x₂ = 30 – (3x₂ /4]4
160 –8x₂ = 120 – 3x₂
8x₂ – 3x₂ = 160 – 120
5x₂ = 40
x₂ = 8
The Solution Values cont.
Substituting x₂ = 8 into either one of the original equation gives
a value for x₁ :
x₁ = 40 – 2x₂
x₁ = 40 – 2(8)
x₁ = 40 – 16
x₁ = 24
Thus, the coordinates for point B are x₁ = 24 and x₂ = 8
Substituting these values into objective function gives us the
following profit for point B:
Z = $40x₁ + $50x₂
Z = $40(24) + $50(8)
= $1,360
The Solution Values cont.
Point A (x₁ = 0, x₂= 20) will give us a profit of:
Z = $40x₁ + $50x₂
Z = $40(0) + $50(20)
= $1,000
Point C (x₁ = 30, x₂ = 0) will give us a profit of:
Z = $40x₁ + $50x₂
Z = $40(30) + $50(0)
= $1,200
Thus, the optimal solution is point B (x₁ = 24, x₂ = 8) which
will give us a maximum profit, Z, of $1,360
Solution at All Corner Points

Figure 2.12
s h o w s t h e
solution values
for all three
points, A, B, and
C, and the
amount of profit,
Z, at each point.
Slack Variables
A slack variable is a variable that is added to an inequality
constraint to transform it into an equality.
In our example, a slack variable would mean a portion of
unused resources, say, an unused labor or unused clay.
The complete linear programming model can be written in what
is referred to as standard form with slack variables as follows:
maximize Z = $40x₁ + $50x₂ + 0s₁ + 0s₂
subject to
x₁ + 2x₂ + s₁ = 40
4x₁ + 3x₂ + s₂ = 120
x₁ , x₂ , 0s₁ , 0s₂ ≥ 0
The Solution Values cont.
The solution values, including the slack at each solution point,
are summarized as follows:
Solution to get the slack variables
Solution:
Point A
Labor (hr.)
x₁ = 0 bowl
x₂ = 20 mugs

x₁ + 2x₂ + s₁ = 40 (constraint 1)
1(0) + 2(20) + s₁ = 40
40 + s₁ = 40
s₁ = 0
Solution to get the slack variables
Solution:
Point A
Clay (lb.)
x₁ = 0 bowl
x₂ = 20 mugs

4x₁ + 3x₂ + s₂ = 120 (constraint 2)


4(0) + 3(20) + s₂ = 120
60 + s₂ = 120
s₂ = 60
Solution to get the slack variables
Solution:
Point B
Labor (hr.)

x₁ = 24 bowls
x₂ = 8 mugs

x₁ + 2x₂ + s₁ = 40 (constraint 1)
24 + 2(8) + s₁ = 40
24 + 16 + s₁ = 40
40 + s₁ = 40
s₁ = 0
Solution to get the slack variables
Solution:
Point B
Clay (lb.)

x₁ = 24 bowls
x₂ = 8 mugs

4x₁ + 3x₂ + s₂ = 120 (constraint 2)


4(24) + 3(8) + s₂ = 120
96 + 24 + s₂ = 120
120+ s₂ = 120
s₂ = 0
Solution to get the slack variables
Solution:
Point C
Labor (hr.)

x₁ = 30 bowls
x₂ = 0 mug

x₁ + 2x₂ + s₁ = 40 (constraint 1)
30 + 2(0) + s₁ = 40
30 + s₁ = 40
s₁ = 10
Solution to get the slack variables
Solution:
Point C
Clay (lb.)

x₁ = 30 bowls
x₂ = 0 mug

4x₁ + 3x₂ + s₂ = 120 (constraint 2)


4(30) + 3(0) + s₂ = 120
120+ s₂ = 120
s₂ = 0
Slack Variable cont.

Figure 2.14
s h o w s t h e
g r a p h i c a l
solution of this
example, with
slack variables
included at each
solution point.
Sample problem # 2

One kind of cake requires 200 g of flour and


25g of fat, and another kind of cake requires
100 g of flour and 50 g of fat Find the
maximum number of cakes that can be made
from 5 kg of flour and 1 kg of fat assuming
that there is no shortage of the other
ingredients, used in making the cakes.
Sample problem # 2
Sample problem # 2

Maximize Z= X +Y

Subject to:
200x + 100y ≤ 5000 or 2x + y ≤ 50
25x + 50y ≤ 1000 or x + 2y ≤ 40
Also, x > 0 and y > 0

wherein
x is the number of first kind cake produced
y is the number of second kind cake produced
Sample problem # 2

2x + y = 50 2x + y = 50
2(0) + y = 50 2x + 0 = 50
Y = 50 2x = 50
0, 50 x=25
25, 0
X + 2y = 40
0 + 2y = 40 X + 2y = 40
2y= 40 X + 2(0) = 40
y=20 X = 40
0, 20 40, 0
Sample problem # 2
Sample problem # 2

● 2x + y + 50 (40 - 2y = 25 - (y/2) ) 2x + y = 50
2
2x = 50 - y 2x + 10 = 50
80 - 4y = 50 - y
X = 25 - (y/2) 2x = 50 -
● X + 2y = 40
80 - 50 = -y + 4y
30 = 3y 10
X = 40 - 2y 10 = y 2x = 40
X = 20
Sample problem # 2

Z = x + y.
Wherein z is the
maximum number of
cakes to produce.

● Z = 0 + 20 = 20
● Z = 20 + 10 = 30
● Z = 25 + 0 = 25
Solution to get the slack variables
Solution: Solution:
Point A Point A
Flour Fat
x = 0 first cake x = 0 first cake
y = 20 second cake y = 20 second cake

2x + y + S1 = 50 x + 2y + s2 = 40
2(0) + 20 + S1 = 50 2(0) + 20 + S2 = 40
20 + S1 = 20 + S2 =
50 40
` `
S1= 50 - 20 S2= 40 - 20
S1 S2
Solution to get the slack variables
Solution: Solution:
Point B Point B
Flour Fat
x = 20 first cake x = 20 first cake
y = 10 second cake y = 10 second cake

2(20) + 10 + S1 = 50 x + 2y + s2 = 40
2(20) + 10 + S1 = 50 20 + 2(10) + S2 = 40
40+ 10 + S1 = 50 20 + 20 + S2 = 40
` S1= `
50 - 50 S2= 40 - 40
S1 = S2
0g =0g
Solution to get the slack variables
Solution: Solution:
Point C Point C
Flour Fat
x = 25 first cake x = 25 first cake
y = 0 second cake y = 0 second cake

2(25) + 0 + S1 = 50 x + 2y + s2 = 40
50 + S1 = 50 25 + 2(0) + S2 = 40
` S1= 25 + S2 = 40
50 - 50 `
S1 = S2= 40 - 25
0g S2
= 15 g
The steps for solving a graphical linear programming model
are summarized here:

1. Plot the model constraints as equations on the graph; then,


considering the inequalities of the constraints, indicate the feasible
solution area.

2. Plot the objective function; then, move this line out from the
origin to locate the optimal solution point.

3. Solve simultaneous equations at the solution point to find the


optimal solution values.
Results

Outcome
Group Test 1 Test 2 Test 3
A 95/100 55/100 80/100

B 80/100 25/100 66/100

C 72/100 70/100 45/100

D 60/100 60/100 86/100


Simplex Method

01 02
A general mathematical Applicable to any problem
solution technique for that can be formulated in
solving linear programming terms of linear objective
problems with a larger function, subject to a set
number of variables. of linear constraints.
Software Packages in Simplex Method

1. Excel Spreadsheet 2. QM for Windows

Specifically Data input


designed to solve requirements can be
linear programming more time consuming
problems. and tedious task.

https://youtu.be/rQt_SWrOktg https://youtu.be/HoZcs8s6UU0
Resources
⁕ https://youtu.be/rQt_SWrOktg
⁕ https://youtu.be/HoZcs8s6UU0

You might also like