Intro week3 excel vba_114e
-
Upload
yashwant-raj-verma -
Category
Technology
-
view
304 -
download
0
description
Transcript of Intro week3 excel vba_114e
![Page 1: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/1.jpg)
Introduction to Operations Research and Linear Programming
![Page 2: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/2.jpg)
Introduction• Our world is filled with limited resources.
• Oil• Land
• Human• Time
• Business• Resource (Budget)
• Manufacturing • m/c , number of worker
• Restaurant• Space available for seating
![Page 3: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/3.jpg)
Introduction
• How best to used the limited resources available ?
• How to allocate the resource in such a way as to maximize profits or minimize costs ?
![Page 4: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/4.jpg)
Introduction
• Mathematical Programming(MP) is a field of management science or operations research that fines most efficient way of using limited resources/ to achieve the objectives of a business.
Optimization
![Page 5: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/5.jpg)
Characteristics of Optimization Problems
• One or more decisions• Restrictions or constraints
e.g. Determining the number of products to manufacturea limited amount of raw materialsa limited amount of labor
• Objective– The production manager will choose the mix of
products that maximizes profits– Minimizing the total transportation cost
![Page 6: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/6.jpg)
Expressing optimization problems mathematically
• Decision variablesX1 , X2 , X3 , … , Xn
e.g. the quantities of different products Index n = the number of product types
• Constraints– a less than or equal to constraint : f(X1 , X2 , X3 , … , Xn) < b– a greater than or equal to constraint : f(X1 , X2 , X3 , … , Xn) > b– an equal to constraint : f(X1 , X2 , X3 , … , Xn) = b
• Objective – MAX(or MIN) : f(X1 , X2 , X3 , … , Xn)
![Page 7: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/7.jpg)
Mathematical formulation of an optimization problem
MAX(or MIN) : f(X1 , X2 , X3 , … , Xn)
Subject to: f(X1 , X2 , X3 , … , Xn) < b1
….f(X1 , X2 , X3 , … , Xn) > bk
….f(X1 , X2 , X3 , … , Xn) = bm
note : n variables , m constraints
![Page 8: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/8.jpg)
Mathematical programming techniques
The function in model : f(x) -Linear-Nonlinear
Decision variable -Fractional value e.g. 2.33-Integer value e.g. 1,2,3,4..-Binary e.g. 0,1
Test : Linear functions?1.
2.
3.
5032 321 xxx
602 21 xx
75)3/1(4 21 xx
9.0323
321
321 xxx
xxx
4.
5.
4573 221 xx
![Page 9: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/9.jpg)
Problem• Blue Ridge Hot Tubs manufactures and sells two models of hot tubs :
Aqua Spa and the Hydro-Lux. – Howie Jones, the owner and manager of the company, needs to
decide how many of each type of hot tubs to produce– 200 pumps available – Howie expects to have 1,566 production labor hours and
2,880 feet of tubing available.– Aqua-Spa requires 9 hours of labor and 12 feet of tubing– Hydro-Lux require s 6 hours of labor and 16 feet of tubingAssuming that all hot tubs can be sold To maximize profits, how many Aqua-Spas and Hydra-Luxs should be
produce?
![Page 10: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/10.jpg)
![Page 11: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/11.jpg)
Formulating LP Models1. Understand the problem2. Indentify the decision variable3. State the objective as a linear combination of decision variables
Max : 350x1 + 300x2
4. State the constraints as linear combinations of the decision variable 4.1 Pumps available 4.2 labor available4.3 Tubing available
5. Identify any upper or lower bounds on the decision variable x1 > 0
x2 > 0
![Page 12: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/12.jpg)
Max : 350x1 + 300x2
Subject to:
x1 + x2 < 200 , Pumps available
9x1 + 6x2 < 1,566 , Labors available
12x1 + 16x2 < 2,880 , Tubing available
x1 > 0
x2 > 0
![Page 13: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/13.jpg)
General Form of an LP model
MAX(or MIN) : C1X1+ C2X2+ , … , CnXn
Subject to: a11X1+ a12X2+ , … , a1nXn < b1
ak1X1+ ak2X2+ , … , aknXn > bk
am1X1+ am2X2+ , … , amnXn = bm
![Page 14: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/14.jpg)
Notations
a11X1+ a12X2+ , … , a1nXn < b1
X1+ X2+ , … ,+ Xn = b1
X11 + X21+ X31 = b1
X12 + X22+ X32 = b2
11
1 bxa i
n
ii
11
bxn
ii
ji
ij bx
3
1j,
![Page 15: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/15.jpg)
Graphical Method:Solving LP Problems
![Page 16: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/16.jpg)
Graphical Method
x1+x2 ≤ 200 (1)
![Page 17: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/17.jpg)
Graphical Method
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 200 (1)
Note : X1 = 0 , x2 = 1566/6 = 261X2 = 0 , x1 = 1566/9 =174
![Page 18: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/18.jpg)
Graphical Method
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 200 (1)
12x1+ 16x2 ≤ 2,880 (3)
Note : X1 = 0 , x2 = 2880/16 = 180X2 = 0 , x1 = 2880/12 = 240
![Page 19: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/19.jpg)
Graphical Method
MAX 350x1 + 300x2
![Page 20: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/20.jpg)
Using level curves
• MAX 350x1 + 300x2
1. Set a number of objective e.g. Obj = 35,000
2. Finding points (x1,x2) which has obj = 35,000 x1 = 100 , x2 = 0
x1 = 0 , x2 = 116.67
![Page 21: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/21.jpg)
Graphical Method
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 200 (1)
12x1+ 16x2 ≤ 2,880 (3)
MAX 350x1 + 300x2
![Page 22: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/22.jpg)
Finding the optimal solution
9x1+ 6x2 = 1,566 (2)x1+x2 = 200 (1)
9x1+ 6(200 –x1) = 1,5663x1+ 1,200 = 1,5663x1 = 366Optimal Solution = x1 = 122X2 = 78
![Page 23: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/23.jpg)
Special Conditions in LP Models
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 200 (1)
12x1+ 16x2 ≤ 2,880 (3)
MAX 450x1 + 300x2
1. Alternate Optimal Solutions - having more than one optimal solution
![Page 24: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/24.jpg)
Special Conditions in LP Models
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 225 (1)
12x1+ 16x2 ≤ 2,880 (3)
MAX 350x1 + 300x2
2. Redundant Constraints A constraint that plays no role in determining the feasible region of the problem.
![Page 25: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/25.jpg)
Special Conditions in LP Models
-x1+ 2x2 ≤ 400 (2)
x1+ x2 ≥ 400 (1)
x1 ≥ 0
MAX x1 + x2
3. Unbounded Solutions The objective function can be made infinitely large.
x2 ≥ 0
![Page 26: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/26.jpg)
Special Conditions in LP Models
4. Infeasibility
x1+ x2 ≤ 150 (1)
x1+ x2 ≥ 200 (2)
x1 ≥ 0
MAX x1 + x2
x2 ≥ 0 ?
– No ways to satisfy all of the constraints
![Page 27: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/27.jpg)
Using Excel Solver
![Page 28: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/28.jpg)
Using Excel Solver
Model Excel SolverObjective Set Target CellDecision Variable Changing CellsConstraints Subject to the constraints
![Page 29: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/29.jpg)
Using Excel Solver
9x1+ 6x2 ≤ 1,566 (2)
x1+x2 ≤ 200 (1)
12x1+ 16x2 ≤ 2,880 (3)
MAX 350x1 + 300x2
Parameters Profit /unit of each product , Pumps Req /unit, no. Pumps available ,Labor Req /unit, no. labor available ,Tubing Req /unit, no. Tubing available
Decision Variables
No. Aqua-Spas produceNo. Hydra-Luxs produce
Objective Maximize Profit
Constraint Pumps available , labor available , Tubing available
![Page 30: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/30.jpg)
Using Excel Solver
![Page 31: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/31.jpg)
Using Excel Solver
![Page 32: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/32.jpg)
Modeling LP Problems
1. Make vs. Buy Decisions - The Electro-Poly corporation received a $750,000 order for various quantities of 3 types of slip rings.- Each slip ring requires a certain amount of time to wire and hardness.
Model1 Model2 Model3
Number ordered 3,000 2,000 900
Hours of wiring required per unit 2 1.5 3
Hours of harnessing required per unit 1 2 1
The company has only 10,000 hours of wiring capacity.The company has only 5,000 hours of harnessing capacity.
![Page 33: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/33.jpg)
![Page 34: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/34.jpg)
Make vs. Buy Decisions (Continue)
The company can sub contract to one of its competitors.
Determine the number of slip rings to make and the number to buy in order to fill the customer order at the least possible cost
Cost($) Model1 Model2 Model3
Cost to make 50 83 130
Cost to buy 61 97 145
![Page 35: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/35.jpg)
Make vs. Buy Decisions (Continue)• Defining the decision variables
mi = number of model i slip rings to make in-house
bi = number of model i slip rings to buy from competitor
• Defining the objective function– To minimize the total cost
Min : 50m1 + 83m2 + 130m3 + 61b1+ 97b2 + 145b3
Subject to:
2m1 + 1.5m2 + 3m3 < 10,000 , wiring constraint
1m1 + 2m2 + m3 < 5,000 , harness constraint
m1 + b1 = 3,000 , Required order of model1
m2 + b2 = 2,000 , Required order of model2
m3 + b3 = 900 , Required order of model3
m1 , m2 ,m3 , b1 , b2 ,b3 , > 0
![Page 36: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/36.jpg)
Make vs. Buy Decisions
Parameters Cost to buy, Cost to make, Number ordered, Hours of wiring , Hours of harnessing
Decision Variable - number of model i slip rings to make in-house- number of model i slip rings to buy from competitor
Objective Total Cost
Constraint wiring constraint harness constraint Required order of each model
![Page 37: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/37.jpg)
![Page 38: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/38.jpg)
A transportation problemSupply R/M Area Processing Plant Capacity
275,000 200,000
400,000 600,000
300,000 225,000
i1
i2
i3
j1
j2
j3
Distance : (mile) j1 j2 j3
i1 21 50 40
i2 35 30 22
I3 55 20 25
![Page 39: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/39.jpg)
A transportation problem• How many product should be shipped from r/m area to the processing plant,
the trucking company charges a flat rate for every mile. Min the total distance ~ Min total cost of transportation• Defining the decision variable
xij = number of R/M to ship from node i to node j• Defining the objective function
Min : 21x11+50x12 +40x13+35 x21 +30x22 +22x23 +55x31 +20x32 +25x33
• Defining the constraints x11 + x21 + x31 < 200,000 capacity restriction for j1x12 + x22 + x32 < 600,000 capacity restriction for j2x13 + x23 + x33 < 225,000 capacity restriction for j3x11 + x12 + x13 = 275,000 supply restriction for i1x21 + x22 + x23 = 400,000 supply restriction for i2x31 + x32 + x33 = 300,000 supply restriction for i3 xij > 0 , for all i and j
![Page 40: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/40.jpg)
A transportation problem
Parameters Distance from I to j, no supply , no capacity
Decision Variable number of R/M to ship from node i to node j
Objective Min the total distance
Constraint capacity restriction supply restriction
![Page 41: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/41.jpg)
A transportation problem
![Page 42: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/42.jpg)
A Blending problem
• Agri-Pro stocks bulks amounts of four types of feeds that can mix to meet a given customer’s specifications.
Nutrient(%) feed1 feed2 feed3 feed4Corn (i=1) 30% 5% 20% 10%Grain(i=2) 10% 30% 15% 10%Minerals(i=3) 20% 20% 20% 30%Cost per Pound($) 0.25 0.30 0.32 0.15
![Page 43: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/43.jpg)
A Blending problem• Agri-Pro has just received an order from a local chicken farmer for 8,000
pounds of feed.• The farmers wants this feed to contain at least 20% corn, 15% grain , and
15% minerals. • What should Agri-Pro do to fill this order at minimum cost?• Defining the decision variable
xi = pounds of feed (j) to use in the mix • Defining the objective function
Min : 0.25x1 +0.30x2 +0.35x3+0.15 x4 , total cost• Defining the constraints
x1 + x2 + x3 + x4 = 8,0000.3x1 +0.05 x2 + 0.20x3 + 0.10x4 > 0.20 × 8,000 --- Corn0.1x1 +0.30 x2 + 0.15x3 + 0.10x4 > 0.15× 8,000 --- Grain0.2x1 +0.20 x2 + 0.20x3 + 0.30x4 > 0.15 × 8,000 --- Mineralx1 , x2 , x3 , x4 > 0
![Page 44: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/44.jpg)
A Blending problem
Parameters Cost per Pound($), Nutrient(%) of each feed Order quantity , Required Nutrient(%)
Decision Variable pounds of feed (j) to use in the mix
Objective Minimize Cost
Constraint Satisfy the Required Nutrient(%)
![Page 45: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/45.jpg)
A Blending problem
![Page 46: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/46.jpg)
A production and inventory planning problem
• Upton Corporation is trying to plan its production and inventory levels for the next 6 months
• Given the size of Upton’s warehouse, a maximum of 6,000 units • The owner like to keep at least 1,500 units in inventory any months as
safety stock• The company wants to produce at no less than half of its maximum
production capacity each month.• Estimate that the cost of carrying a unit in any given month is equal to
1.5% of the unit production cost in the same month.
m1 m2 m3 m4 m5 m6
Unit production cost (Cm) 240 250 265 280 280 260
Unit Demanded(Dm) 1000 4500 6000 5500 3500 4000
Maximum Production(Maxp m) 4000 3500 4000 4500 4000 3500
![Page 47: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/47.jpg)
A production and inventory planning problem
• The number of units carried in inventory using the averaging the beginning and ending inventory for each month
• Current inventory 2,750 units• To minimize production and inventory costs, the
company wants to identify the production and inventory plan.
• Defining the decision variable pm = the number of units to product in month m
bm = the beginning inventory for month m
![Page 48: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/48.jpg)
A production and inventory planning problem
• Defining the objective functionMin : ,
Subject to
2/))(015.0( 1
6
1
6
1
mmmmm
mm bbcpC
mm Maxpp m,
m,
m,
mmmm Dpbb 1
m,
m,
mm Maxpp )2/1(000,6 mmm Dpb
500,1 mmm Dpb
![Page 49: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/49.jpg)
A production and inventory planning problem
Parameters Maximum Production(Maxp),Unit production cost(Cm) , Unit Demanded(Dm)
Decision Variable the number of units to product in month m , pm
the beginning inventory for month m, bm
Objective Minimize Cost
Constraint Upper bound and Lower bound of the production and inventory , Balance constraint
![Page 50: Intro week3 excel vba_114e](https://reader036.fdocuments.in/reader036/viewer/2022081413/549b177fb4795910098b46ad/html5/thumbnails/50.jpg)
A production and inventory planning problem