程序代写 2. Use the R file with the M/M/1 model and make the following Simmer simula

2. Use the R file with the M/M/1 model and make the following Simmer simulations.
We will split the arrival stream up into two equally large parts, indicating sea going ships and barges. On average 520 sea ships and 1040 barges arrive per year. The interarrival time between ships is exponentially distributed. Each sea ship takes 8.4 hr to handle and each barge 2.1 hour.

a) Adapt the given simulation model for this system, while using a first come first serve protocol to serve the ships. Simulate 50 years in total.

Copyright By PowCoder代写 加微信 powcoder

b) next give sea-going ships priority in the queue, i.e. if a ship or barge leaves, and there is a ship in the queue (not necessarily being first), then it will be served (of course take always the ship waiting longest).
c) Next we apply preemption of barges by sea ships. That is, if a sea ship arrives and a barge is being served, then the barge is unmoored and the sea-going ship is being served, while the barge has to wait. If the sea-going ship leaves, then the service of the barge is resumed.
d) Finally we apply preemption, but in this case we restart the service of the barge completely. This means that a barge is only served if no ship arrives in between. In Simmer you specify the restart in the generator (see simmer manual p. 6.)
e) Finally, we split the service up into two. One server serves the sea going ships and the other the barges. The sea ship server can handle 20 ships per week and the barge server 40 per week.
Determine the probability, average and standard deviation of the waiting time of both barges and sea ships for each case and provide the results in one table. Explain the differences in the results between the cases.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com