CS计算机代考程序代写 In [1]:

In [1]:
import numpy as np
import simpy
In [3]:
def arrival():
lmbda=7
while True:
inter_arrival=-1/lmbda*np.log(np.random.rand())
yield env.timeout(inter_arrival)

env=simpy.Environment()
env.process(arrival())

T=1
env.run(until=T)

Patients arrive following a Poisson process with $\lambda=7$
The front desk will register the patients one by one.
The service time takes 0.2
Service order is FIFO
Simulate the system until T=1
In [7]:

In [0]: