matsim-org / matsim-code-examples

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

Elevation data in MATSim simulation #752

Open sarah-heejeong opened 2 years ago

sarah-heejeong commented 2 years ago

Hello,

I am trying to run the scenario that calculates the state of charge of EV. Is there a way for MATSim to take into account the elevation of the road data (or the road gradient) as an input?

pmikla14 commented 2 years ago

@sarah-heejeong did you find an answer already? I am looking for the same feature

ikaddoura commented 2 years ago

maybe have a look at the bicycle contrib in which the road gradient was considered by the router and the scoring. If I remember correctly, the gradient is used to adjust the bicycle speed level.

JWJoubert commented 2 years ago

We did work with road grade as a trial, and after that elevation became more standard in MATSim (being able to deal with z elevation in Coordinates). Maybe the bicycle contrib made it more clear. But getting road grade is actually not so easy... at least in our part of the world. There is an in press paper where we looked into it, but using OpenStreetMap or digital elevation models is actually not very accurate. Well, that is our finding so far.

Janekdererste commented 2 years ago

The you can find a code example for network creation in the bicycle contrib here

A more complex example can be found here The ElevationParser class follows the idea of the bicycle contrib's ElevationDataParser but supports multiple geo-tif files.

tschlenther commented 2 years ago

In order to account for the gradient in the energy consumption of an ev, you could use the LTHDriveEnergyConsumption implementation of the DriveEnergyConsumption interface. This implementation reads csv data containing consumption values per slope and speed and can handle different slope values per link, see also LTHConsumptionModelReader. See also the class RunEvExamplewithLTHConsumptionModel and the comments with pointers to the corresponding authors and their literature (on the energy consumption model etc). From RunEvExamplewithLTHConsumptionModel, you can also derive example input data.