Batch67
Type: Batch
Icon: Batch
Local Attributes
Name: CurrentDay
Mode: Integer
Value: 0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: CurrentHour
Mode: Integer
Value: 0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: DailyCount
Mode: Real
Value: 0.0
Array Size: 0
Attribute Comment:
Statistics Type: Time-Weighted
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: HourlyCount
Mode: Integer
Value: 0
Array Size: 0
Attribute Comment:
Statistics Type: Time-Weighted
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: HrTr
Mode: Integer
Value: 0
Array Size: 0
Attribute Comment:
Statistics Type: Time-Weighted
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: MWT
Mode: Real
Value: 0.0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: MaxThr
Mode: Integer
Value: 0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: TWT
Mode: Real
Value: 0.0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Name: WaitCount
Mode: Real
Value: 0.0
Array Size: 0
Attribute Comment:
Statistics Type: Observation Based
Report Requests:
Real-Time Histogram Plot: false
Real-Time Trace Plot: false
Standard Report: false
References to Attribute:
None
Resource Usage
Resources Required: None selected.
Expressions
Expression: Accept Entity
WaitPercent : REAL;
hour : INTEGER;
time : REAL;
day : INTEGER;
day := TRUNC(SimTime("Hours") / 24.0);
IF day > CurrentDay
DailyCount := 1.0;
WaitCount := 0.0;
CurrentDay := day;
MaxThr :=0;
ELSE
DailyCount := DailyCount + 1.0;
END IF;
Model.WaitTime := Entity.TotalWait;
IF Model.WaitTime > MWT
MWT:=Model.WaitTime
END IF;
TWT:=TWT+Model.WaitTime;
IF Model.WaitTime > 10.0
WaitCount := WaitCount + 1.0;
END IF;
{
The line after this comment calculates the percentage based on the count per day. If you want the percentage based on the total (irrespective of day) do the following:
WaitPercent := (WaitCount / FLOAT(NumberAccepted)) * 100.0;
However, if you do it as the above, you miss the daily fluctuations.
}
WaitPercent := (WaitCount / DailyCount) * 100.0;
UpdateDynamicLabel(MasterEditor, "waitpercent", 0, "Black", WaitPercent);
hour := TRUNC(SimTime("Hours"));
HrTr := HourlyCount;
IF hour > CurrentHour
IF HourlyCount > MaxThr
MaxThr := HourlyCount;
END IF;
UpdateDynamicLabel(MasterEditor, "throughput", 0, "Black", MaxThr);
HourlyCount := 1;
CurrentHour := hour;
ELSE
HourlyCount := HourlyCount + 1;
END IF;
waitTime : REAL;
{waitTime := GetEntityStatistic("Passenger", "tokenwaitdelay", "Avg", Replication);}
waitTime:=TWT/FLOAT(NumberAccepted);
UpdateDynamicLabel(MasterEditor, "waitTimeLabel", 0, "Black", waitTime);
maxwaitTime : REAL;
maxwaitTime := GetEntityStatistic("Passenger", "tokenwaitdelay", "Max", Replication);
UpdateDynamicLabel(MasterEditor, "maxwaitTimeLabel", 0, "Black", MWT);
Quantity: 50
Batched Entity: Airplane
Rank Method
Ranked As: First In First Out
Release Threshold
Maximum Hold Time: Duration: 10000.0 Units: Weeks Minimum Quantity: 1
Duration: None Units: Hours
Collect Activity Statistics: false
Collect Activity by Entity Statistics: false
Comment:
Pads:
Pad Name: in1 Pad Type: InputPad
Pad Name: out1 Pad Type: OutputPad
Departure Passenger
Type: Generate
Icon: Man
Local Attributes
None Defined.
Expressions
Expression: Release Entity
UpdateDynamicLabel(MasterEditor, "Depart", 0, "Black", NumberGenerated);
Entity: Passenger
Quantity: 1.0
Start/End Schedule
Start: No date specified No time specified
End: No date specified No time specified
Schedules
Cyclical Schedule: Daily Schedule
Periodic Event: 5:00 AM - 8:00 AM
Entity: Passenger
Quantity: 1
Interval: Exp(5.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 3 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 8:00 AM - 9:00 PM (Peak #1)
Entity: Passenger
Quantity: 1
Interval: Exp(1.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 1 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 9:00 AM - 1:00 PM
Entity: Passenger
Quantity: 1
Interval: Exp(3.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 4 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 1:00 PM - 2:00 PM (Peak #2)
Entity: Passenger
Quantity: 1
Interval: Exp(1.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 1 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 2:00 PM - 6:00 PM
Entity: Passenger
Quantity: 1
Interval: Exp(3.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 4 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 6:00 PM - 7:00 PM (Peak #3)
Entity: Passenger
Quantity: 1
Interval: Exp(1.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 1 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
Periodic Event: 7:00 PM - 10:00 PM
Entity: Passenger
Quantity: 1
Interval: Exp(5.0,1) Time Units: Minutes
Generate at start of first interval: false
Start/End Schedule
No data specified.
Comment:
Event Duration: 3 Units: Hours Event Count Limit: None
Both must be reached: false
Repeat Event: 0
Infinite: false
Comment:
No Event Event: 10:00 PM - 5:00 AM (Non-Arrival)
Duration: 7 Units: Hours Repeat Event: 0
Comment:
Repeat Sequence: 0
Infinite: true
Start/End Schedule
No data specified.
Comment:
Collect Activity Statistics: false
Collect Activity by Entity Statistics: false
Comment:
Pads:
Pad Name: out1 Pad Type: OutputPad