Skip to content
Snippets Groups Projects
Commit 0ba66745 authored by Bart Arendarczyk's avatar Bart Arendarczyk
Browse files

Fixed demand for CRAFTY countries during calibration.

parent cae01ba9
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,8 @@ public class CraftyProdManager { ...@@ -34,7 +34,8 @@ public class CraftyProdManager {
} }
public void updateWithCraftyData(Collection<CraftyCountryAgent> craftyCountryAgents, Timestep timestep, Map<CropType, GlobalPrice> worldPrices) { public void updateWithCraftyData(Collection<CraftyCountryAgent> craftyCountryAgents, Timestep timestep, Map<CropType, GlobalPrice> worldPrices) {
String rootDir = ModelConfig.CRAFTY_PRODUCTION_DIR + File.separator + timestep.getYear(); int currentYear = (ModelConfig.IS_CALIBRATION_RUN || !ModelConfig.CHANGE_DEMAND_YEAR) ? ModelConfig.BASE_YEAR : timestep.getYear();
String rootDir = ModelConfig.CRAFTY_PRODUCTION_DIR + File.separator + currentYear;
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
WatchForFile fileWatcher = new WatchForFile(new File(rootDir + File.separator + "done")); WatchForFile fileWatcher = new WatchForFile(new File(rootDir + File.separator + "done"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment