### CS558 Computer Networks, Homework 3

• Ski lift system

• A ski lift brings skier from the bottom of a mountain to the top:

Description:

• The ski lift consists of a belt with chairs attached to them.

See:

• Each chair can bring at most 2 skiers to the top

• The belt moves continuously and skiers can board (hop on) the chair when it passes at the lowest point of the mountain.

We assume that skiers will always be able to board the chair (i.e., will not miss the chair) if they are waiting to be transported.

• Skiers arrive one at a time as a Poission process with rate λ

• An arriving chair will pick up exactly 2 riders if the number of waiting skiers is ≥ 2.

An arriving chair will pick up 1 rider if the number of waiting skiers is equal to 1.

An arriving chair will pick up 0 rider if theere are no skiers waiting.

• The ski lift takes T sec to bring riders to the top of the mountain

A chair arrives once every P seconds

• Project

• Write a ProSim4 simulation for the above system.

The program must be run using the following command line arguments:

 ``` hw3 λ T P SimTime λ = arrival rate of skiers per sec T = Time it take for a chair to travel from bottom to top of mountain P = Time between arrivals of 2 consecutive chairs SimTime = running time of the simulation ```

The output of the simulation is the average time it takes for a skier to get to the top of the mountain. I.e., the time between when he arrives in the queue and when he get off the ski lift.

• Turnin

• Turn in your program using the command:

 ``` /home/cs558000/turnin SOURCE-PROG-FILE hw3 ```