Missed
Let the fun begin
Measuring and modelling
Revise stats
A random sample path through a state transition system
◮ There is a single global “clock” – a virtual time ◮ Transitions are triggered by events which are placed, a.k.a “scheduled”, in time
order on a virtual time line
◮ When an event occurs (“fires”, “is triggered”, ...) at virtual time t, say, it:
◮ Updates the global clock to t ◮ Changes the model state ◮ Schedules zero or more new future events on the time line
◮ This implements an asynchronous model of time, c.f. a synchronous model with fixed time steps (∆t)
◮ The global clock is a floating-point number, now, say ◮ The state is a set of discrete program variables, e.g. integers, booleans, arrays thereof etc.
i.e. time is continuous, but the state space is discrete
◮ The time line is essentially an event diary implemented as a priority queue of
(Event, time) pairs, ordered by time
◮ Events are implemented as objects, functions, procedures, methods etc. ◮ A scheduler adds new (Event, time) pairs to the diary ◮ A descheduler similarly removes them from the diary ◮ Measurement code will need to be added (Otherwise what is the point of simulating?)
For Markov Chains it is important to remember that an even scheduled at an early stage is inherited at the later stages.
◮ “Random” arrival processes are ubiquitous in the real world and are often extremely well
approximated by so-called Poisson processes
◮ The distribution is "memoryless", the P of an event is the same no matter how much time has passed
since the start
◮ The 1-p trick has been mentioned enough to be in the exam
◮ A Poisson arrival process is an arrival “stream” where the inter-arrival times, T, are independent
and exponentially-distributed: P(T ≤ t) = 1 − e(−λt)
◮ λ is often called the processes’ “rate” parameter and is the reciprocal of the average
inter-arrival time
◮ Arrival processes in the real world are often extremely well approximated by Poisson processes
because arrivals are typically i. independent ii. ignorant of previous arrivals and the state of the system the are arriving at.
◮ All of the proofs in the notes are "should be able to do them"
◮ If we merge two Poisson processes with rates λ1 and λ2, the merged process is Poisson with rate
λ1 + λ2:
◮ Supplimentary proofs is a good read -- give it a look
◮ We’ll look at three commonly-used methods:
◮ The Inverse transform method:
IF WE CAN INVERT THE FUNCTION
◮ The Acceptance-rejection method:
-
◮ ◮
CW tip