Escolar Documentos
Profissional Documentos
Cultura Documentos
Inventory system (section 2.3,ex. 2.3) Monte Carlo simulation (like ex. 2.6) Reliability (ex 2.5)
1 Server Queue
Calling population Queue Server State = {QLength, ServerState}
Qlength = {0, 1,} ServerState = {busy, idle} {QL>0,idle} impossible state
Events = {Arrival, Departure} Simulation Clock tracks time Tarrival and Tservice probabilistic
Simulate by hand
Assume interarrival times Ta and service times Ts are:
Ta = 1 and Ts = 1 stable Ta = 2 and Ts = 3 unstable Ta = 3 and Ts = 2 stable Ta = (2,4,1,2,6) and Ts = (2,1,3,2,1,4) Finally fully stochastic as in Table 2.6-7
2 Server problem
See sim2.m See book ex. 2.2 (will come back later)
Littles law
<T> = average time spent in system of some entity <N> = average number of those entities in the system <R> = arrival rate of those entities (entities/day for example) Littles law: <N>=<R><T>
Proof
Let system run for long period [0 t]. Let C be the accumulated time in system of all entities. Let D be the total number of entities arrived. Per definition we have <N>=C/t and <T>=C/D. So <N>=(D/t)<T>. D/t is the arrival rate R.
Inventory System
Book Sec. 2.2 (M,N) Inventory system
M is full inventory level N is review period Delay after order is lead time
Newspaper problem
sim3.m Ex 2.3 in book
Newspaper problem
Buy for 33c/paper Sell for 50c/paper Left-over for 5c/paper Buy in quanta of 10 papers Cost of excess demand 17c/paper Demand modeled as in book See sim3.m for code
Compute
Throw darts at this picture Fraction in circle = X X = number inside/total darts X = area circle/area square