Skip to content
Snippets Groups Projects

Bringing Bart's recent changes into the inequality branch

Closed s1713176 requested to merge master into subnational_inequality
3 files
+ 43
20
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 12
10
@@ -47,7 +47,8 @@
PARAMETER minNetImport(all_types) minimum net import for each crop based on world market;
PARAMETER irrigCost(location) irrigation cost in cost per 1000 Mlitre or Mha for each litre per m2;
PARAMETER irrigMaxRate(crop, location) max water application rate irrigation in litre per m2;
PARAMETER irrigConstraint(location) max water available for irrigation in litre per m2;
PARAMETER irrigConstraintLocation(location) max water availability by location for irrigation in litre per m2;
PARAMETER irrigConstraintFarmingType(farming_type, location) max water availability by farming type and location for irrigation in litre per m2;
PARAMETER seedAndWasteRate(all_types) rate of use for seed and waste combined;
PARAMETER subsidyRate(all_types) rates of subsidy compared to costs;
PARAMETER tradeAdjustmentCostRate(import_types) cost of adjusting net imports;
@@ -93,16 +94,16 @@
SCALAR discountRate;
SCALAR energyPrice;
*$gdxin "/Users/bart/Documents/PLUM_Output/test/GamsTmp/China2020landuse.gdx"
*$gdxin "C:/gitMaster/plumv2/GamsTmp/loc8109123609415732656/_gams_java_gdb1.gdx"
$gdxin %gdxincname%
$load location, suitableLandArea, demand
$load previousCropArea, previousFertIntensity, previousIrrigIntensity, previousOtherIntensity, previousRuminantFeed, previousMonogastricFeed, previousImportAmount, previousExportAmount
$load yieldNone, yieldFertOnly, yieldIrrigOnly, yieldBoth, yieldShock
$load fertParam, irrigParam, otherIParam, exportPrices, importPrices, maxNetImport, minNetImport, unhandledCropRate, setAsideRate, subsidyRate
$load meatEfficency, otherICost, irrigCost, irrigConstraint, irrigMaxRate, fertiliserUnitCost, domesticPriceMarkup, seedAndWasteRate
$load meatEfficency, otherICost, irrigCost, irrigConstraintLocation, irrigConstraintFarmingType, irrigMaxRate, fertiliserUnitCost, domesticPriceMarkup, seedAndWasteRate
$load previousLandCoverArea, carbonCreditRate, conversionCost, woodYieldMaxParam, woodYieldSlopeParam, woodYieldShapeParam, tradeAdjustmentCostRate
$load forestManagementCost, carbonForestMaxProportion, previousRotationIntensity, maxLandCoverChange, maxLandCoverArea
$load fertLimRestricted, irrigLimRestricted, otherLimRestricted, fertLimConventional, irrigLimConventional, otherLimConventional
$load fertLimRestricted, otherLimRestricted, fertLimConventional, otherLimConventional
$load solarEnergyDensity, agrivoltaicsYieldFactor, prodCost, animalProdCost, solarCostRate
$load discountRate, energyPrice, monoculturePenalty, agrivoltaicsCropCostFactor, previousProduction, pastureIntensityPenalty
$gdxin
@@ -181,7 +182,8 @@ $gdxin
EQUATIONS
UNIT_COST_EQ(crop, farming_type, location) cost per area - $1000 per ha or $billion per Mha
YIELD_EQ(crop, farming_type, location) yield given chosen intensity - tonnes per hectare
IRRIGATION_CONSTRAINT(location) constraint on water usage
IRRIGATION_CONSTRAINT_LOCATION(location) constraint on water usage
IRRIGATION_CONSTRAINT_FARMING_TYPE(farming_type, location)
CROP_PROD_CALC(crop, location)
TOTAL_CROP_PROD_CALC(crop) crop production calculation
@@ -237,8 +239,10 @@ $gdxin
(1 - exp(-fertParam(crop, location) * fertI(crop, farming_type, location))) * (1 - exp(-irrigParam(crop, location) * irrigI(crop, farming_type, location)))
) * (1 - exp(-otherIntensity(crop, farming_type, location) * otherIParam(crop, location))) * agrivoltaicsYieldFactor(crop, farming_type, location);
IRRIGATION_CONSTRAINT(location) .. irrigConstraint(location) * suitableLandArea(location) =G= sum((crop, farming_type), irrigMaxRate(crop, location) * irrigI(crop, farming_type, location) * cropArea(crop, farming_type, location));
IRRIGATION_CONSTRAINT_LOCATION(location) .. irrigConstraintLocation(location) * suitableLandArea(location) =G= sum((crop, farming_type), irrigMaxRate(crop, location) * irrigI(crop, farming_type, location) * cropArea(crop, farming_type, location));
IRRIGATION_CONSTRAINT_FARMING_TYPE(farming_type, location) .. irrigConstraintFarmingType(farming_type, location) * suitableLandArea(location) =G= sum(crop, irrigMaxRate(crop, location) * irrigI(crop, farming_type, location) * cropArea(crop, farming_type, location));
* Intensities must be <= 1
fertI.UP(crop, farming_type, location) = 1;
@@ -246,18 +250,16 @@ $gdxin
otherIntensity.UP(crop, farming_type, location) = 1;
fertI.UP(crop, 'conventional', location) = fertLimConventional;
irrigI.UP(crop, 'conventional', location) = irrigLimConventional;
otherIntensity.UP(crop, 'conventional', location) = otherLimConventional;
fertI.UP(crop, 'restricted', location) = fertLimRestricted;
irrigI.UP(crop, 'restricted', location) = irrigLimRestricted;
otherIntensity.UP(crop, 'restricted', location) = otherLimRestricted;
* Minimum crop intensity for agrivoltaics. Equivalent to 50% of potential yield.
otherIntensity.LO(crop, 'agrivoltaics', location) = 0.2152631;
* Fixing irrigI at 0 where no water to avoid optimisation problems
irrigI.FX(crop, farming_type, location) $ (irrigConstraint(location) = 0) = 0;
irrigI.FX(crop, farming_type, location) $ (irrigConstraintLocation(location) = 0) = 0;
irrigCost(location) $ (irrigCost(location) = 0) = 1e-6;
*************** Crop and animal supply *************************
Loading