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

Separate out param for agri expansion (again)

parent 4e4d1572
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,8 @@
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 pastureIncCost(location) price for increasing pasture area varies based on amount of managed or unmanaged forest;
PARAMETER agriExpansionCost(location) price for increase agricultural area varies based on amount of managed or unmanaged forest;
SCALAR pastureIncCost price for increasing pasture area ;
SCALAR cropIncCost price for increasing crop;
SCALAR cropOrPastureDecCost price for decreasing crop or pasture;
......@@ -43,7 +44,7 @@
*$gdxin "/Users/peteralexander/Documents/R_Workspace/UNPLUM/temp/GamsTmp/t1.gdx"
$gdxin %gdxincname%
$load location, suitableLandArea, demand, cropIncCost, pastureIncCost, cropOrPastureDecCost
$load location, suitableLandArea, demand, agriExpansionCost, cropIncCost, pastureIncCost, cropOrPastureDecCost
$load previousArea, previousFertIntensity, previousIrrigIntensity, previousOtherIntensity
$load yieldNone, yieldFertOnly, yieldIrrigOnly, yieldBoth
$load fertParam, irrigParam, otherIParam, exportPrices, importPrices, maxNetImport, minNetImport, unhandledCropArea
......@@ -193,8 +194,9 @@ $gdxin
( SUM((crop, location), area(crop, location) * unitCost(crop, location)) +
SUM(location,
agriExpansionCost(location) * agriLandExpansion(location) +
cropIncCost * cropIncrease(location) +
pastureIncCost(location) * pastureIncrease(location) +
pastureIncCost * pastureIncrease(location) +
cropOrPastureDecCost * cropDecrease(location) +
cropOrPastureDecCost * pastureDecrease(location)
)
......
......@@ -2,22 +2,26 @@ BASE_DIR=./hind1970
INITAL_LAND_COVER_FILENAME=hurtt_1970.txt
BASE_YEAR=1970
SSP_SCENARIO=HINDCAST
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/19Jan2017/LPJG_PLUM_expt1.1_1971-2005_forED
YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.1_1966-2005_ipsl_lessIO_forED
YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/19Jan2017/LPJG_PLUM_expt1.1_1971-2005_forED
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.1_1966-2005_ipsl_lessIO_forED
# irritatingly the gams file is also found under the BASE_DIR, and don't want to duplicate so need to specify exactly
GAMS_MODEL=./GAMS/IntExtOpt.gms
#DEBUG_LIMIT_COUNTRIES=true
#DEBUG_COUNTRY_NAME=Pakistan
DEBUG_COUNTRY_NAME=Europe & Central Asia_other
#Russian Federation
#Europe & Central Asia_other
IS_CALIBRATION_RUN = false
IS_CALIBRATION_RUN = true
END_TIMESTEP=20
END_TIMESTEP=0
TIMESTEP_SIZE=2
BIOENERGY_CHANGE_ANNUAL_RATE=0.25
BIOENERGY_CHANGE_START_YEAR=1970
BIOENERGY_CHANGE_END_YEAR=2010
INTERPOLATE_OUTPUT_YEARS = false
\ No newline at end of file
INTERPOLATE_OUTPUT_YEARS = false
PASTURE_INCREASE_COST_BASE=0.01
PASTURE_INCREASE_COST_MANAGED_FOREST=0.5
\ No newline at end of file
......@@ -186,8 +186,9 @@ public class ModelConfig {
public static final double LAND_CHANGE_COST = getDoubleProperty("LAND_CHANGE_COST", 0.9);
public static final double CROP_INCREASE_COST = getDoubleProperty("CROP_INCREASE_COST", 1.0 * LAND_CHANGE_COST);
public static final double CROP_OR_PASTURE_DECREASE_COST = getDoubleProperty("CROP_OR_PASTURE_DECREASE_COST", 0.5 * LAND_CHANGE_COST);
public static final double PASTURE_INCREASE_COST_BASE = getDoubleProperty("PASTURE_INCREASE_COST_BASE", 0.02 * LAND_CHANGE_COST);
public static final double PASTURE_INCREASE_COST_MANAGED_FOREST = getDoubleProperty("PASTURE_INCREASE_COST_MANAGED_FOREST", 0.3 * LAND_CHANGE_COST);
public static final double PASTURE_INCREASE_COST = getDoubleProperty("PASTURE_INCREASE_COST", 0.02 * LAND_CHANGE_COST);
public static final double AGRI_EXPANSION_COST_BASE = getDoubleProperty("PASTURE_INCREASE_COST_MANAGED_FOREST", 0.02 * LAND_CHANGE_COST);
public static final double AGRI_EXPANSION_COST_BASE_MANAGED_FOREST = getDoubleProperty("PASTURE_INCREASE_COST_MANAGED_FOREST", 0.3 * LAND_CHANGE_COST);
public static final double SEED_AND_WASTE_FRACTION = getDoubleProperty("SEED_AND_WASTE_FRACTION", 0.15);
......
......@@ -89,11 +89,12 @@ public class GamsLocationOptimiser {
GAMSParameter prevIrrigIP = inDB.addParameter("previousIrrigIntensity", 2);
GAMSParameter prevOtherIP = inDB.addParameter("previousOtherIntensity", 2);
GAMSParameter landP = inDB.addParameter("suitableLandArea", 1);
GAMSParameter pastureIncCostP = inDB.addParameter("pastureIncCost", 1);
GAMSParameter agriExpansionCostP = inDB.addParameter("agriExpansionCost", 1);
addScalar(inDB, "cropIncCost", ModelConfig.CROP_INCREASE_COST, 3);
addScalar(inDB, "cropOrPastureDecCost", ModelConfig.CROP_OR_PASTURE_DECREASE_COST, 3);
addScalar(inDB, "pastureIncCost", ModelConfig.PASTURE_INCREASE_COST, 3);
double totalAgriLand = 0;
for (Map.Entry<Integer, ? extends LandUseItem> entry : inputData.getPreviousLandUse().entrySet()) {
......@@ -105,9 +106,9 @@ public class GamsLocationOptimiser {
if (DEBUG) LogWriter.println(String.format(" %d %15s,\t %.3f", locationId, "suitableLand", suitableLand));
setGamsParamValueTruncate(landP.addRecord(locString), suitableLand, 3);
double pastureIncCost = ModelConfig.PASTURE_INCREASE_COST_BASE + landUseItem.getForestManagedFraction() * ModelConfig.PASTURE_INCREASE_COST_MANAGED_FOREST;
if (DEBUG) LogWriter.println(String.format(" %d %15s,\t %.3f", locationId, "pastureIncCost", pastureIncCost));
setGamsParamValue(pastureIncCostP.addRecord(Integer.toString(locationId)), pastureIncCost, 3);
double agriExpansionCost = ModelConfig.AGRI_EXPANSION_COST_BASE + landUseItem.getForestManagedFraction() * ModelConfig.AGRI_EXPANSION_COST_BASE_MANAGED_FOREST;
if (DEBUG) LogWriter.println(String.format(" %d %15s,\t %.3f", locationId, "agriExpansionCost", agriExpansionCost));
setGamsParamValue(agriExpansionCostP.addRecord(Integer.toString(locationId)), agriExpansionCost, 3);
for (CropType cropType : CropType.getNonMeatTypes()) {
Vector<String> v = new Vector<String>();
......
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