You are on page 1of 7

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 Class Example B C D E F G

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

Plan v: Linear optimization Number of Workers Recruitment costs Hiring cost Firing cost Wages Straight time cost Overtime cost Inventory costs Holding cost Backorder cost Productivity Working hours 30

100 for each temporary worker 200 for each worker laid off 5 per hour 8 per hour 5 10 0.5 8 60 Forecast per unit-quarter per unit units per worker hour hours per day days per season Beginning Inventory Workers Hired Workers Fired Total Overtime Workers Hours 0 0 0 0

Fall Winter Spring Summer

10000 8000 7000 12000

500 9.58333333 0 39.58333 0 0 6.25 33.33333 0 0 4.166667 29.16667 0 0 0 29.16667

Fall Winter Spring Summer

Regular Actual Production Production Hours Units 19000 9500 16000 8000 14000 7000 14000 7000 Bakorder Cost Overtime Cost

Ending Positive Backorder Ending Inventory Inventory Inventory Computed Chosen 0 0 0 0 0 0 0 0 0 0 0 0 -5000 0 5000 -5000 Hiring Cost Firing Cost Inventory StraightHolding time Cost Cost 0 95000 0 80000 0 70000 0 70000

Fall Winter Spring Summer Total cost

0 0 0 50000 368041.67

0 958.333333 0 0 0 1250 0 0 833.3333 0 0 0

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 = E31F31 (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+D23E23 F24 = F23+D24E24 (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+C23B23 (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 = E31F31 (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.