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

EE 413: Operations Research

& Quality Control

Chapter -2

Dr. Kamalakanta Muduli


Associate Professor
Mechanical Engineering Department
Office: 104
Introduction to Linear Programming

◼ A Linear Programming model seeks to maximize


or minimize a linear function, subject to a set of
linear constraints.
◼ The linear model consists of the following
components:
◼ A set of decision variables.
◼ An objective function…
◼ A set of constraints.

2
Classification of Different Programming

LP IP NLP
Variables Continuous Discrete Continuous or
(e.g. 0  x1) (e.g.x=0 or 1) Discrete

Constraints Linear Linear Non-linear


e.g. 3x+2y 7 e.g. 4x-y 5 e.g.14x2 y3 3

Objective Linear Linear Non-linear


e.g. e.g. e.g.
Maximize= 2x+5y Maximize= –3x-2y Maximize=17xy

3
Two Variable LP Model

4
Model Development / Mathematical Formulation

Objective / goal of the study

Determine the following:

5
Model Development / Mathematical Formulation

1.

2.

Data

6
Model Development / Mathematical Formulation

3.

Data

7
Model Development / Mathematical Formulation

3. Demand Constraints:
Daily demand of the interior paint is 2 tons
x2<= 2

Daily demand of the interior paint cannot exceed that of


exterior paint by more than 1 ton
x2-x1<= 1

4. x1 and x2 >=0 {Non-negativity requirement}

Data

8
Model Development / Mathematical Formulation

Any value of x1,x2 that satisfy all the five


constraints will be a feasible solution,
otherwise infeasible solution

Data

9
➢ Feasible: one that satisfy all the constraints
➢ Optimal: in addition to feasible, it gives the best answer or solution
➢ Infeasible: does not satisfy one or more than one of the
constraints

10
What Is a Linear Programming Problem?

1. Attempt to maximize (or minimize) a linear function


(called the objective function) of the decision variables.
2. The values of the decision variables must satisfy a set of
constraints.
3. Each constraint must be a linear equation or inequality…
4. A sign restriction is associated with each variable. For
each variable xi, the sign restriction specifies either that
xi must be nonnegative (xi ≥ 0) or that xi may be
unrestricted in sign.

11
Assumptions of Linear Programming

Proportionality and Additive Assumptions


1. The contribution of the objective function from each
decision variable is proportional to the value of the
decision variable…
2. The contribution to the objective function for any
variable is independent of the other decision
variables.

12
Assumptions of Linear Programming

Proportionality and Additive Assumptions


1. The contribution of each variable to the left-
hand side of each constraint is proportional to
the value of the variable.
2. The contribution of a variable to the left-hand
side of each constraint is independent of the
values of the variable.

13
Assumptions of Linear Programming

Divisibility Assumption

The divisibility assumption requires that each


decision variable be permitted to assume any
fractional values…
The Certainty Assumption

The certainty assumption is that each parameter


(objective function coefficients, right-hand side, and
technological coefficients) are known with certainty.

14
Assumptions of Linear Programming

15
Problem Set 2.1 A

(a) x2- x1>=1 (b) x1+2x2<=6, and x1+2x2>=3


(c) x1 <=x2, or x2- x1>=0 (d) x1+ x2>=3…
(d) x1 / x1+ x2 <=0.5, or .5x2- .5x1>=0

Data

16
Solution: Reddy Mikks Problem
First Constraint Graphed
x2

8 (0, 6)
7
6
6x1 + 4x2 = 24
5 Shaded
4 region contains
all feasible points
3
for this constraint
2
(4, 0)
1
x1
1 2 3 4 5 6 7 8 9 10

17
Reddy Mikks Problem
Second Constraint Graphed
x2

8
7
6
5 Shaded
x1 + 2x2 = 6
4 (0, 3) region contains
all feasible points
3
for this constraint
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10

18
Solution: Reddy Mikks Problem
First and second Constraint Graphed together

x2

8 (0, 6)
7
Common Shaded
6 region contains
6x1 + 4x2 = 24 all feasible points
5
for both constraints
(0, 3)
4 x1 + 2x2 = 6
3
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
(4, 0)
Reddy Mikks Problem
Third Constraint Graphed
x2

8
7
Shaded
(0, 1) 6 -x1 + x2 = 1 region contains
all feasible points
5
for this constraint
4
3
2
1
x1
(-1, 0) 1 2 3 4 5 6 7 8 9 10

20
Solution: Reddy Mikks Problem
First, second, Third Constraint Graphed together

x2

8
(0, 6)
7
6x1 + 4x2 = 24 Common Shaded
6 region contains
x1 + 2x2 = 6 all feasible points
5
for three constraints
4 -x1 + x2 = 1
(0, 3)
3
(0, 1) 2
(6, 0)
1
x1
(-1, 0) 1 2 3 4 5 6 7 8 9 10
(4, 0)
Reddy Mikks Problem
Fourth Constraint Graphed
x2

8
7
6
5 Shaded
x2 = 2
4 (0, 2) region contains
all feasible points
3
for this constraint
2
1
x1
1 2 3 4 5 6 7 8 9 10

22
Solution: Reddy Mikks Problem
All Constraint Graphed together

x2

8
(0, 6)
7
6x1 + 4x2 = 24 Common Shaded
6 region contains
x1 + 2x2 = 6 all feasible points
5
for all constraints
4 -x1 + x2 = 1
(0, 3)
(0, 2) 3 x2 = 2
(0, 1) 2
(6, 0)
1
x1
(-1, 0) 1 2 3 4 5 6 7 8 9 10
(4, 0)
Reddy Mikks Problem
All Constraint Graphed

Shaded
-x1 + x2 = 1
region contains
x2 x2 = 2 all feasible points
x1 + 2x2 = 6 for all the constraint
3

2 E D 6x1 + 4x2 = 24
C
F
1
B x1
A
1 2 3 4 5

24
Reddy Mikks Problem
All Constraint Graphed

Max Z = 5x1+4x2=10
Max Z = 5x1+4x2=15
Max Z = 5x1+4x2=21…
Z=21
-x1 + x2 = 1 Z=15
Z=10 x2 x2 = 2 C=(3,1.5)
x1 + 2x2 = 6
3

2 E D 6x1 + 4x2 = 24
C
F
1
B x1
A
1 2 3 25
4 5
Reddy Mikks Problem

x2
3

2 E D
C
Extreme Point coordinates Z
F
1 A (0,0) 0
B B (4,0) 20
A x1
C (3,1.5) 21
1 2 3 4 5 D (2,2) 18
E (1,2) 13
F (0,1) 4

26
Convex Set

Theorem - I
A set of feasible solutions of a linear programming problem
is a convex set such that, If we take two points in the set,
then the line joining these points also lies within the set

x2
x2
x1
x1

27
Convex Set
Theorem - II

The objective function takes it maximum or minimum value


at one of its extreme points

Extreme points in a convex set are one that can not be represented by
the linear combination of any two points of the feasible set…

28
Extreme Points and the Optimal Solution

◼ The corners or vertices of the feasible region are


referred to as the extreme points.
◼ An optimal solution to an LP problem can be found at an
extreme point of the feasible region.
◼ When looking for the optimal solution, you do not have
to evaluate all feasible solution points…
◼ You have to consider only the extreme points of the
feasible region.

29
Problem Set 2.2 A

3.(a)
Determine the solution space and the optimum solution of the Reddy Mikks Model
When The maximum daily demand for interior paint is 1.9 tons and that for exterior
paint is at the most 2.5 tons
x2
3

2 E D
C
F
1
B x1
A
1 2 3 30 4 5
Problem Set 2.2 A

x2
3
x2 <=1.9 x1<=2.5
2

1
x1
1 2 3 4 5

31
Problem Set 2.2 A

x2
3
x2 <=1.9 x1<=2.5
2

1
x1
1 2 3 4 5

32
Problem Set 2.2 A

Extreme Point coordinates Z


x2
A (0,0) 0
3 B (2.5,0) 12.5
C (2.5,1.75) 19.5
2 E D D (2.2,1.9) 18.6
C E (.9,1.9) 12.1
F F (0,1) 4
1
x1
A
1 2 B 3 4 5

33
Minimization LP Model

34
Three Basic Elements

35
First Element
1. Decision Variable Elements

36
Second Elements
2. Objective / Goal

37
Third Elements
3. Constraints
x1 + x2>=800 {total feed requirement}
0.09x1+0.6x2>=0.3 (x1 + x2) {Protein requirement}
0.02x1+0.06x2<=0.05 (x1 + x2) {Fiber requirement}…
x1 and x2 >=0 {Non-negativity requirement}

38
Summary of the Model

39
Solution of the LP Model

B A = (470.6,329.4), Z=437.64
B = (200,600), Z=600
A

40
Problem Set 2.2 B
to 400 lb.

41
Problem Set 2.2 B

X1<=400

400

42
Problem Set 2.2 B

X1<=400

B
A

400

43
Problem Set 2.2 B

X1<=400

B Extreme Point coordinates Z


A A (400,400) 480
B (200,600) 600
C (400,1200) 1200

400

44
Special Cases in LP : Graphical Method

45
Special Cases

Infeasibility
• No solution to the LP problem satisfies all the constraints,
including the non-negativity conditions.
• Graphically, this means a feasible region does not exist.
• Causes include:
• A formulation error has been made.
• Management’s expectations are too high…
• Too many restrictions have been placed on the problem
(i.e. the problem is over-constrained).

46
Example: Infeasible Problem

◼ Consider the following LP problem.

Max 2x1 + 6x2

s.t. 4x1 + 3x2 < 12


2x1 + x2 > 8

x1, x2 > 0

47
Example: Infeasible Problem
◼ There are no points that satisfy both constraints, so there
is no feasible region (and no feasible solution, hence
infeasible).
Max 2x1 + 6x2
x2 s.t. 4x1 + 3x2 < 12
10 2x1 + x2 > 8
8 x1, x2 > 0
6
4x1 + 3x2 < 12
4

x1
2 4 6 8 10
48
Example: Infeasible Problem
◼ There are no points that satisfy both constraints, so there
is no feasible region (and no feasible solution, hence
infeasible).

x2
10
2x1 + x2 > 8
8

6
4x1 + 3x2 < 12
4

x1
2 4 6 8 10
49
Special Cases

Unbounded
• The solution to a maximization LP problem is
unbounded, if the value of the solution may be
made indefinitely large without violating any of
the constraints.
• For real problems, this is the result of improper
formulation. (Quite likely, a constraint has been
inadvertently omitted.)

50
Example: Unbounded Solution
◼ Consider the following LP problem.

Max 4x1 + 5x2

s.t. x1 + x2 > 5
3x1 + x2 > 8

x1, x2 > 0

51
Example: Unbounded Solution
◼ The feasible region is unbounded and the objective function line can be
moved outward from the origin without bound, infinitely increasing
the objective function.

Max 4x1 + 5x2 x2


s.t. x1 + x2 > 5
10
3x1 + x2 > 8
3x1 + x2 > 8
x1, x2 > 0
8

4
x1 + x2 > 5
2

x1
2 4 52
6 8 10
Example: Unbounded Solution (one direction)

◼ Consider the following LP problem.

Max 4x1 + 5x2

s.t. x1 + x2 > 5
3x1 + x2 > 8
x1 ≤ 4
x1, x2 > 0

53
Example: Unbounded Solution (one direction)
◼ The feasible region is unbounded in x2 direction and the objective
function line can be moved outward from the origin without bound in
the x2 direction, infinitely increasing the objective function.
Max 4x1 + 5x2
s.t. x1 + x2 > 5
x2 x1 ≤ 4 3x1 + x2 > 8
3x1 + x2 > 8 x1 ≤ 4
10 x1, x2 > 0

4
x1 + x2 > 5
2

x1
2 4 54
6 8 10
Example: Unbounded Solution (one direction)
◼ The feasible region is unbounded in x2 direction and the objective
function line can be moved outward from the origin without bound in
the x2 direction, infinitely increasing the objective function.

x2 x1 ≤ 4 Max 4x1 + 5x2


3x1 + x2 > 8
10 Max 16 + 5x2

6
Final feasible solution space
4
x1 + x2 > 5
2

x1
2 4 55
6 8 10
Special Cases

Redundant Constraints - do not affect the feasible region

Example: x < 10
x < 12

The second constraint is redundant because it is less


restrictive.
Special Cases
Alternate Optimal Solutions – when there are more than one
optimal solutions

Max 2T + 2C

Subject to:

T + C < 10
T < 5
C< 6

T, C > 0
Special Cases
Alternate Optimal Solutions – when there are more than one
optimal solutions
C
Max 2T + 2C 10
All points on
Subject to:
Red segment
6
T + C < 10 are optimal
T < 5
C< 6

T, C > 0
0
0 5 10 T

When the slope of Objective function is the same as the slope of one
of the constraints
Formulation of LP: Examples

59
Diet Problem Formulation

60
Diet Problem Formulation
Decision variables Objective Function
x1= Quantity of milk (Gallons)
Minimize z = 2x1+ 0.2x2 + 0.25x3
x2= Quantity of Beans (Cups)
x3= Quantity of Oranges (Numbers)
Constraints
3.20x1+ 4.9x2 + 0.80x3≥ 13.0 (Niacin)
1.12x1+ 1.3x2 + 0.19x3≥ 1.50 (Thiamin)
32.0x1+ 0.0x2 + 93.0x3≥ 45.0 (Vitamin C)…
x1≥0 , x2 ≥0 , x3 ≥0 (Non-negativity)

61
Scheduling / Man Power Planning Formulation

62
Scheduling / Man Power Planning Formulation
Decision variables

x1 = No. of officers Joining duty in the first slot : 12 AM – 4 AM


x2 = No. of officers Joining duty in the second slot : 4 AM – 8 AM
x3 = No. of officers Joining duty in the third slot : 8 AM – 12 PM
x4 = No. of officers Joining duty in the forth slot : 12 PM – 4 PM
x5 = No. of officers Joining duty in the fifth slot : 4 PM – 8 PM
x6 = No. of officers Joining duty in the sixth slot : 8 PM – 12 AM

Objective Function
Minimize z = x1+x2+x3+x4+x5+x6

63
Scheduling / Man Power Planning Formulation
Objective Function
Minimize z = x1+x2+x3+x4+x5+x6

Constraints

x1 + x2 ≥ 5
x2 + x3 ≥ 7
x3 + x4 ≥ 15
x4 + x5 ≥ 8
x5 + x6 ≥ 12
x6 + x1 ≥ 9….

x1 ≥ 0, x2 ≥ 0

64
Bank Loan Model
Bank One

65
Bank Loan Model
Decision variables

x1 = Amount of personal loan (million dollar)


x2 = Amount of car loan (million dollar)
x3 = Amount of home loan (million dollar)
x4 = Amount of farm loan (million dollar)
x5 = Amount of commercial loan (million dollar)

66
Bank Loan Model
Objective Function
z=Total interest (Revenue) – Bad Debt (loss in revenue)
Interest revenue generated from the good standing of loan.
In case of personal loan bad debt is 0.1 , hence loan with good standing will be 0.9

Total Interests = .14 (0.9) x1+ .13 (0.93) x2+ .12 (0.97) x3+.125(.95)x4+ .1 (0.98) x5
Bad debt =0.1 x1+ 0.07 x2+ 0.03 x3+0.05 x4+ 0.02 x5

Maximize z = 0.026 x1+ 0.0509 x2+ 0.0864 x3+0.06875 x4+ 0.078 x5

67
Bank Loan Model
Constraints

x1 + x2 + x3 + x4 + x5 ≤12 ( Total funds)

x4 + x5 ≥ 0.4 (x1 + x2 + x3 + x4 + x5 ) {farm and commercial loans}


x3 ≥ 0.5 (x1 + x2 + x3) {home loans}
0.1x1 + 0.07x2 + 0.03x3 + 0.05x4 + 0.02x5 ≤ .04 (x1 + x2 + x3 + x4 + x5 )

x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0 {non-negativity)

68
Blending Problem formulation
An oil company makes two blends of fuel by mixing three oils.
The costs and availability (daily) is given below:

The requirement of the blends are as given below

Each liter of blend 1 can be sold for $1.1 and each liter of blend 2 can be sold at $1.2

Also, at least 10,000 liter of each blend is to be produced.

69
Blending Problem formulation
Decision variables
x1 = Amount of A oil used in Blend 1
x2 = Amount of B oil used in Blend 1
x3 = Amount of C oil used in Blend 1
x4 = Amount of A oil used in Blend 2
x5 = Amount of B oil used in Blend 2…
x6 = Amount of C oil used in Blend 2

70
Blending Problem formulation
Objective Function
Maximize Z (Profit) = Revenue (R) – Cost (C)
Revenue (R)= 1.1 (x1+ x2+ x3) + 1.2 (x4+ x5+ x6)

Cost (C)= 0.3 (x1+ x4) + 0.4 (x2+ x5) + 0.48 (x3+ x6)

Each liter of blend 1 can be sold for $1.1 and each liter of blend 2 can be sold at $1.2

71
Blending Problem formulation
Constraints
Amount of Oil available Production Requirement
(x1+ x4) ≤ 6000 (1) (x1+ x2 + x3) ≥ 10000 (4)
(x2+ x5) ≤ 10000 (2) (x4+ x5 + x6) ≥ 10000 (5)
(x3+ x6) ≤ 12000 (3)
Blend 1 requirement Blend 2 requirement
{x1 /( x1 + x2 + x3 )} ≥ 0.3 (6) {x 4 /( x 4 + x5 + x6 )} ≤ 0.40 (9)
{x2 /( x1 + x2 + x3 )} ≤ 0.5 (7) {x5 /( x4 + x5 + x6 )} ≥ 0.35 (10)
{x3 /( x1 + x2 + x3 )} ≥ 0.3 (8) {x6 /( x 4 + x5 + x6 )} ≤ 0.40 (11)
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0, x6 ≥ 0 {non-negativity)

Each liter of blend 1 can be sold for $1.1 and each liter of blend 2 can be sold at $1.2
Also, at least 10,000 liter of each blend is to be produced.
72
Media selection problem formulation

Example
A company has budget up to $8000 per week for local advertisement.

The money is to be allocated among four promotional media:

TV spots, newspaper ads, and two types of radio advertisements.

The company goal is to reach the largest possible high-potential


audience through the various media.

73
Media selection problem formulation
The following table presents the number of potential customers reached by making
use of advertisement in each of the four media. It also provides the cost per
advertisement placed and the maximum number of ads than can be purchased per
week.

Medium Audience Cost Maximum


Reached per ad per ad ads per week
TV spot (1 minute) 5000 800 12
Daily newspaper (full-page ad) 8500 925 5

Radio spot (30 second, prime time) 2400 290 25

Radio spot (1 minute, afternoon) 2800 380 20

The company arrangements require that at least 5 radio spots be placed each
week. To ensure a board-scoped promotional campaign, management also insists
that no more than $1800 be spent on radio advertising every week.
74
Media selection problem formulation
Decision variables
X1 = number of 1-minute TV spots taken Each week
X2 = number of full-page daily newspaper ads taken each week.
X3 = number of 30-second prime-time radio spots taken each week.
X4 = number of 1-minute afternoon radio spots taken each week.

Medium Audience Cost Maximum


Reached per ad per ad ads per week
TV spot (1 minute) 5000 800 12
Daily newspaper (full-page ad) 8500 925 5

Radio spot (30 second, prime time) 2400 290 25

Radio spot (1 minute, afternoon) 2800 380 20


75
Media selection problem formulation

Objective Function
The company goal is to reach the largest possible high-potential
audience through the various media.

Maximize Z = 5000 X1 + 8500 X2 + 2400 X3 + 2800 X4

Medium Audience Cost Maximum


Reached per ad per ad ads per week
TV spot (1 minute) 5000 800 12
Daily newspaper (full-page ad) 8500 925 5

Radio spot (30 second, prime time) 2400 290 25

Radio spot (1 minute, afternoon) 2800 380 20


76
Media selection problem formulation
Constraints
x1 ≤ 12 (max ad per week TV)
x2 ≤ 5 (max ad per week news paper)
x3 ≤ 25 (max ad per week 30 sec Radio Spot)
x4 ≤ 20 (max ad per week 1 min Radio Spot)
800 x1 + 925 x2 + 290 x3 + 380 x4 ≤ 8000 (weekly Budget)
x3 + x4 ≥ 5 (minimum limit on Radio spot advertisement)
290 x3 + 380 x4 ≤ 1800 (maximum limit of spending on Radio advertisement)
x1, x2, x3, x4  0
Medium Audience Cost Maximum ads
Reached per ad per ad per week
TV spot (1 minute) 5000 800 12
Daily newspaper (full-page ad) 8500 925 5
Radio spot (30 second, prime time) 2400 290 25
Radio spot (1 minute, afternoon) 2800 380 20

The company arrangements require that at least five radio spots be placed each week. To
ensure a board-scoped promotional campaign, management also insists that no more than
$1800 be spent on radio advertising every week. 77
Trim Loss / Cutting Stock problem formulation

78
Trim Loss / Cutting Stock problem formulation

However, there may be more settings by which the rolls can be cut

79
Trim Loss / Cutting Stock problem formulation

The feasible cut setting of the rolls. Note that there must not be any setting
That produces the waste equal to or greater than 5 feet width. As the
Minimum size of the roll requirement is 5 feet.

80
Trim Loss / Cutting Stock problem formulation
Decision variables
x1= number of rolls to cut as per setting 1
x2= number of rolls to cut as per setting 2
x3= number of rolls to cut as per setting 3
x4= number of rolls to cut as per setting 4
x5= number of rolls to cut as per setting 5
x6= number of rolls to cut as per setting 6

81
Trim Loss / Cutting Stock problem formulation
Objective Function
Minimize the total waste
z =4x1+ 3x2 + 1x3 + 0x4 + 1x5 + 2x6

Constraints
0x1+ 2x2 + 2x3 + 4x4 + 1x5 + 0x6 ≥ 150 (Number of rolls of size 5 feet)
1x1+ 1x2 + 0x3 + 0x4 + 2x5 + 0x6 ≥ 200 (Number of rolls of size 7 feet)
1x1+ 0x2 + 1x3 + 0x4 + 0x5 + 2x6 ≥ 300 (Number of rolls of size 9 feet)
x1, x2, x3, x4, x5, x6  0

82

You might also like