Skip to content
Snippets Groups Projects
Commit f013c8af authored by Peter Alexander's avatar Peter Alexander
Browse files

Debug to shock yield adjustment

parent 27fd1723
No related branches found
No related tags found
No related merge requests found
package ac.ed.lurg.country.gams;
import ac.ed.lurg.types.CommodityType;
import ac.ed.lurg.utils.LogWriter;
public class GamsCommodityDemand {
......
......@@ -4,7 +4,6 @@ import java.util.Map;
import ac.ed.lurg.country.SingleCountry;
import ac.ed.lurg.types.CommodityType;
import ac.ed.lurg.utils.LogWriter;
public class GamsDemandInput {
private SingleCountry country;
......
......@@ -49,6 +49,7 @@ public class YieldShockManager {
YieldShockReader yieldShockReader = new YieldShockReader(yieldShockMap);
yieldShockReader.getRasterDataFromFile(ModelConfig.YIELDSHOCK_MAP_DIR + File.separator + mapFilename);
cacheYieldShockMaps.put(mapFilename, yieldShockMap);
LogWriter.println("YieldShockManager.getYieldShockMap: added " + mapFilename + " now have " + cacheYieldShockMaps.size() + "cached");
}
return yieldShockMap;
......@@ -79,7 +80,7 @@ public class YieldShockManager {
}
}
public void adjustForShocks(RasterSet<YieldShockItem> yieldShockMap, YieldRaster yieldRaster, CropType crop, double yieldAdjustment) {
private void adjustForShocks(RasterSet<YieldShockItem> yieldShockMap, YieldRaster yieldRaster, CropType crop, double yieldAdjustment) {
LogWriter.println("Applying yield shock to " + crop + ", rate " + yieldAdjustment);
for (Map.Entry<RasterKey, YieldShockItem> entry : yieldShockMap.entrySet()) {
YieldShockItem value = entry.getValue();
......
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