Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

IQDM

Session 2
Questions?
LP Assumptions
• Proportionality
– E.g. z = 4x + … .
– That is, 1 unit increase in x results in 4 units increase in z.

• Additivity
– If the above z is also proportional to y, where 1 unit increase in y
results in 3 units increase in z as well, then
– z = 4x + 3y

• Certainty
– Coefficients are deterministic

• Variables can take any real number values


Linear Functions

• Is f = xy + yz a linear function?

• f(x,z) = xy + yz?

• f(y) = xy + yz?

• f(x,y) = xy + yz?
LP or LPP Formulation

• Decision variables

• Objective function

• Constraints
Some Mathematical Background

• Bounded set

• Closed set
• A (Linear) Inequality provides a boundary on
one side.
• Constraints include the boundary.

• That is, constraints are ≤ or ≥ .

• Hence, the resulting regions are closed.


Recall: Open vs. closed intervals
• (0, 1) is open
If x is a point in (0, 1),
then 0 < x < 1

• [0, 1] is closed
and corresponds to 0 ≤ x ≤ 1

• Intervals may also be open on one side.


E.g. [0, 1) corresponds to 0 ≤ x < 1
Example 2
Company X, an electronics company, has
designed two specialty add-on circuit cards for
personal computers and markets them
directly to the public.

One is a communication card, and the other a


video card. Sales of the two cards do not
“cannibalize” one another.
Direct production costs are $300 per
communication card and $400 per video card.

Marketing department estimates that the


demand for communication cards will be
10,000 – 9p units, where p is the retail price in
dollars.
Video card demand is similarly estimated to be
12,000 – 12t units, where t represents the price.

Company X has a total production capacity of 7,500


cards per year.

Assuming the marketing estimates are correct, how


much of each kind of card should company X
produce to maximize this year’s contribution?
Decision variables:
• Prices p and t
• c and v (total production of respective cards)

Maximize total contribution


Subject to constraints
• Is this an LP?

• Objective function, total contribution =


(p − 300)c + (t − 400)v

• Anyone who has seen this problem?


• Example from “Note on Linear Programming”
Example 5
• A product is assembled with 4 units of component A
and 3 units of component B.

• The manufacturing shop runs three different


processes, each of which requires varying amounts
of raw materials and produce different amounts of
A and B.

• Two types of raw materials are used. 100 units of


raw material I (RM I) and 200 units of raw material II
(RM II) are available to the shop each day.
TTN, Proc. AWTOR
The following table gives the information on the
quantities of raw materials consumed by each
process and the yield of A and B from each of
them

Input per run Output per run


Shop (units) (units)

RM I RM II A B
I 7 5 6 4
II 4 8 5 8
III 2 7 7 3
Formulate as an LP to maximize the number of
completed assemblies produced each day.
Decision Variables

Let x1, x2 and x3 be the number of runs of


processes I, II and III, respectively.
100 units of raw material I (RM I) and 200 units
of raw material II (RM II) are available to the
shop each day.

Input per run Output per run


Shop (units) (units)

RM I RM II A B
I 7 5 6 4
II 4 8 5 8
III 2 7 7 3
Constraints

• 7x1 + 4x2 + 2x3 ≤ 100

• 5x1 + 8x2 + 7x3 ≤ 200

• x1, x2, x3 ≥ 0
Objective Function?
• Total quantity of A produced
= 6x1 + 5x2 + 7x3

• Total quantity of B produced


= 4x1 + 8x2 + 3x3

• Number of completed assemblies


=
• Total quantity of A produced
= 6x1 + 5x2 + 7x3

• Total quantity of B produced


= 4x1 + 8x2 + 3x3

• Number of completed assemblies


= min { (6x1 + 5x2 + 7x3)
• Total quantity of A produced
= 6x1 + 5x2 + 7x3

• Total quantity of B produced


= 4x1 + 8x2 + 3x3

• Number of completed assemblies


= min { (6x1 + 5x2 + 7x3) / 4
• Total quantity of A produced
= 6x1 + 5x2 + 7x3

• Total quantity of B produced


= 4x1 + 8x2 + 3x3

• Number of completed assemblies


= min { (6x1 + 5x2 + 7x3) / 4 ,
(4x1 + 8x2 + 3x3) / 3 }
Objective
Maximize min { (6x1 + 5x2 + 7x3) / 4 ,
(4x1 + 8x2 + 3x3) / 3 }

Linear?

max z = y
s.t. y ≤ (6x1 + 5x2 + 7x3) / 4
y ≤ (4x1 + 8x2 + 3x3) / 3
LP Formulation of Example 5
x1, x2, x3: number of runs of I, II, III, respectively.
y: number of completed assemblies

max z = y

s.t. y ≤ (6x1 + 5x2 + 7x3) / 4


y ≤ (4x1 + 8x2 + 3x3) / 3
7x1 + 4x2 + 2x3 ≤ 100
5x1 + 8x2 + 7x3 ≤ 200
y, x1, x2, x3 ≥ 0
Questions?
Example 7
• ABC Pottery Company makes clay bowls and
clay mugs, and has 120 lbs of clay per day and
40 hrs of labor per day.

• The unit contribution per bowl is $40 and that


per mug is $50.

• How many bowls and mugs should AAA make


so as to maximize total contribution, given the
following usage of labor and materials
constraints?
Resource Requirements
Product Labor Clay
(hr/unit) (lb/unit)
Bowl 1 4
Mug 2 3
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day

The unit contribution per bowl is $40 and that per mug is $50.
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize z = $40x1 + $50x2
Function: where z = total contribution per day
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize z = $40x1 + $50x2
Function: where z = total contribution per day

Resource Requirements
Product Labor Clay
(hr/unit) (lb/unit)
Bowl 1 4
Mug 2 3
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize z = $40x1 + $50x2
Function: where z = total contribution per day
Resource x1 + 2x2  40 hours of labor
Constraints:
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize z = $40x1 + $50x2
Function: where z = total contribution per day
Resource x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
LP Formulation

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize z = $40x1 + $50x2
Function: where z = total contribution per day
Resource x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
Non-Negativity x1  0; x2  0
Constraints:
Solving the LP

If feasible, then

• Find the optimal objective function value

• Find all possible optimal values of the decision


variables
Graphical Solution:
Coordinate Axes

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

Figure 1 Coordinates for graphical analysis


Labor Constraint Boundary Line

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

Figure 2 Graph of the labor constraint line


Labor Constraint Feasible Region

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

Figure 3 The labor constraint feasible area


Clay Constraint Feasible Area

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2 0

Figure 4 Feasible area for the clay constraint


Feasible Set

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

Figure 5 Graph of both model constraints and the feasible set


Feasible and infeasible points

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

Figure 6 Points inside/ outside the feasible set


Continuing with some
Mathematical Background

• Convex set
Examples of Convex Sets
In general…

Any region formed by the intersection of linear


constraints is convex.
Example of an Unbounded Convex Set
Other Examples of Convex Sets
Examples of non-convex sets
Examples of non-convex sets
To solve LPs, observe that

• If A(x1, y1) and B(x2, y2) are optimal, then


any point on AB is optimal.

• It suffices to look at corner points (vertices).


B

A
B

A
B

A
B

A
• The rate of change of x2 with respect to x1 is a
constant.

• Slope.
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0

40x1+ 50x2 = 0
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0
Solving Graphically

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x1 + 3x2  120 pounds of clay
x1, x2  0
Solving…

• …by exhausting all vertices.


Solving the LP by looking at all corner points

0 (0, 0) 0
A (0, 20) 1000
B (24, 8) 1360
C (30, 0) 1200

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor A
4x1 + 3x2  120 pounds of clay
x1, x2  0
B

Figure 6 Solving the LP


Example of a Minimization Problem: XYZ Fertilizer Company

• Two brands of fertilizer available - Super-gro, Crop-quick.


• Field requires at least 16 pounds of nitrogen and 24 pounds of phosphate.
• Super-gro costs $6 per bag, Crop-quick $3 per bag.
• Problem : How much of each brand to purchase to minimize total cost of
fertilizer given following data ?

Chemical Contribution

Nitrogen Phosphate
Brand (lb/bag) (lb/bag)

Super-gro 2 4

Crop-quick 4 3
LP Formulation

Decision variables
x1 = bags of Super-gro
x2 = bags of Crop-quick
The objective function:
minimize Z = $6x1 + 3x2
where $6x1 = cost of bags of Super-gro
3x2 = cost of bags of Crop-quick
Model constraints:
2x1 + 4x2  16 lb (nitrogen constraint)
4x1 + 3x2  24 lb (phosphate constraint)
x1, x2  0 (non negativity constraints)
Formulation and Graph

minimize Z = $6x1 + 3x2


subject to
2x1 + 4x2  16 lb of nitrogen
4x1 + 3x2  24 lb of phosphate
x1, x2  0

Figure 2.14 Constraint lines


Feasible Area or Feasible Set

minimize Z = $6x1 + 3x2


subject to
2x1 + 4x2  16 lb of nitrogen
4x1 + 3x2  24 lb of phosphate
x1, x2  0

Figure 2.15 Feasible solution area


Optimal Solution

minimize Z = $6x1 + 3x2


subject to
2x1 + 4x2  16 lb of nitrogen
4x1 + 3x2  24 lb of phosphate
x1, x2  0

Figure 2.16 The optimal solution point


Case Discussion:
Merton Truck Company

• You are the company’s president.

• What is it that you must decide?

• With what objective?


Questions?
Thank You

You might also like