! Planning Model for Capacity Expansion and Work Force Smoothing.
                                          (WorkSmooth.lg4)
    We have to satisfy demand for a single product over multiple
 periods, using some combination of inventory, over_time, and
 adjusting capacity;
!Keywords: Production planning, Smoothing, Capacity planning
    Multi-criteria, Paremetric analysis, Tradeoff analysis,
    Sensitivity analysis;
SETS:
 TIME: DEM,
   REG, OVT, INV, CAP, INC, DELT;
ENDSETS
DATA: ! Demands we must satisfy each period; DEM = 100 120 90 110 130 135 110 105 115 140 125 130; H = 2; ! Inventory Holding cost/unit; UREG = 9; ! Unit cost of regular_time actually used; UCAP = 4; ! Unit cost of reg time capacity, used or not; UOVT = 17; ! Unit cost of over_time; UCHN = 1; ! Unit cost per change in regular capacity; FCHN = 6; ! Fixed cost of any change in reg time capacity; ! Initial conditions; INV0 = 10; ! Inventory; CAP0 = 90; ! Regular capacity; MXCHNG = 20; ! Max allowed change in capacity each period; CCMIN = 0; ! Min value of change cost to consider; CCMAX = 50;! Max value of change cost to consider; CCDEL = 5; ! Change increment to use; ENDDATA SUBMODEL SMOOTHPROD: ! Variables: REG(t) = regular time used in period t, CAP(t) = regular time capacity in period t, OVT(t) = over_time used in period t, INV(t) = inventory at end of period t, INC(t) = increase in regular time capacity in period t, DELT(t) = 1 if any increase in capacity in perio t, All quantities, e.g., production, inventory, are measured in the same units, e.g., hours of work; ! Minimize the cost of inventory, regular time, over time, change in workforce(variable) + Change in workforce(fixed); MIN = OBJ; ! Break cost into various components; OBJ = CINV + CCAP + CREG + COVT + CHNV + CHNF; CINV = @SUM( TIME(t): H*INV(t)); CCAP = @SUM( TIME(t): UCAP*CAP(t)); CREG = @SUM( TIME(t): UREG*REG(t)); COVT = @SUM( TIME(t): UOVT*OVT(t)); CHNV = @SUM( TIME(t): UCHN*INC(t)); CHNF = @SUM( TIME(t): FCHN*DELT(t)); @FOR( TIME(t) | t #GT# 1: INV(t) = INV(t-1) + REG(t) + OVT(t) - DEM(t); REG(t) <= CAP(t); CAP(t) = CAP(t-1) + INC(t); INC(t) <= MXCHNG*DELT(t); ); ! First period takes into account initial conditions; INV(1) = INV0 + REG(1) + OVT(1) - DEM(1); CAP(1) = CAP0 + INC(1); REG(1) <= CAP(1); INC(1) <= MXCHNG*DELT(1); @FOR( TIME(t): @BIN(DELT(t))); ! DELT(t) = 0 or 1; ENDSUBMODEL
CALC: @SET('TERSEO',2); ! Turn off default output; @WRITE(' Simple tradeoff analysis between cost/unit capacity change, and other criteria', @NEWLINE(1)); @WRITE(' Unit cost Fixed Regular Over- Fixed Variable', @NEWLINE(1)); @WRITE(' changing Total Inventory cost of time time cost of cost of',@NEWLINE(1)); @WRITE(' capacity cost cost capacity var cost cost changing - capacity',@NEWLINE(1)); ! Solve model for varying values of the unit change cost, UNCHN; UCHN = CCMIN - CCDEL; ! Loop over various values of cost/unit of changing capacity; @WHILE( UCHN #LT# CCMAX: UCHN = UCHN + CCDEL; @SOLVE( SMOOTHPROD); @WRITE( @FORMAT(UCHN,"8.2f") ,' ' ,@FORMAT(OBJ,"8.2f") , ' ', @FORMAT(CINV,"8.2f"), ' ', @FORMAT(CCAP,"8.2f") , ' ', @FORMAT(CREG,"8.2f"), ' ', @FORMAT(COVT,"8.2f") , ' ', @FORMAT(CHNF,"8.2f"), ' ', @FORMAT(CHNV,"8.2f") , @NEWLINE(1)); ); ENDCALC