0% found this document useful (0 votes)
10 views25 pages

Or - Lecture 2 - LP Formulation

Uploaded by

Sama Ahmed
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)
10 views25 pages

Or - Lecture 2 - LP Formulation

Uploaded by

Sama Ahmed
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/ 25

PED 151 Operations Research (OR)

Introduction to Linear Programming

Dr. Dalia Rashed


Fall 2024-2025
Linear Programming

2 OR – Introduction to Linear Programming


Linear Programming (LP)
 A mathematical technique to help plan and make decisions relative to the
trade-offs necessary to allocate resources:
 LP problems seek to maximize or minimize some quantity (usually profit or cost)
expressed as an objective function.
 The presence of restrictions, or constraints, limits the degree to which we can
pursue our objective.

 The objective and constraints in linear programming problems must be


expressed in terms of linear equations or inequalities.

 Guarantees the optimal solution to the model formulated (if one exists).

3 OR – Introduction to Linear Programming


Characteristics of Linear Programming Problems
 A decision amongst alternative courses of action is required.

 The decision is represented in the model by decision variables.


 The problem encompasses a goal, expressed as an objective function,
that the decision maker wants to achieve.
 Restrictions (represented by constraints) exist that limit the extent of
achievement of the objective.

 The objective and constraints must be definable by linear mathematical


functional relationships.

4 OR – Introduction to Linear Programming


Linear Programming Formulation

5 OR – Introduction to Linear Programming


LP Model Formulation
 The first step in solving an LP model is building the corresponding
mathematical model (problem formulation):

 Need to determine:
 Model parameters;
 Decision variables;
 Objective function;
 Constraints

 Solving such a model will then provide the optimal resource-


allocation decision.
6 OR – Introduction to Linear Programming
Formulating LP Problems

There are two things you would typically do for the objective functions:
 Maximize it, such as with the cases of profits or revenues
 Minimize it, such as when dealing with costs

There are three types of constraints:


 Upper limits where the amount used is ≤ the amount of a resource
 Lower limits where the amount used is ≥ the amount of the resource
 Equalities where the amount used is = the amount of the resource

7 OR – Introduction to Linear Programming


Example 1 – Beaver Creek Pottery Company
 Beaver Creek Pottery Company is a small crafts operation. The
company employs skilled artisans to produce clay bowls and mugs
with authentic designs and colors. The two primary resources used by
the company are special pottery clay and skilled labor.

 Given these limited resources, the company desires to know how


many bowls and mugs to produce each day in order to maximize
profit.

 With given product resource requirements and unit profit.

8 OR – Introduction to Linear Programming


Example 1 – Beaver Creek Pottery Company (Cont’d)

Resource Requirements
Labor Clay Profit
Product
(hr/unit) (lb/unit) ($/unit)
Bowl 1 4 40
Mug 2 3 50
Resource
40 hr/day 120 lbs
Availability

Step 1: Decision variables


x1 = number of bowls to produce per day
x2 = number of mugs to produce per day

9 OR – Introduction to Linear Programming


Example 1 – Beaver Creek Pottery Company (Cont’d)

Step 2: Objective Function


Maximize Profit Z Complete Linear Programming Model:
x1 = number of bowls to produce per day
Z = 40 x1 + 50 x2 x2 = number of mugs to produce per day

Maximize Z = $40x1 + $50x2


Step 3: Constraints
Subject to:
• Resource Constraints  1x1 + 2x2  40
1x1 + 2x2  40 (hours of labour)  4x1 + 3x2  120
x1, x2  0
4x1 + 3x2  120 (pounds of clay)

• Non-Negativity Constraints
x1  0 and x2  0

10 OR – Introduction to Linear Programming


Example 1 – Beaver Creek Pottery Company (Cont’d)
 Solution Example 1: Maximize Z = $40x1 + $50x2
 x1 = 5 bowls Subject to:
 x2 = 10 mugs  1x1 + 2x2  40
 Z = $40x1 + $50x2 = $700  4x1 + 3x2  120
 x1, x2  0
 Labor constraint check:
 1(5) + 2(10) = 25 < 40 hours, within constraint
 Clay constraint check:
 4(5) + 3(10) = 50 < 120 pounds, within constraint

 It is a feasible solution that does not violate any of the constraints.

11 OR – Introduction to Linear Programming


Example 1 – Beaver Creek Pottery Company (Cont’d)
 Solution Example 2:
Maximize Z = $40x1 + $50x2
 x1 = 10 bowls
Subject to:
 x2 = 20 mugs  1x1 + 2x2  40
 Z = $1400  4x1 + 3x2  120
 x1, x2  0

 Labour constraint check


 1(10) + 2(20) = 50 > 40 hours, violates constraint

 It is an infeasible solution that violates at least one of the


constraints
12 OR – Introduction to Linear Programming
Example 2 – Product-Mix Problem
 Two products at an electronics manufacturer
 Product 1 (A DVD player)
 Product 2 (A mobile phone)
 Determine the mix of products that will produce the maximum
profit
Hours Required
to Produce 1 Unit
Available Hours
Department Product 1 Product 2 This Week

Electronic 4 3 240
Assembly 2 1 100
Profit per unit $7 $5

13 OR – Introduction to Linear Programming


Example 2 – Product-Mix Problem (Cont’d)

• Decision Variables:
X1 = number of Product 1 units to be produced Xi = number of Product “i” units
X2 = number of Product 2 units to be produced to be produced, for all i = 1 to 2

• Objective Function:
Maximize Profit = $7X1 + $5X2
• Subject to:
4X1 + 3X2 ≤ 240 (hours of electronic time)
Electronic time used is ≤ Electronic time available
2X1 + 1X2 ≤ 100 (hours of assembly time)
Assembly time used is ≤ Assembly time available
X1 & X2 > 0 (Non-negativity constraints)
14 OR – Introduction to Linear Programming
Example 3 – Resource Utilization
 A chemicals manufacturer produces two types of photo-developing
fluids.
 The first black-and-white picture chemical, costs $2,500 per ton to produce.
 The second a colour photo chemical costs $3,000 per ton.
 Based on analysis of current inventory levels and outstanding orders,
it has been specified that at least 30 tons of the black-and-white
chemical and at least 20 tons of the colour chemical must be
produced during the next month.
 The manager has noted that both chemicals must be used within a
month; thus, to avoid wasting expensive raw material, at least 60 tons
of the photo chemicals must be produced.
 Determine the amount to be produced from each picture chemical to
minimize total cost.

15 OR – Introduction to Linear Programming


Example 3 – Resource Utilization (Cont’d)
 Decision Variables
X1 = number of tons of black-and-white chemical produced per month.
X2 = number of tons of colour picture chemical produced per month.

 Objective Function
Minimize total cost = 2,500X1 + 3,000X2

 Subject to:
X1 ≥ 30 (tons of black-and-white chemical)
X2 ≥ 20 (tons of colour chemical)
X1 + X2 ≥ 60 (tons total)
X1 , X2 ≥ 0 (non-negativity requirements)
16 OR – Introduction to Linear Programming
Example 4 – Airline Flights
 A local Airline Company is considering air service from its hub of operations
in Germany to Rome, and Dublin. They have one gate at Berlin Airport, which
operates 12 hours per day.
 Each flight requires 1 hour of gate time and the pilot crew labour is limited to
150 hours per day.
 Each flight to Rome consumes 15 hours of pilot crew time and is expected to
produce a profit of €2,500. The market for service to Rome is limited to 9
flights per day.
 Serving Dublin uses 10 hours of pilot crew time per flight and will result in a
profit of €2,000 per flight.
 Determine the number of daily flights to Rome and Dublin to maximize total
profit.
17 OR – Introduction to Linear Programming
Example 4 – Airline Flights (Cont’d)
 Decision Variables
x1 = number of flights per day to Rome
x2 = number of flights per day to Dublin

 The objective function is to maximize profits (Z)


Maximize Z = €2,500x1 + €2,000x2

 The constraints are:


x1 + x2 ≤ 12 (gate capacity)
15x1 + 10 x2 ≤ 150 (labour)
x1 ≤9 (market)
x1 , x2 ≥ 0 (non-negativity requirements)
18 OR – Introduction to Linear Programming
Example 5 – Food Mix

 A burger mixture in a ton batches.

 Two ingredients, chicken (£3/kg) and beef (£5/kg).


 Recipe requirements:
 at least 500 kilograms of “chicken”
 at least 200 kilograms of “beef”

 Ratio of chicken to beef must be at least 2 to 1.


 Determine optimal mixture of ingredients that will minimize
costs.
19 OR – Introduction to Linear Programming
Example 5 – Food Mix (Cont’d)
 Decision Variables
x1 = kg of chicken in mixture
x2 = kg of beef in mixture

 Objective Function
Minimize Z = £3x1 + £5x2

 Functional Constraints
x1 + x2 = 1,000 (kg total)
x1  500 (kg of chicken)
x2  200 (kg of beef)
x1 - 2x2  0 (or x1/x2  2/1)
x 1, x 2  0 (non-negativity requirements)
20 OR – Introduction to Linear Programming
Example 6 – Bus Schedule
 Alexandria is studying the feasibility of introducing a mass
transit bus system that will reduce the pollution problem by
reducing in-city driving.
 The initial study seeks the determination of the minimum
number of buses that can handle transportation needs.
 After gathering necessary information, the city engineer
noticed that the minimum number of buses needed to meet
requirements fluctuates with the time of the day.
 The next figure summarizes the engineer’s findings. It was
decided that to carry out the required daily maintenance,
each bus could operate only 8 successive hours a day.
21 OR – Introduction to Linear Programming
Example 6 – Bus Schedule (Cont’d)

It is required to determine the number of buses to operate during different shifts


that will meet the minimum demand, while minimizing the total number of buses.

22 OR – Introduction to Linear Programming


Example 6 – Bus Schedule (Cont’d)

• Decision variables:
X1: Number of buses starting at 12:01 A.M.
X2: Number of buses starting at 04:01 A.M.
X3: Number of buses starting at 08:01 A.M.
X4: Number of buses starting at 12:01 P.M.
X5: Number of buses starting at 04:01 P.M.
X6: Number of buses starting at 08:01 P.M.

23 OR – Introduction to Linear Programming


Example 6 – Bus Schedule (Cont’d)
 Objective Function
Minimize Z = X1 + X2 + X3 + X4 + X5 + X6

 Subject to:
X1 + X6 > 4 (12:01 A.M. to 4:00 A.M. constraint)
X1 + X2 > 8 ( 4:01 A.M. to 8:00 A.M. constraint)
X2 + X3 > 10 ( 8:01 A.M. to 12:00 noon constraint)
X3 + X4 > 7 (12:01 P.M. to 4:00 P.M. constraint)
X4 + X5 > 12 ( 4:01 P.M. to 8:00 P.M. constraint)
X5 + X6 > 4 ( 8:01 A.M. to 12:00 midnight constraint)

X1, X2, X3, X4, X5, X6 > 0 (Non-negativity constraint)

24 OR – Introduction to Linear Programming


Thank You

Questions?
[email protected]

You might also like