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

Pasture subsidy fix.

parent 5eed70cd
No related branches found
No related tags found
No related merge requests found
...@@ -250,9 +250,13 @@ public class GamsLocationOptimiser { ...@@ -250,9 +250,13 @@ public class GamsLocationOptimiser {
if (DEBUG) LogWriter.println("\nCrop, subsidy rate"); if (DEBUG) LogWriter.println("\nCrop, subsidy rate");
GAMSParameter subsideRateP = inDB.addParameter("subsidyRate", 1); GAMSParameter subsideRateP = inDB.addParameter("subsidyRate", 1);
for (CropType crop : CropType.getNonMeatTypes()) { for (CropType crop : CropType.getNonMeatTypes()) {
double subsidyRate = countryInput.getSubsidyRates().get(crop); if (crop.equals(CropType.PASTURE)) { // subsidise pasture using value for ruminants
if (DEBUG) LogWriter.println(String.format("%15s,\t %.4f", crop.getGamsName(), subsidyRate)); setGamsParamValue(subsideRateP.addRecord(crop.getGamsName()), countryInput.getSubsidyRates().get(CropType.RUMINANTS), 4);
setGamsParamValue(subsideRateP.addRecord(crop.getGamsName()), subsidyRate, 4); } else {
double subsidyRate = countryInput.getSubsidyRates().get(crop);
if (DEBUG) LogWriter.println(String.format("%15s,\t %.4f", crop.getGamsName(), subsidyRate));
setGamsParamValue(subsideRateP.addRecord(crop.getGamsName()), subsidyRate, 4);
}
} }
if (DEBUG) LogWriter.println("\nImport-export, min trade/prod, max trade/prod, global import price, global export price, imports, exports, ruminantFeed, monogastricFeed, seedAndWasteRate"); if (DEBUG) LogWriter.println("\nImport-export, min trade/prod, max trade/prod, global import price, global export price, imports, exports, ruminantFeed, monogastricFeed, seedAndWasteRate");
......
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