Ot - 20cys201 (L7-L8)

You might also like

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

Optimization Techniques- 20CYS201

Dr. Satyendra Singh Chauhan


Assistant Professor, Department of Mathematics,
ASE, Amrita Vishwa Vidyapeetham, Chennai- 601103
sdg25792@gmail.com, c satyendrasingh@ch.amrita.edu
Lecture- 7

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 2 / 29


Method of Lagrange Multipliers
Problem with Two Variables and One Constraint
Consider the problem, minimize the function
f (x1 , x2 )
subject to the condition
g(x1 , x2 ) = 0.
For this problem, the necessary condition for the existance of an extrem point
at X = X ∗ was discussed
 
∂f ∂ f /∂ x2 ∂ g
− =0 (0.1)
∂ x1 ∂ g/∂ x2 ∂ x1 (x∗ ,x∗ )
1 2

By defining a quantity λ , called the lagrange multiplier, as


 
∂ f /∂ x2
λ= − (0.2)
∂ g/∂ x2 ∗ ∗ (x1 ,x2 )

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 3 / 29


Equation (0.1) can be expressed as
 
∂f ∂ g
+λ =0 (0.3)
∂ x1 ∂ x1 (x∗ ,x∗ )
1 2

and equation (0.2) can be expressed as


 
∂f ∂ g
+λ =0 (0.4)
∂ x2 ∂ x2 (x∗ ,x∗ )
1 2

The constraint equation has to be satisfied at the extreme point, i.e.,

g(x1 , x2 )|(x1∗ ,x2∗ ) = 0 (0.5)

Thus eqns (0.3) and (0.5) represent the necessary conditions for the point
(x1∗ , x2∗ ) to bean extreme
 point.
∂g
Notice that ∂ x2 ∗ ∗ has to be nonzero, to be able to define λ by eqn
(x1 ,x2 )
(0.2). This is because the variation dx2 was expressed in terms of dx1 in the
derivation of eqn (0.1).
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 4 / 29
The necessary conditions given by equations (0.3) and (0.5) are more
commonly generated by constructing a function L, known as the Lagrange
function, as

L(x1 , x2 , λ ) = f (x1 , x2 ) + λ g(x1 , x2 ). (0.6)

By the treating L as a function of three variables x1 , x2 and λ , the necessary


condition for its extremum are given by

∂L ∂f ∂g
(x1 , x2 , λ ) = (x1 , x2 ) + (x1 , x2 ) = 0 (0.7)
∂ x1 ∂ x1 ∂ x1
∂L ∂f ∂g
(x1 , x2 , λ ) = (x1 , x2 ) + λ (x1 , x2 ) = 0 (0.8)
∂ x2 ∂ x2 ∂ x2
∂L
(x1 , x2 , λ ) = g(x1 , x2 ) = 0 (0.9)
∂λ
Eqns (0.7) − (0.9) can be seen to same (0.3)-(0.5).

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 5 / 29


Example

Minimize the function f (x, y) = k/xy2 subject to constraint


g(x, y) = x2 + y2 − a2 = 0 using Lagrange multiplier method.

Solution: The lagrange function is defined as


L(x, y, λ ) = f (x, y) + λ g(x, y)
= k/xy2 + λ (x2 + y2 − a2 )
The necessary conditions for the minimum of f (x, y) give
∂L
= −k/x2 y2 + 2xλ = 0 (0.10)
∂x
∂L
= −2k/xy3 + 2xλ = 0 (0.11)
∂y
∂L
= x2 + y2 − a2 = 0 (0.12)
∂λ
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 6 / 29
Solving eqn (0.10) − (0.12), we get

k 2k
2λ = =
x3 y2 xy4

From, which the relation x∗ = (1/ 2)y∗ can be obtained. This relation, along
with eqn (0.12) gives the optimum solution as

∗ a ∗ 2a
x =√ and y = √
3 3

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 7 / 29


Convex Function

Convex Function
A function f (x) defined over a convex set S, is said to be a convex function if
f [λ x1 + (1 − λ )x2 ] ≤ λ f (x1 ) + (1 − λ )f (x2 ) for every x1 , x2 ∈ S and 0 ≤ λ ≤ 1.

Strictly Convex Function


A function f (x) defined over a convex set S, is said to be strictly convex
function if f [λ x1 + (1 − λ )x2 ] < λ f (x1 ) + (1 − λ )f (x2 ) for every
x1 , x2 ∈ S and 0 ≤ λ ≤ 1.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 8 / 29


Concave Function
Concave Function
A function f (x) defined over a convex set S, is said to be a concave function if
f [λ x1 + (1 − λ )x2 ] ≥ λ f (x1 ) + (1 − λ )f (x2 ) for every x1 , x2 ∈ S and 0 ≤ λ ≤ 1.

Strictly Concave Function


A function f (x) defined over a convex set S, is said to be a strictly concave
function if f [λ x1 + (1 − λ )x2 ] > λ f (x1 ) + (1 − λ )f (x2 ) for every
x1 , x2 ∈ S and 0 ≤ λ ≤ 1.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 9 / 29


UNIT- 2

1 Linear Programming Problem


2 Geometry of LPP
3 Simplex Algorithm
4 Two-Phases of Simplex Method
5 Revised Simplex method
6 Duality in LPP
7 Dual Simplex Method

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 10 / 29


Lecture- 8

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 11 / 29


Convex sets, Extreme Points, and LPP

A set of points S is a convex set if the line segment jointing any two pairs of
points in S is wholly contained in S.
For any convex set S, a point p in S is an extreme point if each line segment
that lines completely in S and contains the point P has p as an endpoint of the
line segment.
Consider the figures (a)–(d) below:

A E B A B

A B

C D

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 12 / 29


Objective Function
In most models, there will be a function we wish to maximize or minimize.
This function is called the model’s objective function.

Decision Variables
Variables whose values are under our control and influence system
performance are called decision variables.

Constraints
In most situations, only certain values of the decision variables are possible.
These restrictions on the decision variable values are called constraints.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 13 / 29


All OR models, LP included, consist of three basic components:
1 Decision variables that we seek to determine
2 Objective (goal) that we need to optimize (either maximize or minimize)
3 Constraints that the solution must satisfy.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 14 / 29


Example- 1

The Levis garment company manufactures men’s shirts and women’s shirts
for Walmark Discount stores. Walmark will accept all the production supplied
by Levis. The production process includes cutting, sewing and packaging.
Levis employs 25 workers in the cutting department, 35 in the sewing
department and 5 in the packaging department. The factory works one 8-hour
shift, 5 days a week.
The following table gives the time requirements and the profits per unit for the
two garments:

Garments Cutting Sewing Packaging Unit Profit ($)


Men’s Shirts 20 70 12 8.00
Women’s Shirts 60 60 4 12.00
Table 1: Minutes Per Unit

Determine the optimal weekly production schedule for Levis.


Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 15 / 29
Solution
Assume that Levis produces x1 men’s shirts and x2 women’s shirts per hour.
Per hour profit got = 8x1 + 12x2
Time spent on cutting = 20x1 + 60x2 mts
Time spent on sewing = 70x1 + 60x2 mts
Time spent on packaging = 12x1 + 4x2 mts

The objective is to find x1 , x2 so as to maximize the profit Z = 8x1 + 12x2


satisfying the constraints:
20x1 + 60x2 ≤ 25 × 60
70x1 + 60x2 ≤ 35 × 60
12x1 + 4x2 ≤ 5 × 60
x1 ≥ 0, x2 ≥ 0, and x1 , x2 are integers.
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 16 / 29
Example- 2
A furniture makers produces desks, chairs and racks. He has 100 cubic feet
(c.f .) of wood available.
Desk requires 0.8 c.f .
Chair requires 0.4 c.f .
Rack requires 0.5 c.f .
650 man-hours are available.
Desk requires 5 hrs
Chairs requires 3 hrs
Rack requires 3 hrs
Capacity of storing is 1260 sq.ft.
Area required by desk 9 sq.ft.
Area requires chair 6 sq.ft.
Area requires rack 9 sq.ft.
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 17 / 29
Cont...
Market profit – value of
Desk Rs. 20
Chair Rs. 11
Rack Rs. 15
Determine how many desks, chairs and racks should be made to maximize the
profit.
Solution: Objective: To maximize the profit
Decision variables :
x1 = # of desks to be made
x2 = # of chairs to be made
x3 = # of racks to be made
Objective function, maximize
Z = 20x1 + 11x2 + 15x3
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 18 / 29
Cont...

Constraints are
Constraint- 1 Available wood 100 c.f .
Constraint- 2 Available man hours 650
Constraint- 3 Storing capacity 1260 sq.ft.
Therefore

0.8x1 + 0.4x2 + 0.5x3 ≤ 100


5x1 + 3x2 + 3x3 ≤ 650
9x1 + 6x2 + 9x3 ≤ 1260
Non-negative conditions x1 , x2 , x3 ≥ 0, and integers

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 19 / 29


Example- 3
Ready Mikks produces both, interior and exterior paints from two raw
materials, M1 and M2 . The following table provides, the basic data of the
problem:

Tons of raw material per ton of Max daily


Exterior paint Interior paint availability (tons)
Raw material M1 6 4 24
Raw material M2 1 2 6
Profit per ton 5 4
($1000)

A market survey indicates that, the daily demand for interior paint cannot
exceed that of exterior paint by more than 1 ton. Also, the maximum daily
demand of interior paint is 2 tons.
Reddy Mikks want to determine the optimum (best) produced of exterior and
interior paints that maximizes the total daily profit.
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 20 / 29
Solution
Objective: To maximize the profit
Decision variables :
x1 = Tons produced daily of exterior paint
x2 = Tons produced daily of interior paint

Objective function, maximize


Z = 5x1 + 4x2
Constraints are
Constraint- 1 Raw material usage
Constraint- 2 Product demand

Constraint- 1 Raw material usage


Uses of raw material by both paint ≤ Maximum raw material availability
Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 21 / 29
Cont...

Uses of raw material M1 is 6 tons of exterior paint and 4 tons of interior paint.
Therefore

6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
Non-negative conditions x1 , x2 ≥ 0, and integers

Constraint- 2 Product demand

x2 − x1 ≤ 1 Market limit
x2 ≤ 2 Demand limit
Non-negative conditions x1 , x2 ≥ 0

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 22 / 29


Cont...

Maximize Z = 5x1 + 4x2

subject to the constraints

6x1 + 4x2 ≤ 24
1x1 + 2x2 ≤ 6
x2 − x1 ≤ 1
x2 ≤ 2
Non-negative conditions x1 , x2 ≥ 0

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 23 / 29


Exercise- 1

A company manufactures two bottling machines X, and Y. The machine X is


designed for 5-ounce bottles and Y for 10 ounce bottles. However, each can
be used on both type with some loss of efficiency. The following data are
available:
Machine 5-ounce bottles 8-ounce bottles
X 80/min 30/min
Y 40/min 50/min

The machines can be run 8 hr per day, 5 days a week. Profit on 5-ounce bottle
is 20 paise and on 10 ounce bottle is 30 paise. Weekly production of the drink
cannot exceed 500, 000 ounces; and the market can absorb 30, 000 (5 ounce)
bottles and 8000 (10 ounce) bottles per week. The company wishes to
maximize its profit, s.t. all the production and marketing constraints.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 24 / 29


Exercise- 2

A company manufactures two types of products, A and B and sells them at a


profit of Rs. 4 on type A and Rs. 5 on type B. Each product is processed on
two machines, X and Y. Type A requires, 2 minutes of processing time on X
and 3 minutes time on Y. Type B requires, 2 minutes on X and 2 minutes time
on Y. The machine X is available for not more than 5 hours 30 minutes, while
Y is available for 8 hours during any day. Formulate the problem as LP
problem.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 25 / 29


Exercise- 3

Three grades of coal A, B and C contain ash and phosphorus as impurities. In


a particular industrial process a fuel obtained by blending the above grades
containing not more than 25% ash and 0.03% phosphorus is required. The
maximum demand of the fuel is 100 tons. Percentage impurities and cost of
various grades of coal are shown below. Assuming that there is an unlimited
supply of each grade of coal and there is no loss in blending. Formulate the
blending problem to minimize the cost.

Coal grade % ash % phosphorus Cost per ton


A 30 0.02 240
B 20 0.04 300
C 35 0.03 280

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 26 / 29


Exercise- 4

Peter wants to keep some hens with him and has Rs. 2000.The old hen can be
bought for Rs. 50 but young ones cost Rs. 100. The old hen lay 20 eggs per
week and young ones 60 eggs per week, each worth being Re. 1.The feed for
young and old hen costs Rs. 10 and Rs. 6 per hen per week. He can keep 30
hens with him. How many of each kind of hens Peter should buy to get a
profit of more than Rs. 500. Formulate as an LPP.

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 27 / 29


The End

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 28 / 29


Thank You

Dr. Satyendra (ASE, Chennai) Optimization Techniques- 20CYS201 29 / 29

You might also like