You are on page 1of 9

Section 1

Modeling
Fall 2023-2024
Example 1: The Diet Problem
A nutritionist is planning a menu consisting of two main foods A and B.
Each ounce of A contains 2 units of fat, 1 unit of carbohydrates, and 4
units of protein. Each ounce of B contains 3 units of fat, 3 unit of
carbohydrates, and 3 units of protein. The nutritionist wants the meal to
provide at least 18 units of fat, 12 unit of carbohydrates, and 24 units of
protein. If an ounce of A costs 20 cents and an ounce of B costs 25
cents, how many ounces of each food should be served to minimize the
cost of the meal yet satisfy the nutritionist's requirements? Formulate a
linear programming model for this problem.
Solution
Table: Summery Data for the example
Food Type Fat Carbohydrates Protein Costs/ounce
(ounce( (units( (units) (units) (Cents)
A 2 1 4 20
B 3 3 3 25
Minimum Daily 18 12 24
Requirement

To determine, the number of ounce of each food that minimize the cost of the
meal and satisfy the nutritionist’s requirements. 2
The Diet Problem Linear Programming Model
a. Decision Variables:
Let x be the number of ounces of
food A, y be the number of ounces
of food B.
b. Cost
Objective function:
of menu Z= 20x + 25y
c- Constraints:
Fats: 2x + 3y ≥ 18
Carbohydrates: x + 3y ≥ 12
Proteins: 4x + 3y ≥ 24
Thus, our Mathematical Model
is Find values of x and y which
will
Minimize Z = 20x + 25y
Subject to 2x + 3y ≥ 18
x + 3y ≥ 12
4x + 3y ≥ 24
and
x, y ≥ 0
3
Example 2: Feed Mix Problem
A farmer is interested in feeding his cattle at minimum cost. Two feeds are
used A&B. Each cow must get at least 400 grams/day of protein, at least
800 grams/day of carbohydrates, and not more than 100 grams/day of fat.
Given that A contains 10% protein, 80% carbohydrates and 10% fat while
B contains 40% protein, 60% carbohydrates and no fat. A costs 2 L.E/kg,
and B costs 5 L.E/kg. Formulate the problem to determine the optimum
amount of each feed to minimize cost.
Problem Formulation
Decision variables
X1= weight of feed A kg/day/animal
X2= weight of feed B kg/day/animal
Objective Function
Minimize Z= 2 X1 + 5 X2
Constraints
Protein 0.1 X1 + 0.4 X2 ≥
Carbohydrates 0.8 X1 + 0.6 X2 ≥ 0.8
0.4
Fats 0.1 X1 ≤
and 0.1X1, X2 ≥ 0
Example 3: A Blending Problem
A manufacturer of artificial sweetener blends 14 kilograms of saccharin
and 18 kilograms of dextrose to prepare two new products: Sweet and
Low-Sugar. Each kilogram of Sweet contains 0.4 kilograms of dextrose
and 0.2 kilograms of saccharin, while each kilogram of Low-Sugar
contains 0.3 kilograms of dextrose and 0.4 kilograms of saccharin. If the
profit on each kilogram of Sweet is 20 cents and the profit on each
kilogram of Low-Sugar is 30 cents, how many kilograms of each product
should be made to maximize the profit? Formulate a linear programming
model for this problem.
Solution
Table: Summery Data for the example
Sweet Type saccharin Dextrose Profit/kg
(Kg( (Kg) (Kg) (cents)
Sweet (Kg) 0.2 0.4 20
Low-Sugar(Kg) 0.4 0.3 30
Available 14 18
Material
(Kg) 5
A Blending Problem Linear Programming Model
a- Variables:
Let x be the number of Kg.’s of Sweet,
y be the number of Kg.’s of Low-sugar
b- Objective function:
Profit of each Kg Z = 20x + 30y
c- Constraints:
Saccharin Qty: 0.2x + 0.4y ≤ 14
Dextrose Qty: 0.4x + 0.3y ≤ 18

Mathematical Model:

Maximize Z = 20x + 30y


Subject to 0.2x + 0.4y ≤ 14
0.4x + 0.3y ≤ 18
and
x, y ≥ 0

6
Example 4
A company manufactures two products A & B. with profit 4 & 3 units.
A&B take 3&2 minutes respectively to be machined. The total time
available at machining department is 800 hours (100 days or 20
weeks). A market research showed that at least 10000 units of A and
not more than 6000 units of B are needed. It is required to determine
the number of units of A&B to be produced to maximize profit.
Problem Formulation
Decision variables
X1= number of units produced of A.
X2= number of units produced of
B.
Objective Function
Maximize Z= 4 X1 + 3 X2
Constraints 3 X1 + 2 X2 ≤
800x60
X1
and X1,≥10000 X2
X2 7
Example 5: A small generator
A small generator burns two types of fuel: Low sulfur (L) and High sulfur
(H) to produce electricity. For each hour of use, each gallon of L emits 3
units of sulfur dioxide, generates 4 Kilowatts and costs 60 cents, while
each gallon of H emits 5 units of sulfur dioxide, generates 4 Kilowatts
and costs 50 cents. The environmental protection agency insists that
the maximum amount of sulfur dioxide that can be emitted per hour is
15 units. Suppose that at least 16 Kilowatts must be generated per hour.
How many gallons of L and how many gallons of H should be used
hourly to minimize the cost of the fuel used? Formulate a linear
programming model for this problem.
Solution
Table: Summery Data for the example

Fuel sulfur dioxide Generation Costs


Type (units( (KW) (cents)
(gallon(
Low sulfur (L) 3 4 60
High sulfur (H) 5 4 50
Requirement At most 15 units At Least 16 8
A small generator Formulation as a Linear Programming Model

a. Decision Variables
Let x be the number of gallons of L
used hourly, y be the number of
gallons of H used hourly
b. Objective function:
Cost of fuel used
Z = 60x + 50y
c. Constraints
Environment protection: 3x + 5y ≤ 15
Power generated: 4x + 4y ≥ 16

Mathematical Model
Minimize Z = 60x + 50y
Subject to 3x + 5y ≤ 15
4x + 4y ≥ 16
and
x, y ≥ 0

You might also like