• No se han encontrado resultados

Años 2010-2014 Consolidación del boxeo profesional.

The map-matched route pairs had previously been generated and stored in a database, where each map-matched route pair contain a start timestamp, an end timestamp, sequence of road segments, and offsets:

• Route pair start timestamp, tsi

• Route pair end timestamp, tsj

• Sequence of road segments, (rs1, rs2, ..., rsn)

• Offset from the start of the first road segment in the sequence, of f seti

• Offset from the start of the last road segment in the sequence, of f setj

The taxi floating car data stored as map-matched route pairs was aggregated into 5 minutes aggregation periods. When aggregating the map-matched route pairs there are two possible cases that can occur for each map-matched route pair. In the first case both tsi and tsj are in the same aggregation period. In the second case, tsi and tsj are in distinct aggregation periods and the map-matched route

pair is therefore split up into two new map-matched route pairs. The second case is illustrated in figure 4.2. When tsi and tsj are in distinct aggregation periods, the map-matched route pair is then split up by first finding the breakpoint in time,

tsbp, which is the start timestamp of the aggregation period for which tsj is in.

12:15:00 12:20:00 12:25:00

tsi tsbp tsj

Aggregation period Aggregation period

Map matched route pair

Figure 4.2. An example of when tsi and tsj, for a map-matched route pair is in distinct aggregation periods. The map-matched route pair is used for aggregation for both aggregation periods, and the map-matched route pair is split up into two new map-matched route pairs.

The ratio from equation (4.1) is multiplied with the total length of the map- matched route pair, to find the breakpoint of the distance of the map-matched route pair.

The sequence of road segments from the map-matched route pair are then split up into two groups according to the breakpoint of the distance of the map-matched route pair. New offsets are calculated and the road segments are added to their respective aggregation period.

Segment Average Speed

For each map-matched route pair the segment average speed, vavg, the taxi travelled with from start timestamp, tsi to end timestamp, tsj is calculated as in equation

(4.2) and each road segment in the map-matched route pair is associated with this average speed.

vavg = (len(rs1) + len(rs2) + ...len(rsn−1) − of f seti+ of f setj)/(tsj− tsi) (4.2)

To calculate the segment average speed for a road segment in an aggregation period from the map-matched route pairs, a possible method is to calculate the segment average speed as the average of all the speed values associated with that road segment in that aggregation period. But since the first road segment of a map- matched route pair occur as the last road segment in the preceding map-matched route pair. And the last road segment of a map-matched route pair occur as the first road segment in the sequent map-matched route pair, those road segments will then affect the aggregated average speed with a weight 2. For that reason a weight is associated with each road segment of each map-matched route pair together with the speed. If the road segment is not the first or the last road segment of a map- matched route pair, the road segment is associated with weight 1. If the road segment is the first in the sequence of road segments in a map-matched route pair, the road segment is associated with a weight calculated as in equation (4.3). If the road segment is the last in the sequence of road segments it is associated with a weight calculated as in equation (4.4).

(len(rs1) − of f seti)/len(rs1) (4.3)

of f setj/len(rsn) (4.4)

After the association of average speed and weight values, the sequence of road seg- ments for each map-matched route pair consists of ((rs1, vavg, w1), ..., (rsn, vavg, wn)),

where vavgis the average speed for the map-matched route pair, and wiis the weight

associated with road segment, rsi. The road segments from all the map-matched

route pairs can then be grouped into lists according to their aggregation period, ap and road segment name, rsname: (ap, rsname, v1, w1), ..., (ap, rsname, vn, wn). And

the segment average speed for each road segment and aggregation period is calcu- lated as in equation (4.5).

Segment Taxi Flow

To calculate the segment taxi flow for each road segment in each aggregation period from the map-matched route pairs, the aggregated flow need to represent the number of taxis passing the road segments associated to a gantry during the aggregation period. A possible method to calculate the segment taxi flow for each road segment in each aggregation period is to count each occurrence of the road segment in the map-matched route pairs in that aggregation period as a taxi passing the gantry. As will be explained there is a problem with this simple approach, since it is possible a taxi will be counted twice. A possible case is when the taxi is sending its GPS

Gantry

GPS1 GPS2 GPS3

Map­matched route pair 1 Map­matched route pair 2

Timestamp: 13:04:30 Timestamp: 13:05:00 Timestamp: 13:05:40

0.6 0.4

Road segment

Figure 4.3. Example of how the flow is calculated from two map-matched route pairs, based on three consecutive GPS positions from the same taxi. The first GPS position is sent on a road segment not included in the association between gantry and road segment. The second GPS position is sent on the road segment associated to the gantry, and the third GPS position is sent on a road segment not associated to the gantry. The two map-matched route pairs are in two different aggregation periods and the calculated flow for the gantry will therefore be different for the two aggregation periods for this taxi. In this example the flow for the taxi in the aggregation period 13:00:00–13:05:00 is 0.6 and the flow for the taxi in the aggregation period 13:05:00– 13:10:00 is 0.4.

position while driving on the road segment. The road segment will then be present as the last road segment in one map-matched route pair, and the first road segment in the next map-matched route pair and the taxi will then be counted twice. When the road segment is very long or the traffic along the road segment is moving at a slow speed it is also possible that the taxi will send its GPS position several times while driving on the same road segment. Resulting in several map-matched route pairs for the same road segment and the taxi will be counted several times. To solve this problem the weight explained earlier is used to represent the flow of a taxi. The flow of a road segment for an aggregation period, calculated for a taxi is equal to the ratio of the distance the taxi travelled in that aggregation period, on that road segment, in relation to the length of the road segment (see example in figure 4.3). By having the weight represent the flow, the flow for each map-matched route pair will only be counted as the ratio between the distance travelled on the road segment in a map-matched route pair divided by the total distance of the road segment.

Documento similar