Professional Documents
Culture Documents
1
Inequalities versus Equations
Equations
P = 750 x1 + 1000 x2
Inequalities
7 x + 4 y ≥ 100
2 x – 5 y ≤ 76
Graphical Representation of
Inequalities
Example
x1 ≥ 0 ; x2 ≥ 0
2
Graphical Representation of
Inequalities
Example
4 x1 + 2 x2 ≤ 60 ; 5 x1 + 8 x2 ≥ 80
Linear Programming:
An Introductory Example
- A Computers company makes quarterly decisions about
their product mix. While their full product line includes
hundreds of products, two products will be considered:
notebook computers and desktop computers. The company
would like to know how many of each product to produce
in order to maximizes profit for the quarter.
- There are a number of limits on what the computers
company can produce. The major constraints are as
follows:
3
Linear Programming:
An Introductory Example
1. Each computer (either notebook or desktop) requires a
Processing Chip. Due to tightness in the market, their
supplier has allocated only 10,000 chips.
2. Each computer requires memory. Memory comes in
16MB chip sets. A notebook computer has 16 MB
memory installed (so needs 1 chip set) while a desktop
computer has 32MB (so requires 2 chip sets). The
company received a great deal on chip sets, so it have a
stock of 15,000 chip sets to use over the next quarter.
Linear Programming:
An Introductory Example
3. Each computer requires assembly time: a notebook
computer takes 4 minutes to assemble versus 3 minutes for a
desktop. There are 25,000 minutes of assembly time
available in the next quarter.
-Given current market conditions, material cost, and
production system, each notebook computer produced
generates LE 750 profit, and each desktop produces LE 1000
profit. How many of each computer type should the computer
company produce in the next quarter? What is the maximum
profit the computer company can make?
4
An Introductory Example
Solution:
-There are three steps in applying linear programming:
modeling, solving, and interpreting.
Modeling
1- Decision Variables:
- Let x1 = number of 1000 notebooks produced.
- Let x2 = number of 1000 desktops produced.
2- Objective:
Maximize : 750 x1 + 1000 x2
An Introductory Example
3- Constraints:
x1 + x2 ≤ 10
x1 + 2 x2 ≤ 15
4 x1 + 3 x2 ≤ 25
x1 ≥ 0 ; x2 ≥ 0
5
Standard Form of Linear Model
There Linear models always have a set of resources
(constraints), m, to produce, n, activities (variables).
Assume:
Z= value of overall measure of performance
xj = level of activity j (j=1, 2, ….. , n)
cj = increase in Z that result from each unit increase in
activity j
bi = amount of resource i that is available to activity j
(i=1, 2,…, m)
aij = amount of resource i consumed by each unit of
activity j
6
Standard Form of Linear Model
Resources usage per unit of activity Amount of
Resource
1 2 …… n resource available
1 a11 a12 …… a1n b1
2 a21 a22 …… a2n b2
. …. .... …… … …
m am1 am2 ..….. amn bm
Contribution to Z c1 c2 ……. cn
Examples on Modeling
Example: A company makes two products (X and Y) using two
machines (A and B). Each unit of X that is produced requires 50
minutes processing time on machine A and 30 minutes time on
machine B. Each unit of Y that is produced requires 24 minutes
processing time on machine A and 33 minutes time on machine
B.
At the start of the current week there are 30 units of X and 90
units of Y in stock. Available processing time on machine A is 40
hours and on machine B is 35 hours. The demand for X in the
current week is 75 units and for Y is 95 units. Company policy is
to maximize the combined sum of the units of X and the units of
Y in stock at the end of the week.
7
Examples on Modeling
Activities
Resources Limits
Product X Product Y
Machine A time 50 24 40 x 60
Machine B time 30 33 35 x 60
Units needed X 1 - 75 (30 in stock)
Units needed Y - 1 95 (90 in stock)
Contribution to Z 1 1
Examples on Modeling
The variables:
x: number of units of X produced in the current week
y: number of units of Y produced in the current week
The constraints:
50x + 24y ≤ 40(60) machine A time
30x + 33y ≤ 35(60) machine B time
x ≥ 75 – 30; i.e. x ≥ 45
y ≥ 95 – 90; i.e. y ≥ 5
The objective:
Maximize (x+30-75) + (y+90-95) = (x+y-50); i.e. to maximize
the number of units left in stock at the end of the week.
8
Examples on Modeling
Example: A company manufactures two products (A and B) and
the profit per unit sold is LE3 and LE5 respectively. Each product
has to be assembled on a particular machine, each unit of product
A taking 12 minutes of assembly time and each unit of product B
25 minutes of assembly time. The company estimates that the
machine used for assembly has an effective working week of
only 30 hours.
Examples on Modeling
Activities
Resources Limits
Product A Product B
Time 50 24 30 x 60
Ratio A:B 5 2 -
Contribution to Z 3 5
9
Examples on Modeling
The variables:
xA = number of units of A produced
xB = number of units of B produced
The constraints:
12 xA + 25xB ≤ 30(60) (assembly time)
xB ≥ 2(xA /5); i.e. xB - 0.4 xA ≥ 0; i.e. 5 xB ≥ 2 xA
xA, xB ≥ 0
The objective:
maximize 3 xA + 5 xb
Examples on Modeling
Example: An aggregate mixture contains a minimum of 30%
sand and no more than 60% gravel nor 10% silt. Three sources of
aggregate are available: pit 1, pit 2 and pit 3 as shown in the
table. A total mix of at least 10,000 m3 is required. With the
objective to minimize the cost of material, Define the decision
variables and Formulate a mathematical model
Pit 1 2 3
% Sand 5 30 100
% Gravel 60 70 -
% Silt 35 - -
Cost/m3 LE 2 LE 10 LE 8
10
Examples on Modeling
Activities
Resources Limits
Pit 1 (x1) Pit 2 (x2) Pit 3 (x3)
Total aggregate
1 1 1 10000
required
Sand % 0.05 0.3 1 3000
Gravel % 0.6 0.7 - 6000
Silt % 0.35 - - 1000
Contribution to Z 2 10 8
Examples on Modeling
The variables:
x1 = amount of aggregate from pit 1
x2 = amount of aggregate from pit 2
x3 = amount of aggregate from pit 3
The constraints:
Total amount of aggregate required = 10000 m3
x1 + x2 + x3 ≥ 10000
Amount of sand not less than 30% = 0.3 x 10000 = 3000 m3
0.05 x1 + 0.3 x2 + x3 ≥ 3000
Amount of gravel not more than 60% = 0.6 x10000 = 6000 m3
0.6 x1 + 0.7 x2 ≤ 6000
Amount of silt not more than 10% = 0.1 x 10000 = 1000 m3
0.35 x1 ≤ 1000; x1, x2, x3 ≥0
The objective:
Minimize 2 x1 + 10 x2 + 8 x3
11
An Introductory Example
Solving the Model Graphically
An Introductory Example
Solving the Model Graphically
12
An Introductory Example
Solving the Model Graphical ly
An Introductory Example
An optimal solution is a feasible solution that has the most
favorable value of the objective function.
13
Special Situation in LP
Redundant Constraints
- do not affect the feasible region
Example: x < 10
x < 12
The second constraint is redundant because it
is less restrictive.
An Introductory Example
Solving the Model using Solver in Excel Program
14
Types of Solutions
1. Unique Optima– when one optimum solution exists
Max total weekly profit, Z = 140x1 + 160x2
x2 ≤6
x1 ≤ 8
x1, x2 ≥ 0 5x1 + 5x2 ≤ 50
x2 ≤ 6
Feasible region
2x1 + 4x2 ≤ 28
Types of Solutions
2. Alternate Optimal Solutions – when there is more
than one optimal solution
C
Max 2T + 2C
1
Subject to: All points on
0
T + C < 10 Red segment
T < 5 are optimal
C< 6 6
T, C > 0
0 5 10 T
15
Types of Solutions
3. Infeasibility – when no feasible solution exists (there
is no feasible region)
Example: x < 10
x > 15
5x1 + 5x2 ≤ 50
x1 ≥8
x2 ≥6
Types of Solutions
4. Unbounded Solutions – when nothing prevents the
solution from becoming infinitely large
C
Max 2T + 2C
Subject to:
2T + 3C > 6 2
T, C > 0
1
0 1 2 3 T
0
16
Example
Solve using the graphical method. Compute the
value of the objective function and decision
variables at optimality.
Minimize Z = 8x1 + 4x2
Subject to 2x1 – 2x2 ≤ 2
4x1 - 3x2 ≥ -6
4x1 + 2x2 ≥ 8
4x1 ≥4
4x2 ≥6
x1, x2 ≥0
Example
Alternate optimal
solutions on the line
segment between
points B (1, 2) and C
(1.25, 1.5) with the
objective function
equals 16 (optimal
solution
17
Example 2
- A marketing company is planning a one week advertising
campaign for their new knife. The ads have been designed
and produced and now they wish to determine how much
money to spend in each advertising outlet. They have
hundreds of possible outlets to choose from. Let’s
consider two outlets: Prime-time TV, and newsmagazines.
The problem of optimally spending advertising money can
be formulated in many ways. For instance, given a fixed
budget, the goal might be to maximize the number of
target customers reached (customer with a reasonable
chance of purchasing the product).
Example 2 (continue)
- An alternative approach, which we adopt here, is to define
targets for reaching each market segment and to minimize
the money spent to reach those targets. For this product,
the target segments are teenage boys, women (ages 40-49),
and retired men. Each minute of primetime TV and page
of newsmagazine advertisement reaches the following
number of people (in millions):
18
Example 2 (continue)
- Again, the marketing company is willing to know how
many units of each outlet to purchase to meet the goals.
Solution:
Modeling
1- Decision Variables:
- Let x1 = number of TV spots.
- Let x2 = number of magazine pages.
2- Objective:
Minimize : 600 x1 + 500 x2
Example 2 (continue)
3- Constraints:
5 x1 + 2 x2 ≥ 24
x1 + 6 x2 ≥ 18
3 x1 + 3 x2 ≥ 24
x1 ≥ 0 ; x2 ≥ 0
19
Example 2 (continue)
Solving the Model Graphical ly
Example 2 (continue)
Solving the Model using Solver in Excel Program
20
Limitations of LP Modeling
Proportionality Assumption
Since the objective is linear, the contribution to the
objective of any decision variable is proportional to the
value of the decision variable.
Additivity Assumption
Since each constraint is linear, the contribution of
each variable to the left hand side of each constraint is
proportional to the value of the variable and
independent of the values of any other variable
Limitations of LP Modeling
Divisibility Assumption
When it is impossible to take a fraction of the decision
variable, then the used value violates the optimality.
Certainty Assumption
It is very rare that a problem will meet all of the
assumptions exactly. A model can still give useful
managerial insight even if reality differs slightly from
the rigorous requirements of the model.
21