Sample Runs for Project 2 (Monitors)

 

 

Below are two sample runs for solution 1 (one waiting line) and solution 2 (separate waiting lines).
Your statistics will not be the same, but you should observe similar differences between solution 1 and solution 2.

Parameters for both runs are: 3(#of bridges) 2(capacity) 200(#of ppl)

Notice these observations from the data:

In solution 1: 8.4 persons are created per second, and about 5.1 crossed
the river per second;
The average load is around 1.83 (capacity = 2)

In solution 2: 10.1 persons are created per second, and about 4.4
crossed the river per second;
The averae load is around 1.48
 

------------------------------------------------------------------------
Solution 1:

Simulation parameters:
There are 3 bridges, each of which can carry 2 persons
Mean time to cross a bridge is 1000 ms
Mean time between creation of new Persons is 100 ms (arrival rate = 10.0
/ sec)

Measured performance:
200 persons were created in 23740 ms (8.424599831508003 / sec)
200 persons crossed the river in 39335 ms (5.084530316512012 / sec)
Theoretical maxiumum throughput = 6.0 / sec
Waiting times (ms): min = 4, max = 21016, mean = 4417.1
Crossing times (ms): min = 2, max = 5207, mean = 1056.74

Bridge 0: average load 1.802415132522583
0 persons 2%
1 person 16%
2 persons 82%
Bridge 1: average load 1.8637853860855103
0 persons 4%
1 person 6%
2 persons 90%
Bridge 2: average load 1.8344731330871582
0 persons 2%
1 person 12%
2 persons 86%
average over all bridges: average load 1.8335578838984172
0 persons 3%
1 person 11%
2 persons 86%

Solution 2:

Simulation parameters:
There are 3 bridges, each of which can carry 2 persons
Mean time to cross a bridge is 1000 ms
Mean time between creation of new Persons is 100 ms (arrival rate = 10.0
/ sec)

Measured performance:
200 persons were created in 19771 ms (10.11582621010571 / sec)
200 persons crossed the river in 45194 ms (4.425366199052972 / sec)
Theoretical maxiumum throughput = 6.0 / sec
Waiting times (ms): min = 5, max = 38081, mean = 9109.325
Crossing times (ms): min = 1, max = 6935, mean = 1046.94

Bridge 0: average load 1.2918086051940918
0 persons 33%
1 person 6%
2 persons 62%
Bridge 1: average load 1.5678187608718872
0 persons 19%
1 person 5%
2 persons 76%
Bridge 2: average load 1.8976855278015137
0 persons 1%
1 person 7%
2 persons 91%
average over all bridges: average load 1.5857709646224976
0 persons 18%
1 person 6%
2 persons 76%