The time between Each Arrival (X) and Departure (Y) is dwell time.
The dwell time needs to be checked against a list of Outage Start (A) and Outage End (B) times.
The dwell time can be excused in portion or entierly if there is an outage time for the same period. There can be multiple seperate outage times within a dwell time.
ie.
Item arrives at 10:00am and departs at 11:00am
Outage windows are
0900-0906
0950-1005
1015-1020
1056-1120
In this case
0900-0906 (not valid - out of dwell period)
0950-1005 (5 minutes from 1000 to 1005 is valid)
1015-1020 (5 minutes from 1015 to 1020 is valid)
1056-1120 (4 minutes from 1056 to 1100 is valid)
The result should be 14 minutes of outage time during the 1 hour period of dwell.
Essentially there is a list of Dwell times to be compared to the list of outage times and must do this for the entire list.
The dwell time needs to be checked against a list of Outage Start (A) and Outage End (B) times.
The dwell time can be excused in portion or entierly if there is an outage time for the same period. There can be multiple seperate outage times within a dwell time.
ie.
Item arrives at 10:00am and departs at 11:00am
Outage windows are
0900-0906
0950-1005
1015-1020
1056-1120
In this case
0900-0906 (not valid - out of dwell period)
0950-1005 (5 minutes from 1000 to 1005 is valid)
1015-1020 (5 minutes from 1015 to 1020 is valid)
1056-1120 (4 minutes from 1056 to 1100 is valid)
The result should be 14 minutes of outage time during the 1 hour period of dwell.
Essentially there is a list of Dwell times to be compared to the list of outage times and must do this for the entire list.