A Smple Inventory System Lawrence M. Leems and Stephen K. Park, Dscrete-Event Smulaton: A Frst Course, Prentce Hall, 2006 Hu Chen Computer Scence Vrgna State Unversty Petersburg, Vrgna February 8, 2017 H. Chen (VSU) A Smple Inventory System February 8, 2017 1 / 40
Introducton Dscrete or Contnuous Varables? Sngle Server Queue both arrval and servce tmes are contnuous varables Smple Inventory System Input varables are nherently dscrete H. Chen (VSU) A Smple Inventory System February 8, 2017 2 / 40
Conceptual Model A Smple Inventory System: Conceptual Model customers. demand tems.. faclty. order tems.. suppler Dstrbutes tems from current nventory to customers Order tems from suppler to replensh the nventory Customer demand s dscrete Customers do not want a porton of an tem Balancng holdng cost, shortage cost, and orderng cost Smple One type of tem H. Chen (VSU) A Smple Inventory System February 8, 2017 3 / 40
Conceptual Model Dfferent Inventory Polces Transacton Reportng Polcy Inventory revew after each transacton Sgnfcant labor may be requred Less lkely to experence shortage Perodc Inventory Revew Inventory revew s perodc Items are ordered, f necessary, only at revew tmes Defned by two parameters (s,s) s: mnum nventory level S: maxmum nventory level s and S are constnat n tme, wth 0 s < S Assume perodc nventory revew Search for (s, S) that mnmze cost H. Chen (VSU) A Smple Inventory System February 8, 2017 4 / 40
Cost and Assumpton Conceptual Model Inventory System Costs Holdng cost: for tems n nventory Shortage cost: for unmet demand Orderng cost: sum of setup and tem costs Setup cost: fxed cost when order s placed Item cost: per-tem order cost Addtonal Assumptons Back orderng s possble No delvery lag Intal nventory level s S Termnal nventory level s S H. Chen (VSU) A Smple Inventory System February 8, 2017 5 / 40
Specfcaton Model A Smple Inventory System: Specfcaton Model Tme begns at t = 0 Revew tmes are t = 0,1,2,... -th tme nterval begns at tme t = 1 and ends at t = l 1 : nventory level at begnnng of the th nterval o 1 : amount ordered at tme t = 1 s an nteger, o 1 0 d : demand quantty durng the th nterval, d 0 Inventory at end of nterval can be negatve As a result of back-orderng H. Chen (VSU) A Smple Inventory System February 8, 2017 6 / 40
Specfcaton Model Inventory Level Consderaton Inventory level s revewed at t = 1 If l 1 s, no order s placed; tem If l 1 < s, nventory s replenshed to S { 0 l 1 s o 1 = S l 1 l 1 < s (1) Items are delvered mmedately At end of -th nterval, nventory dmnshed by d l = l 1 +o 1 d (2) H. Chen (VSU) A Smple Inventory System February 8, 2017 7 / 40
Computatonal Model A Smple Inventory System: Computatonal Model Algorthm 1.3.1 l 0 = S; = 0; whle (more demand to process) { ++; f (l 1 < s) o 1 = S l 1 ; else o 1 = 0; d = GetDemand(); l = l 1 +o 1 d ; } n = ; o n = S l n l n = S; return l 1, l 2, l 3,...l n and o 1, o 2,...o n ; H. Chen (VSU) A Smple Inventory System February 8, 2017 8 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o nventory l 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 9 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 nventory l 30 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 10 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 45 nventory l 30 15 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 11 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 45 0 nventory l 30 15 35 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 12 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 45 0 0 nventory l 30 15 35 20 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 13 / 40
l Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 45 0 0 85 nventory l 30 15 35 20-25 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 14 / 40
Examples Example 1.3.1: SIS wth Sample Demands Let (s,s) = (20,60) and apply Algorthm 1.3.1 to process n = 12 tme ntervals of operaton as follows. Note that l 0 = S = 60. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o 0 45 0 0 85... nventory l 30 15 35 20-25... l 80 S 40 s 0 20 40 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Inventory Levels H. Chen (VSU) A Smple Inventory System February 8, 2017 15 / 40
Output Statstcs Output Statstcs Average demand and average order per tme nterval d = 1 n ō = 1 n n d (3) =1 n o (4) =1 For Example 1.3.1 Data d = ō = 305/12 = 25.42 tems per tme nterval H. Chen (VSU) A Smple Inventory System February 8, 2017 16 / 40
Exercse L3-1 Output Statstcs Let (s,s) = (20,60) and apply Algorthm 1.3.1 by tracng the algorthm to process n = 12 tme ntervals of operaton as follows. 1 2 3 4 5 6 7 8 9 10 11 12 nput d 30 15 25 15 45 30 25 15 20 35 20 30 order o nventory l Calculate average demand. You must show the steps. Calculate average order. You must show the steps. H. Chen (VSU) A Smple Inventory System February 8, 2017 17 / 40
Flow Balance Output Statstcs Average demand and order must be equal Endng nventory level s S Over the smulated perod, all demand s satsfed Average flow of tems n equals average flow of tems out customers. d faclty. ō suppler The nventory system s flow balanced H. Chen (VSU) A Smple Inventory System February 8, 2017 18 / 40
Output Statstcs Constant Demand Rate Assumpton Holdng and shortage costs are proportonal to tme-averaged nventory levels Must know nventory level for all t Assume the demand rate s constant between revew tmes As a result, the contnuous-tme evoluton of the nventory level s pecewse lnear, as llustrated below. l(t) 80 S 40 s 0 20 40..... t 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Pecewse-lnear nventory levels H. Chen (VSU) A Smple Inventory System February 8, 2017 19 / 40
Output Statstcs Inventory Level as a Functon of Tme Under condton that the demand rate (d ) s constant between revew tmes, then the nventory level at any tme t n -th nterval s, l(t) = l 1 (t +1)d (5) l 1 ( 1, l 1 ) l(t) l 1 d l(t) = l 1 (t + 1)d (, l 1 d ). 1 t Fgure: Lnear nventory level n tme nterval l 1 = l 1 +o 1 represents nventory level after revew. H. Chen (VSU) A Smple Inventory System February 8, 2017 20 / 40
Output Statstcs Inventory Level s Not Lnear! Inventory level at any tme t s an nteger l(t) should be rounded to an nteger value As a result, l(t) s a star-step, rather than lnear, functon However, t can be shown, t has no effect on the values of Tme Averaged Inventory Level l + and l l(t) l 1 l 1 d ( 1, l 1 ) 1 l(t) = l 1 (t + 1)d. (, l 1 d) Fgure: Lnear nventory level n tme nterval t l(t) l 1 l 1 d ( 1, l 1 ) 1 l(t) = l 1 (t + 1)d + 0.5. (, l 1 d) Fgure: Lnear nventory level n tme nterval t H. Chen (VSU) A Smple Inventory System February 8, 2017 21 / 40
Output Statstcs Tme Averaged Inventory Level at Tme Interval l(t) s the bass for computng the tme-averaged nventory level Case 1: If l(t) remans non-negatve over -th nterval Case 2: If l(t) becomes negatve at some tme τ l+ = l(t)dt (6) 1 τ l+ = l(t)dt (7) l = l(t)dt (8) 1 τ where l + s the tme-averaged holdng level and l s the tme-averaged shortage level H. Chen (VSU) A Smple Inventory System February 8, 2017 22 / 40
Output Statstcs Case 1: No Back-Orderng No shortage durng -th tme nterval f and only f d l 1 1 0 l 1 d l 1 l(t) t. ( 1, l 1 ) (, l 1 d ) Fgure: Inventory level n tme nterval wthout back-orderng Tme-averaged holdng level: area of a trapezod l+ = 1 l(t)dt = l 1 +(l 1 d ) 2 = l 1 1 2 d (9) H. Chen (VSU) A Smple Inventory System February 8, 2017 23 / 40
Case 2: Back-Orderng Output Statstcs Inventory l(t) becomes negatve f and only f d > l 1,.e., at t = τ = 1+l 1 /d l(t) l 1 s 0 l 1 d ( 1, l 1 ) 1 τ t. (, l 1 d) Fgure: Inventory level n tme nterval wth back-orderng Tme-averaged holdng and shortage levels for -th nterval computed as the areas of trangles τ l+ = 1 l(t)dt =... (l 1 )2 2d (10) l = τ l(t)dt =... = (d l 1 )2 2d (11) H. Chen (VSU) A Smple Inventory System February 8, 2017 24 / 40
l+ and l Output Statstcs l+ = l τ = 1 τ l(t)dt = 1 [τ ( 1)]l 2 1 )2 1 = (l 2d l(t)dt = 1 ( τ)(l 1 2 d ) = 1 [ ( 1+l 1 2 /d )](l 1 d ) = 1 2 (1 l 1 /d )(l 1 d ) = 1 d l 1 (l 1 d ) 2 d = (d l 1 )(l 1 d ) 2d = (d l 1 )2 2d H. Chen (VSU) A Smple Inventory System February 8, 2017 25 / 40
Output Statstcs Tme-Averaged Inventory Level l(t) 80 S 40 s 0 20 40..... t 0 1 2 3 4 5 6 7 8 9 10 11 12 Fgure: Pecewse-lnear nventory levels Tme-averaged holdng level and tme-averaged shortage level l+ = 1 n n =1 l+ (12) l = 1 n Note that tme-averaged shortage level s postve The tme-averaged nventory level s 1 l = n n n =1 l (13) l(t)dt = l + l (14) 0 H. Chen (VSU) A Smple Inventory System February 8, 2017 26 / 40
Exercse L3-2 Output Statstcs Let (s,s) = (20,60) and process n = 3 tme ntervals of operaton as follows (see sldes 23, 24, and 26 for steps) 1 2 3 nput d 15 45 30 Calculate tme-averaged holdng level Calculate tme-averaged shortage level H. Chen (VSU) A Smple Inventory System February 8, 2017 27 / 40
Smulaton Trace-drven Smulaton Create program ss1, a trace-drven computatonal model of the SIS Compute the output statstcs d: Average demand ō: Average order l+ : Tme-averaged holdng level l : Tme-averaged shortage level and the order frequency ū ū = number of orders n Consstency check: compute d and ō separately, then compare. They should be equal. H. Chen (VSU) A Smple Inventory System February 8, 2017 28 / 40
Trace-drven Smulaton Example 1.3.4: Trace Fle ss1.dat Trace fle ss1.dat contans data from n = 100 tme ntervals Inventory-polcy parameter values (.e., mnnum & maxmum nventory levels) (s,s) = (20,80) Program ss1 should output: ō = d = 29.29 ū = 0.39 l + = 42.90 l = 0.25 H. Chen (VSU) A Smple Inventory System February 8, 2017 29 / 40
Trace-drven Smulaton Exercse L3-3: Implement Program ss1 Develop a smulaton program to mplement Algorthm 1.3.1 n your favorte programmng language Lets call the program ssq1 In the program, compute and prnt average demand, average order, tme-averaged holdng level, and tme-averaged shortage level Verfy the program Create a test case usng exercses L3-1 and L3-2, and apply the test case to your program Use a large trace Run your program usng the provded large trace as nput, observe the output H. Chen (VSU) A Smple Inventory System February 8, 2017 30 / 40
Operatng Cost Operatng Cost and Case Study A faclty s cost of operaton s determned by ctem : unt cost of new tem csetup : fxed cost for placng an order chold : cost to hold one tem for one tme nterval cshort : cost of beng short one tme for one tme nterval H. Chen (VSU) A Smple Inventory System February 8, 2017 31 / 40
Operatng Cost and Case Study Example 1.3.5: Case Study An automoble dealershp that uses weekly perodc nventory revew The faclty s the showroom and surroundng areas holdng cars The tems are cars for sell The suppler s the car manufacturer The customers are the people who purchase cars from the dealershp Assume SIS: sells one type of car H. Chen (VSU) A Smple Inventory System February 8, 2017 32 / 40
Operatng Cost and Case Study Example 1.3.5: Results of Case Study Lmted to a maxmum of S = 80 cars Lmted to a mnmum of s = 20 cars Inventory revewed every Monday f nventory falls below s, order cars suffcent to restore the nventory to S For now, gnore delvery lag Then costs: Item cost s ctem = $8,000 per tem Setup cost s csetup = $1,000 per order from manufacturer Holdng cost s chold = $25 per week Shortage cost s chold = $700 per week H. Chen (VSU) A Smple Inventory System February 8, 2017 33 / 40
Operatng Cost and Case Study Per-Interval Average Operatng Costs The average operatng costs per tme nterval are ctem ō: tem cost csetup ū: setup cost chold l+ : holdng cost cshort l : shortage cost The average total operatng cost per tme nterval s ther sum C total = c tem ō +c setup ū +c hold l + +c short l (15) Total cost of operaton s the product of the average total operatng cost per tme nterval and the number of ntervals C total = n C total (16) H. Chen (VSU) A Smple Inventory System February 8, 2017 34 / 40
Operatng Cost and Case Study Example 1.3.6: Operatng Cost Use the statstcs n Example 1.3.4 ō = d = 29.29 ū = 0.39 l + = 42.90 l = 0.25 and the constants n Example 1.3.5 c tem = $8,000 c setup = $1,000 c hold = $25 c short = $700 For the dealershp tem cost: $8,000 29.29 = $234,320 per week setup cost: $1,000 0.39 = $390 per week holdng cost: $25 42.40 = $1,060 per week shortage cost: $700 0.25 = $175 per week H. Chen (VSU) A Smple Inventory System February 8, 2017 35 / 40
Cost Mnmzaton Operatng Cost and Case Study By varyng mnmum nventory level s (and possbly maxmum nventory level S), an optmal polcy can be determned Optmal mnmum average total cost per tme nterval Note that ō = d and d depends only on the demands Hence, tem cost per tme nterval c tem ō s ndependent of (s,s) Average dependent cost per tme nterval s the sum of these three csetup ū: average setup cost per tme nterval chold l + : average holdng cost per tme nterval cshort l : average shortage cost per tme nterval Average dependent cost (or total cost for convenence) becomes, c total = c setup ū +c hold l+ +c short l (17) H. Chen (VSU) A Smple Inventory System February 8, 2017 36 / 40
Experment Operatng Cost and Case Study Let S be fxed, and let the demand sequence be fxed If s s systematcally ncreased, we expect: Average setup cost and holdng cost per tme nterval wll ncrease as s ncreases Average shortage cost per tme nterval wll decrease as s ncreases Average dependent cost per tme nterval wll have U shape, yeldng an optmum (.e., mnmum cost = $1,550 at s = 22) H. Chen (VSU) A Smple Inventory System February 8, 2017 37 / 40
Operatng Cost and Case Study Example 1.3.7: Optmal Perodc Inventory Revew Polcy 600 500 400 300 200 setup cost 600 500 400 300 200 shortage cost 100 0 1400 s 0 5 10 15 20 25 30 35 40 100 0 2000 s 0 5 10 15 20 25 30 35 40 1300 1200 1100 1000 900 holdng cost 1900 1800 1700 1600 1500 total cost 800 s 0 5 10 15 20 25 30 35 40 1400 s 0 5 10 15 20 25 30 35 40 Mnmum cost = $1,550 at s = 22 H. Chen (VSU) A Smple Inventory System February 8, 2017 38 / 40
Operatng Cost and Case Study Exercse L3-4: ss1 and Optmzng Operatng Cost Use the sample data (ss1.dat) and the parameters n the lecture notes, verfy the optmal nventory revew polcy by reproducng the results n sldes 35 37 and the graphs n slde 38. H. Chen (VSU) A Smple Inventory System February 8, 2017 39 / 40
Summary Not the end, but the end of the begnng SIS Cost model and case studes H. Chen (VSU) A Smple Inventory System February 8, 2017 40 / 40