Exporting data from Hbefa
So far I was using example files to run the emission analysis code, but now we have access to the Hbefa data. Are there instructions anywhere as to what and how I have to export the data from Hbefa so they can be used by the emissions contrib?
Hello Sebastian, it is not very complicate, and we have not written it down for the current version.
In the following I try to write down some things that I still have in mind (last time I did this, is some time ago)
- The most important thing that I have in mind, is that we had to do it step by step for not crashing the (Access) Database.
- We are currently using the
averagelevel and theperTechnologylevel. The "detailed" level is for us to detailed, because one needs to specify the EURO-norm for each vehicle as well. - If you also want to have the cold-start emissions: There is a checkbox somewhere in the dialog for defining a query.
- If you have your query defined, you can go somewhere in the menu and select "export" and choose the query to export.
- The resulting table can be opened in Excel and then saved as .csv
Please also note, that HBEFA does not provide cold-start emissions for all vehicle types, so you may add there some values on your own to that tables (see https://github.com/matsim-org/matsim-libs/pull/1650)
Ah, ok, I see. There is a download link at Hbefa now which only lets you download some Access database, so I was wondering which tables to export from there. But now I started up some Windows and downloaded the full program, now it makes sense ;-)
I was hoping to further automate the process by reading the Access database directly from Java, but it seems there are quite some calculations involved in between. Do you know if anybody has attempted to use the data directly and do the calculations on the fly? As far as I understand, it is mainly pulling the correct factors from the right tables, but even that might be quite complex.
No, sorry, I do not know if somebody is working on it. I think it would also be very helpful, if one could access the database (and therefore the "raw" values) directlys and not only from MS Access (which is not available for MacOS :( ). Also, for this, I am not sure if that will be possible in future versions.
When we originally worked on this, it was not possible to get a direct access to the hbefa database. Instead, one could only dump tables out of it. This is the reason for the awkward approach. I can’t say if this has changed, and the approach could be made “nicer”.