Lecture 2
Lecture 2
Linear Programming (LP) is a powerful mathematical optimization technique used to make optimal
decisions in various fields.
This lecture will provide an overview of LP, its key concepts, applications, and real-world examples.
MEE513
Key Concepts 3
MEE513
General Form of LP 4
MEE513
Production Planning 5
MEE513
Workforce Scheduling 6
•Constraints include labour availability, shift schedules, and demand for workers.
MEE513
Financial Portfolio 7
Management
•The objective is to maximize returns
•Constraints may include budget limits, risk tolerance, and expected returns.
MEE513
Transportation Planning 8
MEE513
LP Assumptions 9
•These include:
MEE513
LP Model 10
•Together, these elements create a mathematical representation of the problem, which can be solved to
•Step 2: Formulate the objective function. Check whether the function needs to be minimized
or maximized.
•Step 4: Ensure that the decision variables are greater than or equal to 0. (Non-negative
restraint)
•Step 5: Solve the linear programming problem using either the simplex or graphical method.
MEE513
Example 1 12
A doctor wants to combine two food kinds such that the mixture’s vitamin
vitamin C. Food ‘I’ includes 2 vitamin A units per kilogram and 1 vitamin C unit
per kilogram. Food ‘II’ has 1 vitamin A unit per kilogram and 2 vitamin C units
per kilogram. Food ‘I’ is priced at $5 per kilogram, whereas Food ‘II’ costs $7 per
MEE513
13
To solve this problem using linear programming, we need to set up the objective function and
Let:
Objective Function: The objective is to minimize the cost, which can be represented as:
Min Z = 5x+7y
MEE513
14
Constraints
1.The vitamin A constraint: The mixture must include a minimum of 8 units of vitamin A.
2.2x+y≥8
3.The vitamin C constraint: The mixture must include a minimum of 10 units of vitamin C.
4.x+2y≥10
5.Non-negativity constraint:
6.x,y≥0
MEE513
Example 2 15
One type of cake calls for 200g of flour and 25g of fat, but another one calls for
100g of flour and 50g of fat. This issue may be expressed as a linear
baked using 5kg of wheat and 1kg of fat. It also implies that there are sufficient
MEE513
16
•x = the number of cakes of the first type (200g of flour and 25g of fat each).
•y = the number of cakes of the second type (100g of flour and 50g of fat each).
Objective Function: The objective is to maximize the number of cakes that can be baked, which can
MEE513
17
Constraints
Wheat (flour) constraint: The total flour used in the cakes must not exceed the available 5kg
of wheat (5,000g).
1.200x+100y ≤5,000
Fat constraint: The total fat used in the cakes must not exceed the available 1kg of fat
(1,000g).
2.25x+50y≤1,000
3.Non-negativity constraint:
4.x,y≥0
MEE513
Example 18
A bakery produces two types of cookies: chocolate chip and caramel. The bakery
anticipates daily demand for a minimum of 80 caramelized & 120 chocolate chip
cookies. Due to a lack of raw materials and labour, the bakery can produce 120
caramel cookies and 140 chocolate chip cookies daily. For the bakery to be viable, it
must sell a minimum of 240 cookies each day. Every chocolate chip cookie served
generates $0.75 in profit, whereas each caramel biscuit generates $0.88. The
solution to the number of chocolate chip and caramel cookies that the bakery must
produce each day to maximize profit may be determined using linear programming.
MEE513
19
MEE513
Constraints 20
1.Demand Constraints: The bakery needs to meet the daily minimum demand:
1. x≥120 (for chocolate chip cookies)
2. y≥80 (for caramel cookies)
2.Production Constraints: Due to resource limitations, the bakery can only produce a certain
number of cookies daily:
1. x≤140 (for chocolate chip cookies)
y≤120 (for caramel cookies)
3.Viability Constraint: The bakery needs to sell a minimum of 240 cookies each day to be
viable:
1. x+y≥240
A refinery must produce 100 gallons of gasoline and 160 gallons of diesel to meet customer
demands. The refinery would like to minimize the cost of crude and two crude options exist. The
less expensive crude costs $80 USD per barrel while a more expensive crude costs $95 USD per
barrel. Each barrel of the less expensive crude produces 10 gallons of gasoline and 20 gallons of
diesel. Each barrel of the more expensive crude produces 15 gallons of both gasoline and diesel.
Find the number of barrels of each crude that will minimize the refinery cost while satisfying the
customer demands.
MEE513
22
Decision Variables: Let x be the number of barrels of the less expensive crude to purchase, and y be
Objective Function: The objective is to minimize the cost, which can be expressed as:
Z=80x+95y
where 80x is the cost of the less expensive crude, and 95 �95 y is the cost of the more expensive crude.
MEE513
23
Constraints
Gasoline Demand Constraint: The refinery needs to produce 100 gallons of gasoline, and each
barrel of the less expensive crude produces 10 gallons, while each barrel of the more
expensive crude produces 15 gallons:
1.10x+15y≥100
Diesel Demand Constraint: The refinery needs to produce 160 gallons of diesel, and each
barrel of the less expensive crude produces 20 gallons, while each barrel of the more
expensive crude produces 15 gallons:
2.20x+15y≥160
3.x,y≥0
MEE513
Graphical Method 24
Step 5. Determine the optimal solution by algebraically calculating coordinates of the most attractive
corner
Step 6. Determine the value of the objective function for the optimal solution
MEE513
25
MEE513
26
MEE513
27
MEE513
28
MEE513
29
MEE513
30
The company’s optimal solution is to make four tables and nine chairs.
LISTENING
MEE513