Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to MATSim 15 #173

Merged
merged 17 commits into from
Mar 7, 2024
Merged

Update to MATSim 15 #173

merged 17 commits into from
Mar 7, 2024

Conversation

sebhoerl
Copy link
Collaborator

@sebhoerl sebhoerl commented Dec 5, 2023

Update to MATSim 15

@sebhoerl
Copy link
Collaborator Author

sebhoerl commented Dec 5, 2023

@Nitnelav Could you please check RunComputeEmissionsEvents? There is still the comment about MATSim 14, which should be resolved I think? And there is one line which I don't know how to update:

emissionsConfig.setHbefaRoadTypeSource(EmissionsConfigGroup.HbefaRoadTypeSource.fromLinkAttributes);

Could you please have a look?

@Nitnelav
Copy link
Collaborator

Nitnelav commented Dec 5, 2023

Yes i'll check, this week is quite busy though. So probably next week.
Should we do like last time, I create a PR on https://github.com/eqasim-org/eqasim-java/tree/matsim-15 ?

@sebhoerl
Copy link
Collaborator Author

sebhoerl commented Dec 5, 2023

Ok great, thanks! Either that, or I also just added you to the project, so you should be able to add commits here directly.

@Nitnelav
Copy link
Collaborator

@Nitnelav Could you please check RunComputeEmissionsEvents? There is still the comment about MATSim 14, which should be resolved I think? And there is one line which I don't know how to update:

emissionsConfig.setHbefaRoadTypeSource(EmissionsConfigGroup.HbefaRoadTypeSource.fromLinkAttributes);

Could you please have a look?

FYI the method was deprecated and removed in matsim 15, the behavior is hard coded as 'fromLinkAttribute' now

@sebhoerl
Copy link
Collaborator Author

@Nitnelav Ok I see, so it is OsmHbefaMapping that is used by default? But do we have the attributes that are used there in the network (type, allowed_speed)? I think in our pt2matsim-generated networks the osm highway attribute is called differently and I'm not sure if we even have allowed_speed? Or am I missing something? Maybe would be good to have an integration test for that (in the examples package is probably the easiest).

@Nitnelav
Copy link
Collaborator

Yes i need to check that. Maybe the type was never taken into account 😬
But maybe it is a matsim 15 change...

And I agree, a test is needed here, I'll try to write something.

And I think the code could be place in the core package, since it is not related to IdF no ?

@sebhoerl
Copy link
Collaborator Author

For the moment, the best would be if you take a look in examples, there we have the Corsica test scenario. But we're currently replacing this with a very small Melun scenario, so it might be worth waiting. And yes, might make sense to move it to core in some way, but I would leave it here for the time being. Step by step :)

* update IdF emission to matsim 15

* update log4j import

* make sure Osm mapping is used on osm:way:highway tag

* add matsim-examples to pom to get hbefa-41 sample for emissions tests

* make the desired pollutant list defined in the commandline

* test the emissions part
@Nitnelav
Copy link
Collaborator

Ok I wrote the test. It takes a while but it works. I had to fetch some HBEFA sample csv from matsim-examples to make it work. I found a few bugs/improvements on the way also

@sebhoerl
Copy link
Collaborator Author

thanks! we'll merge a couple of other things before we merge the matsim 15 PR

@Nitnelav
Copy link
Collaborator

Yes ! I should update the CHANGELOG and some README also
By the way, just a thought, there is a lot of undocumented tools everywhere, we should write something somewhere listing the various commandline tools and what thery do

@Nitnelav
Copy link
Collaborator

Everything is fine here now, should we merge @sebhoerl ?

@sebhoerl
Copy link
Collaborator Author

sebhoerl commented Mar 5, 2024

Running the pipeline with the latest commit to check compatibility right now.

@sebhoerl sebhoerl merged commit 09c830f into develop Mar 7, 2024
1 check passed
@sebhoerl sebhoerl deleted the matsim-15 branch March 7, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update JDK
2 participants