42
BITS Pilani K K Birla Goa Campus aaoC zC222 optimization Dr. Anil Kumar Assistant Professor, Department of Mathematics January 11, 2013

Notes on optimization-2

Embed Size (px)

DESCRIPTION

Useful notes for operational research

Citation preview

Page 1: Notes on optimization-2

BITS PilaniK K Birla Goa Campus

aaoC zC222optimization

Dr. Anil KumarAssistant Professor, Department of Mathematics

January 11, 2013

Page 2: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Contents

• Formulation of Linear Programming Problems

• Solution of Linear Programming Problems

• Graphical Method

• Exceptional Cases

Page 3: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Three basic steps in constructing a linear programming model:

• Identify the unknown variables to be determined (decisionvariables) and represent them in terms of algebraic symbols.

• Identify all the restrictions or constraints in the problem andexpress them as linear equations or inequalities which arelinear functions of the unknown variables.

• Identify the objective or criterion and represent it as a linearfunction of the decision variables, which is to be maximized orminimized.

Formulation of LPP

Page 4: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

A Retired person wants to invest up to anamount of Rs. 30000 in fixed incomesecurities. His broker recommends investingin two bonds: Bond A yielding 7% and Bond Byielding 10%. After some consideration, hedecides to invest at most Rs. 12000 in Bond Band at least Rs. 6000 in Bond A. He alsowants the amount invested in Bond A to be atleast equal to the amount invested in Bond B.What should the broker recommended if theinvestor wants to maximize his returns oninvestment? Formulate this problem as alinear programming problem.

Example-1

Page 5: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Let x1 : amount invested in Bond A and

x2 : amount invested in Bond B.

Solution

Page 6: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Therefore, LPP in final form

Max Z = 0.07 x1 + 0.10 x2

Subject to

x1 + x2 ≤ 30000

x1 ≥ 6000

x2 ≤ 12000

x1 –x2 ≥ 0

x1 ≥ 0, x2 ≥ 0

Example-2

Page 7: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solving

Linear Programming Problems

Page 8: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Any values of x1, x2 that satisfy all the Constraints (mainas well as non-negativity constraints) constitute afeasible solution. Otherwise the solution is infeasible.

A feasible solution which optimizes the objective functionvalue of the given LP is called an optimum feasiblesolution.

Aim: The aim of the problem is to find the best (optimal)feasible solution. We need a systematic procedure thatwill locate the optimum solution in a finite number ofsteps.

Solution

Page 9: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

To do that we need to know how many feasiblesolutions the problem has.

We will see that there are infinitely many solutions;which makes it impossible to solve the problem byenumeration. Instead, we need a systematic procedurethat will locate the optimum solution in a finite numberof steps.

Solution…

Page 10: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

GRAPHICAL METHOD

Page 11: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

The graphical procedure includes two steps:

• Determination of the feasible solution space.

– (The feasible solution space of the problemrepresents the area in the first quadrant in which allthe constraints are satisfied simultaneously.)

• Determination of the optimum solution from among allthe feasible points in the solution space.

Graphical Method…

Page 12: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Step 1. Determination of the feasible solution space:

Draw the variable constraints (e.g. the non negativityrestrictions on the decision variables restrict the solutionspace to the first quadrant only)

Draw the main constraints by changing the inequalitiesinto equations and graph the resulting straight lines bylocating two distinct points.

Draw an arrow in the direction of the inequality.

Solving LPP by Graphical method

Page 13: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Step 2: Determination of the optimum solution.

– The optimum solution lies on one of the corner pointsof the feasible solution space

Page 14: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 1

Maximize x + y

Subject to: x + 2 y 2

x 3

y 4

x 0 y 0

Page 15: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

x30 1 2

y

0

1

2

4

3

Feasible Region

x 0 y 0

x + 2 y 2

y 4

x 3

Subject to

Maximize x + y

Optimal Solution

Page 16: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 1…

x30 1 2

y

0

1

2

4

3

Feasible Region

x 0 y 0

x + 2 y 2

y 4

x 3

Subject to:

Maximize x + y

Optimal Solution

Page 17: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 2

Minimize x + 1/3 y

Subject to: x + y 20

-2 x + 5 y 150

x 5

x 0 y 0

Page 18: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

Feasible

Region

x 0 y 0

x + y 20

x 5

-2 x + 5 y 150

Subject to:

Minimize x + 1/3 y

Optimal Solution

x

3010 20

y

0

10

20

40

0

30

40

Page 19: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Determination of the optimum solution.

The optimum solution lies on one of the corner points(vertices) of the feasible region (PF).

Steps for solving the LPP by Graphical

method…

Page 20: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

A Fundamental Point

If an optimal solution exists,

there is always a corner point

optimal solution for LPP!

y

x0

1

2

3

4

0 1 2

3

x3010 20

y

0

10

20

40

0

30

40

Example 1: Optimal Solution

Example 2: Optimal Solution

Page 21: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 3

Maximize Z = x + 5y

Subject to: -x + 3y ≤ 10

x + y 6

x - y 2

x 0, y 0

Page 22: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Graphical Solution

x

62 4

y

0

2

4

8

0

6

8

PF

( 0, 10/3 )

( 2, 4 )

( 4, 2 )

The Vertices are :

(0, 0), (2, 0), (4, 2), (2, 4),

(0,10/3)

Optimal Solution

Page 23: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

The value of the objective function is computed at these are:

Z = 0 at (0, 0) Z = 2 at (2, 0) Z = 14 at (4, 2)

Z = 22 at (2 ,4) Z = 50/3 at (0, 10/3)

Obviously, the maximum occurs at vertex (2, 4) with the maximum value 22. Hence,

Optimal Solution: x = 2, y = 4, z = 22.

Solution…

Page 24: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 4

Minimize Z = x - 2y

Subject to:

-x + y ≤ 1

2x + y 2

x 0 y 0

Page 25: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

x

1 2

y

0

1

2

0

3

3

PF

( 1/3, 4/3 )

The Vertices are :

(0, 0), (1, 0), (0, 1), (1/3, 4/3)

Page 26: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

The value of the objective function is computed at these are:

Z = 0 at (0, 0) Z = 1 at (1, 0) Z = -7/3 at (1/3, 4/3) Z = -2 at (0, 1)

Obviously, the maximum occurs at vertex (1/3, 4/3) with the maximum value -7/3. Hence,

Optimal Solution: x = 1/3, y = 4/3, z = -7/3.

Solution…

Page 27: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Graphical Solution to a 2-Variable LP Exceptional Cases

Page 28: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

• Some LPPs have an infinite number of solutions(alternative or multiple optimal solutions).

• Some LPPs have no feasible solutions (infeasible LPs).

• Some LPPs are unbounded: There are points in thefeasible region with arbitrarily large (in a maximizationproblem) z-values.

Page 29: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 1: Alternate Optimal Solution

Consider the following LPP

1 2

1 2

1 2

1 2

Max 3 2

subject to

1 11

40 60

1 11

50 50

, 0

Z x x

x x

x x

x x

Page 30: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

Any point (solution falling on the line segment AE will yield an optimal solution of Z = 120.

Page 31: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Infeasibility is a condition that arises when no value of thevariable satisfy all the constraints simultaneously.

i.e.

there is no unique (single) feasible region.

Remarks:

Such a problem arises due to wrong model formulation withconflicting constraints.

Infeasibility depends strictly on the constraints and has nothingto do with the objective function.

Case 2: Infeasible Solution

Page 32: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 1

Some LPP’s have no solution. For example:

1 2

1 2

1 2

1

2

1 2

Max 3 2

subject to

1 11

40 60

1 11

50 50

30

30

, 0

Z x x

x x

x x

x

x

x x

Page 33: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

Page 34: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example 2

21

1 2

1

1 2

1 2

1 2

M aximize2

s.t. 3 2 12

5 10

8

4

, 0

xZ x

x x

x

x x

x x

x x

Page 35: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

21

1 2

1

1 2

1 2

1 2

M aximize2

s.t. 3 2 12

5 10

8

4

, 0

xZ x

x x

x

x x

x x

x x

Page 36: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Sometimes an LP problem will not have a finite solution i.e.

when one or more decision variable values and the value of theobjective function (max.) are permitted to increase infinitelywithout violating the feasibility condition, then the solution issaid to be unbounded.

The general cause for an unbounded LP problem is a mistake inmathematical model formulation.

Difference between a feasible region being unbounded and anLP problem being unbounded.

Case 3: Unbounded Solution

Page 37: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Example

1 2

1 2

1 2

1 2

Max 2

s.t. 1

2 6

, 0

Z x x

x x

x x

x x

Page 38: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

Page 39: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Plotting of each of the constraints on the graph serves todetermine the feasible region of the given LPP.

If and when a constraint, when plotted, does not formpart of the boundary marking the feasible region of theproblem, it is said to be redundant.

The inclusion or exclusion of a redundant constraintdoes not affect the optimal solution to the problem.

Redundant Constraint(s)

Page 40: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Consider the following LPP:

Example

1 2

1 2

1 2

1 2

1 2

max 40 35

s.t. 2 3 60

4 3 96

4 3.5 105

, 0

z x x

x x

x x

x x

x x

Page 41: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Solution

Page 42: Notes on optimization-2

BITS Pilani, K K Birla Goa Campus

Thanks