0% found this document useful (0 votes)
31 views

Lecture-01 - Linear Programming Excellent 26-July-2017

This document provides an introduction to linear programming, including its definition, formulation, and graphical solution. It begins with defining linear programming as a mathematical programming problem where all functions are linear. It then demonstrates how to formulate a linear programming problem through a survival example on a deserted island. Key steps in formulation include identifying decision variables, the objective and objective function, and constraints. Finally, it discusses linear programming terminology and how to graphically solve simple linear programming problems with two decision variables.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Lecture-01 - Linear Programming Excellent 26-July-2017

This document provides an introduction to linear programming, including its definition, formulation, and graphical solution. It begins with defining linear programming as a mathematical programming problem where all functions are linear. It then demonstrates how to formulate a linear programming problem through a survival example on a deserted island. Key steps in formulation include identifying decision variables, the objective and objective function, and constraints. Finally, it discusses linear programming terminology and how to graphically solve simple linear programming problems with two decision variables.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

OPERATION RESEARCH

Linear Programming:
Introduction, Formulation and
Graphical Solution

Dr Maaz Akhtar
Professor
Mechanical Engineering Department
1
Outline
• Definition of Linear Programming
• Formulation of Linear Programming
– Surviving in an island
– Extending a problem formulation
• Linear Programming Terminology
• Graphical Solution to Linear Programming
• Properties of Linear Programming

2
What is Mathematical Programming?
• Mathematical programming is selecting the best
option(s) from a set of alternatives mathematically
– Minimizing/maximizing a function where your
alternatives are defined by functions
• Many industries use mathematical programming
– Supply chain, logistics, and transportation
– Health industry, energy industry, finance, airlines
– Manufacturing industry, agriculture industry
– Education, Military
• Operations Research raised with WWII
3
What is Linear Programming?
• Linear Programming problem (LP) is a
mathematical programming problem where all of
your functions are linear
– A function is linear when
• The variables have power of 1 and the variables are not
multiplied with each other 𝑓 (𝑥 )
–  linear
–  not linear
–  linear
–  not linear
– It is assumed that our variables are continuous (for now) 𝑥

4
How to formulate?
• What do we need to formulate a linear
programming problem?
– Have a problem!!
– Know your problem
• Gather the relevant data
• Know what each number means
– Best way to learn is to do some examples….

5
Example 1: Surviving in an island
• Linear programming will save you!
– Suppose that you will be left in a deserted
island
– You want to live as many days as you can
to increase chance of rescue
– Fortunately (!), you can take a bag with you
to the island
– What would you put into the bag?

6
Example 1: Surviving in an island
• The bag can carry at most 50 lbs
• There are limited set of items you can carry
– Bread: You can survive for 2 days with 1 lb of bread
– Steak: You can survive for 5 days with 1 lb of steak
(Memphis style grilled!)
– Chicken: You can survive for 3 days with 1 lb of
chicken (southern style deep fried!)
– Chocolate: You can survive for 6 days with 1 lb of
chocolate
• How much of each item to take with you?
7
Example 1: Formulation Steps
• STEP 0: Know the problem and gather your data
– Your problem is to increase your chance of rescue by
maximizing the number of days you survive
– You can have 1 bag which can carry 50 lbs at most
– You can only put bread, steak, chicken and chocolate
into you bag
– Each item enables you survive for a specific number of
days for each pound you take
Bread: 2 days/lb Steak: 5 days/lb
Chicken: 3days/lb Chocolate: 6days/lb

8
Example 1: Formulation Steps
• STEP 1: Identify your decision variables
– Decision variables are the things you control
– The amount of each item you will take with you

Warning: Always be careful with the metrics (try to use the same metrics)

9
Example 1: Formulation Steps
• STEP 2: Define your objective function and
objective
– Your objective function is the measure of performance
as a result of your decisions
– Your objective is what you want to do with your
objective function
Objective

– Recall that you want to maximize the number of days


you will survive in the island
Performance measure
Not a function though
10
Example 1: Formulation Steps
• STEP 2: We know our objective (maximize) and
our performance of measure (number of days)
– Express the performance of measure as a function of
your decision variables to get the objective function
• If you take lbs of bread, you will survive for days
• If you take lbs of steak, you will survive for days
• If you take lbs of chicken, you will survive for days
• If you take lbs of chocolate, you will survive for days
– Then objective function in terms of decision variables:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒
11
Example 1: Formulation Steps
• STEP 3: Define your restrictions (constraints)
– There may be some restrictions which limit what you
can do (hence, they define set of your alternatives)
– You can carry 1 bag and it can carry 50 lbs at most
Limit on how
much you can
carry
Total amount you
decide to carry
– You cannot get negative amounts!!!

12
Example 1: LP Formulation
• Combine your objective, objective function, and
constraints

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜

» This is your LP model


» Note that everything is linear!
13
Example 1: Extending the LP
• Suppose that you can also take cheese
– Cheese: You can survive for 4 days with 1 lb of cheese

– We have a new decision variable: Update LP

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
,

14
Example 1: Extending the LP
• Furthermore, suppose you have a budgetary limit
• 1 lb of bread costs you $3
• 1 lb of steak costs you $6
• 1 lb of chicken costs you $7
• 1 lb of chocolate costs you $15
• 1 lb of cheese costs you $8
– You can spend at most $150
– Write the new restriction: Limit on how
much you can
spend

Total money you decide to spend


15
Example 1: Extending the LP

𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
,

– You cannot get more meat (chicken+steak) than bread

– For each lb of cheese, you need at least 2 lbs of bread


16
Summary of Formulation Steps
• Gather all of your data, know what they mean
• Then
1. Identify your decision variables
2. Identify your objective and objective function
3. Identify your constraints
• Express your objective function and constraints in terms of
your decision variables
• Steps 2 and 3 can change order

17
LP Terminology
• Decision Variables: things we control
• Objective function: measure of performance
• Nonnegativity constraints
• Functional constraints: restrictions we have
• Parameters: constants we use in the objective function
and constraint definitions
• Solution: any choice of values for the decision variables
– Feasible solution is one that satisfies the constraints
– Optimal solution is the best feasible solution

18
Graphically Solving Simple LPs
• So far we have discussed how to formulate LPs
• How about solving them?
• Simple LPs can be solved graphically
– Simple LP: 2 decision variables!
1. Graph the constraints to see which points satisfy all
constraints (i.e., graph the feasible points)
2. Graph iso-lines of the objective function (objective
function lines)
3. Use iso-lines to find the optimal solution(s)

19
Example 2: Product Mix Problem
• Maximize your profit
– Decide how many to produce product types 1,2
– To be produced, each product requires different
amount of 2 resources per unit
– Each resource is limited

20
Example 2: LP formulation
• You can formulate the following LP model
• type 1 produced (units)
• (units)

Total profit
Resource A limit
Resource B limit

Non-negativity

21
Example 2: Graphical Solution
• First, draw your
decision variables
as the axes of
your graph

22
Example 2: Graphical Solution
• Start with the easy
constraints
– Non-negativity
constraints!
– Assume equality of
the constraint
( or )
– Then, find the
region defined by
the constraint

23
Example 2: Graphical Solution
• Resource A limit
constraint
– Draw
– Find the region
where
– Hint: take a point in each of
one of the regions and see if
this point satisfies the
constraint. The region
including the point satisfying
your constraint is the region
defined by your constraint
(you can take the origin as
your point)
24
Example 2: Graphical Solution
• Resource B limit
constraint
– Draw 2
– Find the region
where 2

25
Example 2: Graphical Solution
• Define the feasible
region
– It is the region
defined by the
intersection of all
of your constraints
– It includes all of
the feasible
solutions to your
LP

26
Example 2: Graphical Solution

Improvement
Direction

27
Example 2: Graphical Solution
• Optimum solution
will be one of the
corner solutions!!
1. Graph the
constraints
2. Define your feasible
region
3. Evaluate the corner
points (or draw iso-
lines until you leave
feasible region)
4. Choose the best
corner point 28
Graphical Solution to Case 1
• Recall the Wyndor Glass Co. Product Mix
problem
– D: number of doors, W: number of windows

Maximize 300D+500W Total profit


subject to D ≤4 Plant 1 availability
2W ≤ 12 Plant 2 availability
3D+2W ≤ 18 Plant 3 availability
D≥0, W ≥0 Non-negativity

29
Graphical Solution to Case 1
• STEP 1&2: Graph the constraints and find feasible region
Production rate for windows
W
10

3 D + 2 W = 18
8

D=4

6 2 W =12

Feasible

region
2

30
0 2 4 6 8 D
Production rate for doors
Graphical Solution to Case 1
• STEP 3: Draw iso-lines to find the optimal solution
Production rate W
for windows
8

P = 3600 = 300D + 500W


Optimal solution

P = 3000 = 300D + 500W 6 (2, 6)

Feasible
4
region
P = 1500 = 300D + 500W

0 2 4 6 8 D
10 31
Production rate for doors
Summary of the Graphical Method
• Draw the constraint boundary line for each constraint. Use the origin (or any
point not on the line) to determine which side of the line is permitted by the
constraint.
• Find the feasible region by determining where all constraints are satisfied
simultaneously.
• Determine the slope of one objective function line (iso-line). All other objective
function lines will have the same slope.
• Move a straight edge with this slope through the feasible region in the
direction of improving values of the objective function. Stop at the last instant
that the straight edge still passes through a point in the feasible region. This
line given by the straight edge is the optimal objective function line.
• A feasible point on the optimal objective function line is an optimal solution.

32
Properties of LPs
• An LP problem can have
– Infeasibility
• No feasible solutions!
– Unique optimal solution
• Only one feasible solution is optimum
– Multiple optimal solutions (alternative optima)
• More than one feasible solutions that are optimum
– Unboundedness
• There is always a better feasible solution

33
Infeasibility
• Consider the following LP problem

– Practice: draw the feasible region

34
Infeasibility
• The feasible
region is empty
• That is, no
solution satisfies
the constraints
(i.e., there is no
feasible
solution)
– So, no optimal
solution exists
35
Unique Optimal Solution
• Consider the following LP problem (Example 2)

36
Unique Optimal Solution
• The feasible region
is not empty
• All of the points in
the feasible region
are feasible solutions
• But we have a single
optimal solution

37
Alternative Optima
• Consider the following LP problem

38
Alternative Optima
• The feasible region
is not empty
– There are many
feasible solutions
– Also, there are
many optimal
solutions
• but still there are
corner points that
are also optimum!

39
Problem-1

A workshop has three (3) types of machines A, B and C; it


can manufacture two (2) products 1 and 2, and all products
have to go to each machine and each one goes in the same
order; First to the machine A, then to B and then to C. The
following table shows:

Formulate and solve using the graphical method a Linear


Programming model for the previous situation that allows the
workshop to obtain maximum gains.
40
Answer

Optimal Solution is X1=4, X2=4 and Profit is 10.


41
Problem-2

Bridgeway Company manufactures a printer and


keyboard. The contribution margins of the printer and
keyboard are $30 and $20, respectively. Two types of
skilled labor are required to manufacture these
products: soldering and assembling. A printer requires 2
hours of soldering and 1 hour of assembling. A
keyboard requires 1 hour of soldering and 1 hour of
assembling. Bridgeway has 1,000 soldering hours and
800 assembling hours available per week. There are no
constraints on the supply of raw materials. Demand for
keyboards is unlimited, but at most 350 printers are
sold each week. Bridgeway wishes to maximize 42its
weekly total contribution margin.
Answer

Optimal Solution is X=200, Y=600 and Profit is 18000.


43

You might also like