matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
84 stars 179 forks source link

Modelling Ridesharing with energy constraints for autonomous EVs #760

Open Nasheor opened 2 years ago

Nasheor commented 2 years ago

Hi, I'm doing a Ph.D. The premise of my research is to try to run a ridesharing service with energy produced by Smart Energy Communities (SECs) while matching commuters with similar travel requirements to available EVs.

To give an example of what it is I'm trying to do - Consider a city with 3 SEC with each SEC producing 'x' units of energy every time unit. Once sufficient energy is available to dispatch an EV, passengers with similar travel requirements (Eg. Pickup time, Drop off time, etc) are allocated to the dispatched EV. The goal is to maximize the trips satisfied with the energy produced by the SECs.

At the moment, I have my model and allocation algorithm built in python. Is it possible to model this problem in MATsim and integrate my allocation algorithm for visualization?

I'm fairly new to MATsim with only a theoretical understanding of how MATsim functions. Any help /advice and pointers towards useful resources would be highly appreciated.

tschlenther commented 2 years ago

Hi,

to me that reads like you should try out the edrt package in the drt-extensions contrib, which brings together the functionality of modelling electric vehicles and the corresponding infrastructure and the dynamic vehicle routing problem (dvrp). By doing so, you can send idle vehicles to charging locations and dynamically assign them to passengers, with or without pooling. I am uncertain, but I do not think that the code will currently allow you to model the grid side though. That means, chargers will have infinite energy available and you can only set constraints on how fast they can transmit energy etc. but not that they would have to wait for the energy to be generated over time. However, with some assumptions you could get a first version running even without coding. With some java coding, you might also be able to hack in some of the energy generation stuff to. Regarding the passenger-vehicle dispatch, the package also brings a standard implementation with it, that can be replaced. I am afraid that you would have translate your code into Java at the moment, as - according to my knowledge - currently MATSim does not offer a coherent API that allows to plugin this kind of within-day functionality from the outside.