## 2 Matching the Automatic Fare Collection Data with the Real-Time Train Operation Data  
This paper develops a dwell time estimation model using boarding and alighting passenger counts, and onboard passenger counts between stations for each train. The initial dataset for analysis was prepared according to the method suggested by [PERSON] et al. [10] based on the smart card passenger information and archived real-time train operation data. This dataset includes the number of trains operating and their current status with respect to their nearest station as one of 3 stages--\"approaching,\" \"arrival,\" and \"departure\"--along with timestamps for when the current stage was acquired. The approaching status is gained as soon as the arriving train passes a balise located at 1000 m upstream of an associated station. The arrival status is achieved as soon as the train passes a balise located 400 m upstream. The status changes to departure when the train passes a balise at 200 m downstream. The smart card-based passenger information includes the serial number of the card, boarding station, boarding time, alighting station, alighting time, transfer station, and transfer time. It is noted that the time associated with boarding, alighting, and transfer refers to the time when the passenger checks in or out with the gates at stations. In this paper, both archived real-time train operation and smart card-based passenger data from the Shinbundang line (S Line) on 31 st October 2017 was used. The S line has concentrated commuting passenger demands during both morning and afternoon peak periods, with dominating directions of the majority of passengers: towards the CBD in the morning and towards Bundang in the afternoon (See Figure 1). In this study, to show the morning peak clearly with maximum crowdedness, the S line's Central Business District (CBD)-bound direction towards Gangnam station was selected for the analysis. The S line has a total length of 31.29 km, consisting of 12 stations, of which 4 stations allow inter-line transfers. The fleet size is 20 trains, and they run 327 cycles and 271 cycles in total on weekdays and weekend days, respectively; mostly throughout the entire route, except for the first and last trains each day. There is only 1 class of tickets, and daily ridership on the S line is roughly 247,000, as of 2017. For train operation data, arrival and departure times were identified for each train and each station. However, in cases where departure data were missing, average dwell times based on visual observations with video cameras were added to the arrival times to estimate the missing departure times. Figure 2 shows the process of matching the smart card passenger information with the archived real-time train operation data. The process starts with identifying a passenger who has alighted at a station. Then, the train that arrived at the station most recently is assumed to be the one that the passenger got off from. The departure time of the train that the passenger had boarded earlier is found. If the boarding time is earlier than the departure time of the train, the train number is assigned to that passenger, assuming that the passenger has boarded and will alight from that train. If the matching process does not succeed, the data from the smart card is not used, since there may be logical errors in the data. This is reasonable, because there is no way to reduce the travel time by overtaking between trains, or transferring through the other lines since the S line has a single class of train. The process stops when the number of the smart-card data that have been processed is equal to the total number of the smart-card data, N.  
Figure 3 shows smart card-based passenger data and train operation data from the S07 station to the S11 station in a passenger entry-exit map suggested by [PERSON] et al. [10]. The \(x\)-axis represents the time at the S07 station, and the \(y\)-axis represents the time at the S11 station.