arup-group / gelato

Gelato turns MATSim outputs into transport sustainability KPI metrics
GNU General Public License v3.0
10 stars 1 forks source link

Add drt mode to the legs filter in pt wait time #47

Closed KasiaKoz closed 9 months ago

KasiaKoz commented 9 months ago

Resolves: #45 Resolves: #46 Changed the condition for filtering the legs data for pt-wait-time kpi. No changes to the drt integration test, because the kpi output is for peak time and the drt trip we've got is at 5 am 🙄. But there are changes to the intermediate table output:

Intermediate output before:

               Average wait time at stops by mode                
 mode  |  access_stop_id  |  hour  |  Mean [wait_time_seconds]  |
-----------------------------------------------------------------

(Empty, because there are only two agents in the sim, one with car trips and other with a drt trip and a car trip) After:

             Average wait time at stops by mode                
 mode  |  access_stop_id  |  hour  |  Mean [wait_time_seconds]  |
-----------------------------------------------------------------
  drt  |                  |     5  |                       657  |

We report the intermediate output per stop and mode, but drt mode legs don't report stops.. so in the intermediate table, it will be average across all drt pick-ups (within each hour bin) - is that acceptable @divyasharma-arup ?

KasiaKoz commented 9 months ago

I can do this one:

2 - Amend the journey time of the DRT trip in the DRT integration test so that it shows up in the KPI output

KasiaKoz commented 9 months ago

Ok so I moved johan from drt small sim from 5am to ~8am

Changes in KPIs: pt wait time 0.0 -> 657.0 congestion (because drt trip has moved into peak time window) before

        Congestion KPI        
 mode  |  Mean [delayRatio]  |
------------------------------
  bus  |               2.83  |
  drt  |               1.01  |

after

        Congestion KPI        
 mode  |  Mean [delayRatio]  |
------------------------------
  bus  |               2.83  |
  drt  |               6.24  |

speed (too big of an output, but it's delay ratios moving hour brackets)

mfitz commented 9 months ago

Ok so I moved johan from drt small sim from 5am to ~8am

I'm sure Johan appreciates the lie-in...

Changes in KPIs: pt wait time 0.0 -> 657.0 congestion (because drt trip has moved into peak time window) before

        Congestion KPI        
 mode  |  Mean [delayRatio]  |
------------------------------
  bus  |               2.83  |
  drt  |               6.24  |

after

        Congestion KPI        
 mode  |  Mean [delayRatio]  |
------------------------------
  bus  |               2.83  |
  drt  |               1.01  |

So the average wait time for DRT has reduced because... we've added a trip with a wait time lower than the previous average?

KasiaKoz commented 9 months ago

So the average wait time for DRT has reduced because... we've added a trip with a wait time lower than the previous average?

pt wait time increased because there was no pt in the window before and now there is

As for the congestion delay ratio - I got before/after mixed up!! 😓 corrected my comment above now. There is a link long entry for drt that had a particularly large delay ratio that was outside of the peak time window(14-13,drt,5,6.24 -> 14-13,drt,8,6.24 (link,mode,hour,delayRatio)) (the large delay ratio means nothing btw, I fudged the numbers)