0% found this document useful (0 votes)
39 views16 pages

Session 5

The document presents several linear programming problems involving retail store advertising, product mix optimization, diet planning, bicycle travel times, and nurse scheduling. Mathematical models are formulated as linear programs to help solve each problem.
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)
39 views16 pages

Session 5

The document presents several linear programming problems involving retail store advertising, product mix optimization, diet planning, bicycle travel times, and nurse scheduling. Mathematical models are formulated as linear programs to help solve each problem.
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/ 16

14-02-2024

Session-5

Retail Store Problem


A Retail store is planning an advertising campaign aiming to
increase the number of customers visiting its physical location as
well as its online store.
• Each 1000 dollars invested in magazine ads will attract 100
new customers to store, as well as 500 new website visitors.
• Each 1000 dollars invested in online ads will attract 50 new
customers to store, as well as 1000 new website visitors.
• The target is to bring at least 500 new guests to the physical
store and at least 5000 new visitors to the online store.
Formulate an LP to help the store to minimize the cost of the
advertising campaign.

1
14-02-2024

LP Formulation

• Decision Variables:

• Let x1 be the amount (in thousands of dollars) invested in magazine


ads

• Let x2 be the amount (in thousands of dollars) invested in online ads

• Objective Function:

Minimize Z= x1 + x2

• Constraints:
• Magazine ads attract 100 new customers, and Online ads attract 50
new visitors to the physical store per $1000 spent:
100x1+50x2≥500
• Magazine ads attract 500 new customers and Online ads attract 50 new
visitors to the physical store per $1000 spent:
500x1+1000x2≥5000
• Non-negativity constraints:
x1,x2≥0

2
14-02-2024

Production Mix
A shop can make two types of sweets (A and B). They use two resources-
flour and sugar. To make one packet of A, they need 3 kg of flour and 3 kg
of sugar. To make one packet of B, they need 3 kg of flour and 4 kg of
sugar. They have 21 kg of flour and 28 kg of sugar. These sweets are sold
at Rs 1000 and Rs 900 per packet, respectively.

Develop a mathematical model and Find the best product mix to maximize
the revenue.

Mathematical Model Formulation

• Define the decision variable:


• Let 𝑥1 be the number of packets of sweets A made
• Let 𝑥2 be the number of packets of sweets B made
• Objective Function:
• Maximize 1000𝑥1 + 1000 𝑥2
• s.t.
• 3𝑥1 +3𝑥2 <= 21 (flour)
• 3𝑥1 + 4𝑥2 <= 48 ( sugar)
• 𝑥1 , 𝑥2 =>0 (Non Negativity Constraint)

3
14-02-2024

A Diet Problem
A group of OR students aim to improve their diet. Based on a
nutrition specialist’s recommendation, they want their daily intake
to contain at least 60 g of protein, 75 mg of vitamin C, 800 mg of
calcium, and 2000 calories.
They would like their daily menu to consist of five food types. The
serving size, cost per serving, and nutrition information for each
food type are given.

Food Type Cost ($) Protein (g) Calcium (mg) Vitamin C Calories
(mg)
Almond Butter (100 g) 2.90 15 270 1 600
Brown Rice (200 g) 3.20 5 20 0 215
Orange Juice (250 g) 0.50 2 25 106 110
Salmon (150 g) 4.50 39 23 0 280
Wheat Bread (25 g) 0.30 3 35 0 66
Required ingestion --- 60 800 75 2000

Develop a mathematical Model and Design the least expensive diet


that satisfies the above requirements.

4
14-02-2024

Mathematical Model

• Set & Indices:


j = (1,2,3,4,5)
Food type: 𝑥𝑗 ∀𝐽 ⇒ 𝑥1, 𝑥2, 𝑥3, 𝑥4, 𝑥5
• Decision variables:
• 𝑥1 The amount of Almond Butter required
• 𝑥2 The amount of Brown Rice required
• 𝑥3 The amount of Orange Juice required
• 𝑥4 The amount of Salmon required
• 𝑥5 The amount of Wheat Bread required

• Objective Function:
• Min 2.90𝑥1 +3.20𝑥2 +0.50𝑥3 +4.50𝑥4 +0.30𝑥5
• Constraints:
• Protein: 15𝑥1 + 5𝑥2 +2𝑥3 + 39𝑥4 + 3𝑥5 ≥ 60
• Calcium: 270𝑥1 + 20𝑥2 +25𝑥3 + 23𝑥4 + 35𝑥5 ≥ 800
• Vitamin C: 1𝑥1 + 0𝑥2 +106𝑥3 + 0𝑥4 + 0𝑥5 ≥ 75
• Calories: 600𝑥1 + 215𝑥2 + 110𝑥3 + 280𝑥4 + 66𝑥5 ≥ 2000
• Non-Nagitivity Constraints: 𝑥𝑗 ≥ 0, ∀𝑗

5
14-02-2024

The bicycle problem (Minimization of


Maximization)
Three friends (A, B, C) start from the P towards Q, which is 5
km away. They have one cycle, and only one person rides the
cycle at a time. A, B, and C walk at speeds of 4,5 and 6
km/hour and can ride the cycle at 7, 8, and 10 km/hour.
Develop a mathematical model and Calculate how do they
travel so that all three reach Q at the earliest time?

Mathematical Formulation

• Let x1 distance traveled by A by cycle and x2 distance


traveled by walk
• Let y1 distance travelled by B by cycle and y2 distance
travel by walk
• Let z1 distance travelled by C by cycle and z2 distance travel
by walk
• Let t be the maximum time taken

6
14-02-2024

Initial Formulation
• Objective Function:
Minimize t
• Constraints:
• X1+x2=5 ➔ x2 = 5-x1
• Y1+y2 = 5 ➔ y2 = 5-y1
• Z1+z2 = 5 ➔ z2 = 5-z1

• Time constraints:
• t >= x1/4 + x2/7 ➔ t >= x1/4 + (5-x1) /7
• t>= y1/5 + y2/8 ➔ t >= y1/5 + (5-y1)/8
• t >= z1/6 + z2/10 ➔ t >= z1/6 + (5-z1)/10
• Distance Constraints:
• x1 + x2 + x3 = 5
• Non-negativity Constraints

7
14-02-2024

Final Formulation
• Objective Function:
Minimize t
• Constraints:
• Time constraints:
• t >= x1/4 + (5-x1) /7
• t >= y1/5 + (5-y1)/8
• t >= z1/6 + (5-z1)/10
• Distance Constraints:
• x1 + y1 + z1 = 5
• Non-negativity Constraints

A Scheduling Problem
A hospital is aiming to design a schedule for day-shift nurses
that minimizes the total number of nurses employed. Each
nurse works 3 consecutive day shifts and then has 4 days off.
The minimum number of nurses required for each day of a
week:
Day of week/shift M T w Th F S S
Nurses Required 16 12 18 13 15 9 7

In addition, it is required that at least half of the day-shift


nurses have weekends (Saturday and Sunday) off.

8
14-02-2024

Set and Indices:


i = [1,2,3,4,5,6,7]
x = [𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 , 𝑥7 ]
Decision Variables: (number of nurses who start a particular day)
𝑥1 : No of nurses who work on Mon-Tue-Wed
𝑥2 : No of nurses who work on Tue-Wed-Thu
𝑥3 : No of nurses who work on Wed-Thu-Fri
𝑥4 : No of nurses who work on Thu-Fri-Sat
𝑥5 : No of nurses who work d on Fri-Sat-Sun
𝑥6 : No of nurses who work d on Sat-Sun-Mon
𝑥7 : No of nurses who work on Sun-Mon-Tue

Objective function:
Minimize σ7𝑖=1 𝑥1
Constraints:
• Mon: 𝑥1 + 𝑥6 + 𝑥7 ≥ 16;
• Tue: 𝑥1 + 𝑥2 + 𝑥7 ≥ 12;
• Wed: 𝑥1 + 𝑥2 + 𝑥3 ≥ 18;
• Thu: 𝑥2 + 𝑥3 + 𝑥4 ≥ 13;
• Fri: 𝑥3 + 𝑥4 + 𝑥5 ≥ 15;
• Sat: 𝑥4 + 𝑥5 + 𝑥6 ≥ 9;
• Sun: 𝑥1 + 𝑥6 + 𝑥7 ≥ 7
• At least half of the day-shift nurses have weekends off:
(𝑥1 + 𝑥2 +𝑥3 ) 1
• ≥2 ➔ 𝑥1 + 𝑥2 + 𝑥3 ≥ 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7
(𝑥1 + 𝑥2 +𝑥3 +𝑥4 + 𝑥5 +𝑥6 )

9
14-02-2024

In Summary, the LP:


• Objective Function:
• Min. 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7
• Subject to:
• 𝑥1 + 𝑥6 + 𝑥7 ≥ 16;
• 𝑥1 + 𝑥2 + 𝑥7 ≥ 12;
• 𝑥1 + 𝑥2 + 𝑥3 ≥ 18;
• 𝑥2 + 𝑥3 + 𝑥4 ≥ 13;
• 𝑥3 + 𝑥4 + 𝑥5 ≥ 15;
• 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7 ≥ 9;
• 𝑥5 + 𝑥6 + 𝑥7 ≥ 7;
• 𝑥1 + 𝑥2 + 𝑥3 − 𝑥4 − 𝑥5 − 𝑥6 − 𝑥7 ≥ 0;

Solution
• This problem has multiple optimal solutions with 𝑧 ∗ = 31. one
of them is given by

• 𝑥1∗ = 11, 𝑥2∗ = 0, 𝑥3∗ = 10, 𝑥4∗ = 3, 𝑥5∗ = 2, 𝑥6∗ = 4, 𝑥7∗ = 7,

Only 10 out of 31 nurses will be scheduled to work on weekends.

10
14-02-2024

A Scheduling Problem
• The daily requirement of nurses in a private nursing home is
given in the following table
Time of the day Requirements
8 am – 12 noon 12
12 noon – 4 pm 15
4 pm – 8 pm 10
8 pm -12 midnight 8
12 midnight – 4 am 6
4 am – 8 am 10

• The nurse start work at the beginning of the shift (8 am to 12


noon etc.) and the work for 8 continuous hour. What is the
minimum number of nurses required to meet the daily
demand?

LP Model Formulation

• Hint: The problem is how many people start working at the


beginning of these 6-time slots, such that we have a minimum
total number of people working and we can meet the
requirement or demand of each of these time slots.
• Since there are 6 time slots, we have 6 variables, and we
define these variables as x1 to x6.

11
14-02-2024

• Let x1, x2, x3, x4, x5, and x6 are number of nurses who start working at
8 am, 12 noon, 4 pm, 8 pm, 12 midnight, and 4 am respectively.
• Objective function
• σ6𝑖=1 𝑥𝑗 = 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 + 𝑥6
• Subject to
• X1+x2 =>15
• X2+x3 =>10
• X3+x4 =>8
• X4+x5 =>6
• X5+x6=>10
• X6+x1=>12
• x1, x2, x3, x4, x5, x6 => 0 (non negativity constraint)

Production Planning Problem

The demand for 2 weeks for product are 800 and 1000. In a
week, the company can produce up to 700 units at 100/product
at the regular time. It can employ overtime and produce up to
an extra 300 units in a week at Rs 120/product. The cost of
carrying a product from week one to next week is Rs
15/product/week. How should they produce to meet the
demand at minimum cost?

12
14-02-2024

Solution

Decision Variables:
• Let x1 be the number of products made using regular time in week 1.
• Let x2 be the number of products made using regular time in week 2.
• Let y1 be the number of products made using overtime in week 1.
• Let y1 be the number of products made using overtime in week 1.
• Let z1 be the number of products carried from week 1 to week 2.

Initial Formulation
• Minimize:
100x1+100x2+120y1+120y2+15z1
• s.t.:
• x1+y1 = 800+z1 or x1+y1-z1=800;
• z1+x2+y2 = 1000;
• x1 <=700
• x2 <=700
• y1 <=300
• y2<=300
• x1,x2,y1,y2,z1 =>0

13
14-02-2024

Reformulation- Elimination of Variable z1


• Objective Function:
Minimize 100x1+100x2+120y1+120y2+15(x1+y1-800)

Minimize 115x1+100x2+135y1+120y2-1200

s.t.:
• Demand Constraints:
x1+y1 => 800;
x1+x2+y1+y2 => 1800; Note: In the second
• Capacity Constraints: formulation, we have 1
x1 <=700 variable less, and the
x2 <=700 constraints are all
y1 <=300 inequalities instead of
y2<=300 equations.
X1,x2,y1,y2 =>0

14
14-02-2024

A Constant Term In The Objective Function


• when we actually solve this we can leave out the constant
both from the formulation and to begin with, in the solution
and can add that.

• So, this will be rewritten as minimize


115x1+100x2+135y1+120y2 and we can leave out the -12000
and add it as an when required.

The Media Selection Problem


A Company wants to advertise their product in four different
media- TV, newspaper, websites, and radio. The reach per
advertisement in these four media are 8000, 5000, 3000, and
2000. the cost per advertisement is Rs 4 lakhs, 3 lakhs, 2 lakhs,
and 1.5 lakhs. The maximum number of advertisements that
the company wishes to have in each media is 3,4,5,4. the
budget available is 32 lakhs.
Develop a mathematical model How many advertisements
does the company decide in each media to maximize the
reach?

15
14-02-2024

Solutions
Decision Variable:
x1 is the number of advertisements on TV.
x2 is the number of advertisements in the newspaper.
x3 is the number of advertisements on websites.
x4 is the number of advertisements on the radio.

• Objective function:
Maximize 8000x1+ 5000x2+3000x3+2000x4
• s.t.
Budget Constraint: 4x1+3x2+2x3+1.5x4 <=3200000
• Max. No of advertisement Constraint:
• x1 <= 3
• x2 <= 4
• x3 <= 5
• x4 <= 4
• Non-negativity Constraints: x1, x2, x3, and x4 >= 0

16

You might also like