-
Notifications
You must be signed in to change notification settings - Fork 73
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
Problem running matsim's emission contrib #159
Comments
Hi, I have never used the emissions part. But I'm pretty sure that you'll need Hbefa data for that, I'm not sure if it works without (but maybe you already have it). @Nitnelav should be able to tell you more about the emissions part :) |
Mmmm its odd, it looks like you are not using the proper Matsim version. |
HBEFA 4.2 (online version) I used : java -cp toulouse_run.jar org.eqasim.ile_de_france.emissions.RunComputeEmissionsEvents --config-path toulouse_config.xml --hbefa-cold-avg ./EFA_ColdStart_Vehcat_2015_Cold_Average.csv --hbefa-hot-avg ./EFA_HOT_Vehcat_2015_Hot_Average.csv --hbefa-cold-detailed ./EFA_ColdStart_Subsegm_2015_Cold_Detailed.csv --hbefa-hot-detailed ./EFA_HOT_Subsegm_2015_Hot_Detailed.csv Then I got the error: ARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
1 error |
Ok it matches Matsim 13.0 so the issue is probably with the CSV files you exported from HBEFA.
|
Ah, no, it's not the same, my headers are: Country, Year, Vehicle category, Pollutant, Emission factor, Unit |
Ah I didn't see you were using the online tool. No you need to buy the full HBEFA database and export the data you need to use the provided scripts. |
Many thanks @Nitnelav |
Hello @Nitnelav, I tried emission contrib by using the sample of hbefa dataset but It could not write the output_emission_events, I don't have the folder like simulation_output in this direction and it returns the errors, do you think my sample database still has the problem? Thank you in advance. WARNING: An illegal reflective access operation has occurred |
You can try creating the /home/nedam/PycharmProjects/ile-de-france2/output/simulation_output directory i guess |
In fact, it doesn't find the output_emission_events.xml in this folder, because it didn't create by emissions.RunComputeEmissionsEvents. |
Hello @Nitnelav, could you please let me know your hbefa csv files are like this row sample: Case;VehCat;Year;TrafficScenario;Component;RoadCat;AmbientCondPattern;IDSubsegment;Subsegment;Technology;SizeClasse;EmConcept;KM;%OfSubsegment;EFA;EFA_weighted;EFA_km;EFA_km_weighted;EFA_WTT;EFA_WTT_km;EFA_WTW;EFA_WTW_km 2015_Cold_Detailed[4.2.2];pass. car;2015;REF F HB42;HC;Urban;Ø/France - Avg;111903;PC petrol ECE-15'03;petrol (4S);not specified;PC P Euro-0;212826,0313;7,67883E-05;7,009304523;0,575411737;;;;;; |
Hello @neda-git. I am also trying to run matsim emission contrib using the HBFEA using some example files that matsim scenarios provide. I think I met the the same error that you posted in the issue. Could you please let you know how did you resolve the following error? Many thanks.
|
Hi @syhwawa , for solving this issue try to extract the dataset from here https://www.hbefa.net/ , sample data is not complete and in your case some emission factors are not exist in your hbefa dataset. Hope it works for you. |
Thanks very much for your reply! @neda-git. Sure thing. I will give a try using the full HBEFA dataset. |
Hi there, just so you know I have been working on some improvements on the emission code here : eqasim-org/eqasim-java#173 It is still requires a few changes before merging but you can cherrypick what you need from there if you need it. |
Hi @sebhoerl, I'm trying to run the matsim's emission contrib, after running the full simulation for toulouse to use some classes defined in eqasim-java to analyse and compute emissions based on the MATSim outputs, I got these errors, Do you think the problem is related to hbefa's data? Thank you in advance.
.
.
023-03-02T12:08:27,200 INFO Injector:96
2023-03-02T12:08:27,200 INFO Injector:99 === printInjector end ===
2023-03-02T12:08:27,203 INFO EmissionModule:141 entering createLookupTables
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:
at org.matsim.contrib.emissions.EmissionModule.(EmissionModule.java:65)
while locating org.matsim.contrib.emissions.EmissionModule
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
at org.eqasim.ile_de_france.emissions.RunComputeEmissionsEvents.main(RunComputeEmissionsEvents.java:72)
Caused by: java.lang.IllegalArgumentException: Mapping for Component not found, expected one of [Country,Year,Vehicle category,Pollutant,Emission factor,Unit]
at org.apache.commons.csv.CSVRecord.get(CSVRecord.java:123)
at org.matsim.contrib.emissions.HbefaTables.setCommonParametersOnKey(HbefaTables.java:88)
at org.matsim.contrib.emissions.HbefaTables.createColdKey(HbefaTables.java:79)
at org.matsim.contrib.emissions.HbefaTables.load(HbefaTables.java:57)
at org.matsim.contrib.emissions.HbefaTables.loadAverageCold(HbefaTables.java:38)
at org.matsim.contrib.emissions.EmissionModule.createLookupTables(EmissionModule.java:144)
at org.matsim.contrib.emissions.EmissionModule.(EmissionModule.java:73)
at org.matsim.contrib.emissions.EmissionModule$$FastClassByGuice$$3f5bb797.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
... 2 more
The text was updated successfully, but these errors were encountered: