diff --git a/GAMS/IntExtOpt.gms b/GAMS/IntExtOpt.gms index 791de819a124216f4fcc76c3d754c9dc0089ca2d..8a5d693a83e22922fb6f08fcac195ab51feec70c 100644 --- a/GAMS/IntExtOpt.gms +++ b/GAMS/IntExtOpt.gms @@ -42,7 +42,10 @@ $gdxin SCALAR delta use to smooth power function see 7.5 www.gams.com dd docs solversconopt.pdf / 0.00000000001 / - SCALAR minDemandPerCereal / 0.1 / + SCALAR minDemandPerCereal / 0.1 /; + + SCALAR unhandledCropArea includes fruit veg forage crops set aside and failed crop / 0.4 /; + previousArea(crop_less_pasture, location) = previousArea(crop_less_pasture, location) * (1.0 - unhandledCropArea); PARAMETER feedDM(crop) kg DM per kg of feed the conversion from feed to meat is done in the R animal product index / wheat 0.89 @@ -62,9 +65,6 @@ $gdxin SCALAR fertiliserUnitCost / 1.0 / - PARAMETER previousCropTotalAreas(location); - previousCropTotalAreas(location) = sum(crop_less_pasture, previousArea(crop_less_pasture, location)); - VARIABLES area(crop, location) total area for each crop - Mha fertI(crop, location) fertilizer intensity for each crop - factor between 0 and 1 @@ -131,7 +131,7 @@ $gdxin MAX_FERT_INTENSITY_CONSTRAINT(crop, location) .. fertI(crop, location) =L= 1; MAX_IRRIG_INTENSITY_CONSTRAINT(crop, location) .. irrigI(crop, location) =L= 1; - TOTAL_LAND_CHANGE_CONSTRAINT(location) .. suitableLandArea(location) =G= sum(crop, area(crop, location)); + TOTAL_LAND_CHANGE_CONSTRAINT(location) .. suitableLandArea(location) =G= sum(crop_less_pasture, area(crop_less_pasture, location)) / (1.0 - unhandledCropArea) + area('pasture', location); NON_FEED_CROP_CONSTRAINT(not_feed_crop) .. feedAmount(not_feed_crop) =E= 0; @@ -212,7 +212,9 @@ $gdxin ); display agriLandExpansion.l, previousArea, area.l, net_supply.l, demand, feedAmount.l, yield.l, netImportAmount.l; - + + area.l(crop_less_pasture, location) = area.l(crop_less_pasture, location) / (1.0 - unhandledCropArea); + parameter totalProd(all_types); totalProd(crop) = sum(location, area.l(crop, location) * yield.l(crop, location)); totalProd('meat') = meatEfficency*sum(feed_crop, feedDM(feed_crop) * feedAmount.l(feed_crop)); diff --git a/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java b/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java index a9211c718b62f25589b0452c5d81bac0d9591dae..a35d7298b40d4c55d7c04e04d89319b9d09ad962 100644 --- a/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java +++ b/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java @@ -345,7 +345,7 @@ public class GamsRasterOptimiser { LogWriter.println("YieldResponsesItem: " + rasterInputData.getCountryInput().getCountry() + ", countFound=" + countFound + ", countMissing=" + countMissing); for (Map.Entry<Integer, Set<RasterKey>> e : mapping.entrySet()) { - LogWriter.println(e.getKey() + " category has " + e.getValue().size() + " raster areas"); + LogWriter.println(e.getKey() + " zone has " + e.getValue().size() + " raster areas"); CropType[] cs = {CropType.WHEAT, CropType.MAIZE}; for (CropType c : cs) { diff --git a/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java b/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java index f00d2ace932a080e78b64a8f79ff384392dd618a..74231fca11305dd18d9992f0b536197aeff18572 100644 --- a/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java +++ b/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java @@ -81,10 +81,10 @@ public class LPJYieldResponseMapReader extends AbstractTabularRasterReader<Yield for (IrrigationRate irrig : IrrigationRate.values()) { YieldType yieldType = YieldType.getYieldType(fert, irrig); - // if (!fert.equals(FertiliserRate.NO_FERT)) + if (!fert.equals(FertiliserRate.NO_FERT)) adjFactor = 10; // 10 for kg/m2 to t/ha - // else - // adjFactor = 5; + else + adjFactor = 5; String fertIrrigString = irrig.getId() + fert.getId(); double ww = getValueForCol(rowValues, "TeWW" + fertIrrigString) * adjFactor;