eqasim-org / eqasim-java

The eqasim framework features an integrated transport simulation environment. It is based on the agent-based transport simulation framework MATSim with added components for simulation of discrete choice models.
http://www.eqasim.org
GNU General Public License v2.0
23 stars 40 forks source link

IDFPtCostModel #141

Open Dib-AEK opened 2 years ago

Dib-AEK commented 2 years ago

I would like to propose some updates to the IDFPtCostModel class. Currently, if the agent doesn't have a Navigo pass, and if his trip is not within Paris or he doesn't use the metro or the bus, the price is calculated as follows:

Price = 0.25× (distance_origin_center_km+distance_destination_center_km)

However, this model is straightforward and assumes that all trips using the train, for example, and whose origin or destination are outside Paris, must necessarily pass by Paris, which is not always the case, especially when one is far from Paris and only takes the train to one or two stations, so the origin-destination distance should also be taken into account in order not to penalize train trips over short distances outside Paris. A further remark is that, in general, people who do not have a Navigo pass are likely to use point-to-point tickets if they go to/come from outside Paris. So, I would like to propose this simple model: Price = max(5.5×σ(a×distance_origin_destination +b×distance_origin_center +c×distance_destination_center+d), 1.9 ) Where σ is the sigmoid function The data I used to fit the model and estimate the coefficients is presented in the following table (collected from RATP and TRANSILIEN ):

image

the fitted coefficients are:

a = 0.098  
b = 0.006 
c = 0.006 
d =-0.77 

And here is a figure that illustrates the difference between the current model and the model I present: image

sebhoerl commented 2 years ago

Do you have some correlation information on the estimated models? Are the parameters significant? And the left-hand model is the new estimated one? Looks nice, then!

Is this based on Euclidean distances or routed distances? Theoretically, we can easily obtain the distance when routing the PT trips, and with the routed distance it is probably even better (if this is not already the Euclidean distance).

Feel free to send a PR, we could even introduce it as a second cost model and define it as the default.

balacmi commented 7 months ago

@Dib-AEK was this sent as a PR?

sebhoerl commented 7 months ago

We implemented it, and it works well from our side (in the explo22 branch that I'm currently cleaning up). But never heard about it again from Abdelkader :) Would be nice to have the raw data somewhere so we can make this reproducible. Otherwise we may just do another scraping while cleaning up in the coming weeks.

sebhoerl commented 7 months ago

That being said, the tarif system has been simplified quite a bit recently (capped to 5 EUR, some connections have special prices)

Dib-AEK commented 7 months ago

Thanks for the update! My initial message was a proposition, and I did include the table of my data in the message. I collected the data from RATP and TRANSILIEN. Apologies if the table appeared empty in dark mode; I'll make sure to double-check the formatting next time.

Regarding the changes in the tariff system last year, as Sebastian mentioned, it's definitely something to consider. If you find it interesting to update the model with a new dataset, I'm more than happy to collect the data and work on another model. Just let me know.