import <H7>
import <proof4>
module Joe {
/*
SIMULATE
PUTPIC LINES=7
.
JOE WITH TWO CUSTOMER STREAMS
.
In Joe's shop ladies and gentlemen arrive in
different intervals.
Since their is no difference in the duration
of their service,
they can be treated
equally after their arrival.
.
GENERATE RVEXPO(1,25) WOMEN ARRIVE IN EXPONENTIALLY DISTRIBUTED
ADVANCE 0.8 INTERVALS, HANG UP THEIR COAT
TRANSFER ,BMEN AND GO TO THE WAITING AREA
GENERATE 18,6 MEN ARRIVE
ADVANCE 0.5 AND HANG UP THEIR COAT,
BMEN QUEUE WAITAREA WAIT FOR AN EMPTY CHAIR,
ENTER CHAIRS OCCUPY A CHAIR
DEPART WAITAREA STOP WAITING,
SEIZE JOE WAIT FOR JOE AND SEIZE HIM,
LEAVE CHAIRS THEREBY LEAVE THE WAITING AREA,
ADVANCE 10,3 WAIT FOR THE END OF SERVICE,
RELEASE JOE RELEASE JOE
TERMINATE 1 AND LEAVE THE SALON
START 100 BEGIN BLOCK PROCESSING
END
*/
storage
Chairs capacity=5;
queue WaitArea;
facility joe;
integer iC;
rn_stream Single seed=100000;
control int start_counter = 100;
procedure main() {
PA_ATF "joe.atf";
arrivals:
customer // Men
iat = rv_uniform(Single,12.0, 24.0)
until_time
= 1000000;
arrivals:
customer // Women
iat = rv_expo(Single, 25.0)
until_time
= 1000000;
wait until (start_counter
<=0 );
report(system);
exit(0);
}
class customer {
actions {
advance 0.5;
enqueue WaitArea;
enter
Chairs;
depart WaitArea;
seize joe;
leave
Chairs;
advance rv_uniform(Single,7.0,13.0);
release joe;
start_counter --;
terminate;
}
}
}
Execution
begins
System Status at Time 1110.1276
Sample Initial Current Antithetic Chi-Square
Random
Stream Count Position Position Variates Uniformity
Single 205 100000 100205 OFF 0.66
Average Current Percent Seizing Preempting
Facility %Util Entries Time/Item Status Avail Item Item
joe 89.25 101 9.810 AVAIL 100.000 customer
101/1 <NULL>
Average Current Average Current Maximum
Storage Capacity %Util Entries Time/Item Status %Avail Contents Contents Contents
Chairs 5 30.86 102 16.79 AVAIL 100.00 1.54 1 5
Current Maximum Average Total Zero Percent Average Average > 0
Queue Contents Contents Contents Entries Entries Zeros Time/Item Time/Item
WaitArea 0 1 0.01 102 100 98.04 0.115 5.854
Execution
complete
Objects
created: 59 passive, 103 active Pucks
created: 106 Memory: 1,919,272 Time: 0.26 seconds