USEPA / EPA_MOVES_Model

Estimating emissions for mobile sources
Other
80 stars 20 forks source link

XPKNeededFuelSupply error when running multiple counties at Default Scale #58

Closed danielbizercox closed 7 months ago

danielbizercox commented 11 months ago

When multiple counties in same fuel region are run together in the same RunSpec, you get the following error message (for example):

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '500000000-2016-1-9' for key 'XPKNeededFuelSupply'.

The issue originates in a function in DefaultDataMaker.java which builds the fuel supply table in the execution database, and duplicate entries are accidentally added for each county in the RunSpec.

This will be fixed in MOVES4.0.1. Until then, a workaround is to run counties individually.