N Lecture3 Agg P LP Excel

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Aggregate Planning, Linear Programming and Excel Solver

Input
Demand forecast for each quarter, number of workers available in the beginning,
hiring and firing costs per worker, straighttime and over time costs per hour,
inventory holding and backorder costs per unit, productivity (units per hour),
working hours (hours per day and days per quarter) and beginning inventory.

Output (Decision Variables)


Decide for each quarter: number of workers hired/fired, overtime hours, number
of units in the ending inventory and backorder.

Objective
Minimize the total cost of straight-time, overtime, hiring, firing, inventory holding
and backorder

Relationships
1. Inventory at the beginning of the current quarter (except the first quarter) =
positive inventory of the previous quarter – units backordered in the previous
quarter
2. Number of workers available in the current quarter = number of workers
employed in the previous quarter + number of workers hired in the current
quarter – number of workers fired in the current quarter
3. Regular production hours in a quarter = (Number of workers available in the
current quarter)  (Number of working hours per day)  (Number of working
days per quarter)
4. Actual number of units produced in a quarter = (Regular production hours +
overtime production hours)  (productivity in units per hour)
5. Inventory at the end of the current quarter = Actual number of units produced
in the current quarter + Inventory at the beginning of the current quarter –
Demand forecast of the current quarter
6. Inventory at the end of the current quarter = positive inventory of the current
quarter – units backordered in the current quarter
7. Costs:
 Straight-time cost=(regular production hours)(straight-time cost per hour)
 Overtime cost=(overtime production hours)(overtime cost per hour)
 Inventory holding cost=(ending inventory)(holding cost per unit)
 Backorder cost=(units backordered)(backorder cost per unit)
 Hiring cost=(number of workers hired)(hiring cost per worker)
 Firing cost=(number of workers fired)(firing cost per worker)

The Problem

Minimize total cost such that ending inventory computed in (5) equals ending
inventory computed in (6).
A B C D E F G
1 Class Example
2
3 Plan v: Linear optimization
4
5 Number of Workers 30
6
7 Recruitment costs
8 Hiring cost 100 for each temporary worker
9 Firing cost 200 for each worker laid off
10 Wages
11 Straight time cost 5 per hour
12 Overtime cost 8 per hour
13 Inventory costs
14 Holding cost 5 per unit-quarter
15 Backorder cost 10 per unit
16 Productivity 0.5 units per worker hour
17 Working hours 8 hours per day
18 60 days per season
19
20 Forecast Beginning Workers Workers Total Overtime
21 Inventory Hired Fired Workers Hours
22
23 Fall 10000 500 9.58333333 0 39.58333 0
24 Winter 8000 0 0 6.25 33.33333 0
25 Spring 7000 0 0 4.166667 29.16667 0
26 Summer 12000 0 0 0 29.16667 0
27
28 Regular Actual Ending Positive Backorder Ending
29 Production Production Inventory Inventory Inventory
30 Hours Units Computed Chosen
31 Fall 19000 9500 0 0 0 0
32 Winter 16000 8000 0 0 0 0
33 Spring 14000 7000 0 0 0 0
34 Summer 14000 7000 -5000 0 5000 -5000
35
36 Bakorder Overtime Hiring Firing Inventory Straight-
37 Cost Cost Cost Cost Holding time
38 Cost Cost
39 Fall 0 0 958.333333 0 0 95000
40 Winter 0 0 0 1250 0 80000
41 Spring 0 0 0 833.3333 0 70000
42 Summer 50000 0 0 0 0 70000
43
44 Total cost 368041.67
Setting up the Spreadsheet

A spreadsheet is set up to compute the total cost from the given values of inputs
and decision variables.

Input:
Known input values are entered in each of the cells below:
 B5: Initial number of workers
 B8: Hiring cost for each temporary workers
 B9: Firing cost for each worker laid off
 B11: Straight-time cost per hour
 B12: Overtime cost per hour
 B14: Holding cost per unit-quarter
 B15: Backorder cost per unit
 B16: Number of units produced per worker-hour
 B17: Number of hours worked per day
 B18: Number of days worked per quarter
 B23 to B26: Forecast of demand in fall, winter, spring and summer
 C23: Initial inventory, in the beginning of fall

Output (Decision Variables):


Excel solver will output the values of the decision variables in the following cells:
 D23 to D26: numbers of workers hired in fall, winter, spring and summer
 E23 to E26: numbers of workers fired in fall, winter, spring and summer
 G23 to G26: overtime hours in fall, winter, spring and summer
 E31 to E34: units in (positive) inventory in fall, winter, spring and summer
 F31 to F34: units backordered in fall, winter, spring and summer

Relationships
Formulae are entered for relationships explained below:
1. Inventory at the beginning of the current quarter (except the first quarter) =
positive inventory of the previous quarter – units backordered in the previous
quarter
C24 = E31–F31 (copied to C25 and C26)
2. Number of workers available in the current quarter = number of workers
employed in the previous quarter + number of workers hired in the current
quarter – number of workers fired in the current quarter
F23 = $B$5+D23–E23
F24 = F23+D24–E24 (copied to C25 and C26)
3. Regular production hours in a quarter = (Number of workers available in the
current quarter)  (Number of working hours per day)  (Number of working
days per quarter)
B31 = F23*$B$17*$B$18 (copied to B32, B33 and B34)
4. Actual number of units produced in a quarter = (Regular production hours +
overtime production hours)  (productivity in units per hour)
C31 = (B31+G23)*$B$16 (copied to C32, C33 and C34)
5. Inventory at the end of the current quarter = Actual number of units produced
in the current quarter + Inventory at the beginning of the current quarter –
Demand forecast of the current quarter
D31 = C31+C23–B23 (copied to D32, D33 and D34)
6. Inventory at the end of the current quarter = positive inventory of the current
quarter – units backordered in the current quarter
G31 = E31–F31 (copied to G32, G33 and G34)
7. Costs:
 Straight-time cost=(regular production hours)(straight-time cost per hour)
G39 = B31*$B$11 (copied to G40, G41 and G42)
 Overtime cost=(overtime production hours)(overtime cost per hour)
C39 = G23*$B$12 (copied to C40, C41 and C42)
 Inventory holding cost=(ending inventory)(holding cost per unit)
F39 = E31*$B$14 (copied to F40, F41 and F42)
 Backorder cost=(units backordered)(backorder cost per unit)
B39 = F31*$B$15 (copied to B40, B41 and B42)
 Hiring cost=(number of workers hired)(hiring cost per worker)
D39 = D23*$B$8 (copied to D40, D41 and D42)
 Firing cost=(number of workers fired)(firing cost per worker)
E39 = E23*$B$9 (copied to E40, E41 and E42)
 Total cost
B44 = SUM(B39:E42)

The Excel Solver

1. Add-in Solver, if needed: Click on the “Tools” menu. If the “Solver” is not one
of the items of the “Tools” menu, choose the “Add-Ins.” Click on the box
adjacent to “Solver Add-In” (a check mark will appear) and click “OK.”
2. Define objective: From the “Tools” menu, choose “Solver.” The “Solver
Parameters” Window pops up. Click on the arrow adjacent to the box “Set
Target Cell.” Click on the Cell B44, that stores the total cost and click again
on the arrow. Click on the circle adjacent to “Min.”

3. Decision variables: The cell addresses for the decision variables are entered
in the box below “By Changing Cells:.” The decision variables are
$D$23:$E$26, $G$23:$G$26, $E$31:$F$34

4. Constraints: The constraints are entered in the box below “Subject to the
Constraints.” Click on “Add” and the “Add Constraint” window pops up.
Provide the information on constraint as shown below and click on “OK”:
5. Linearity and Non-negativity: From the “Solver Parameters” window click on
“Options.” The “Solver Options” window pops up. Click on a box adjacent to
“Assume Linear Model” and another adjacent to “Assume Non-Negativity.”
Click on “OK.”

6. Solve: Finally, from the “Solver Parameters” window click on “Solve.” A


“Solver Results” window pops up. Click on “OK.”

7. The Solution: See the changes to your spreadsheet. The cells for the decision
variables are expected to contain the optimal solution and its cost in the cell
for the total cost.

8. A limitation: Workers hired and fired are integer variables. But, the solution
obtained may not be integers.

You might also like