Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLUM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Land Use Lab
PLUM
Commits
d85106f2
Commit
d85106f2
authored
4 years ago
by
Bart Arendarczyk
Browse files
Options
Downloads
Patches
Plain Diff
Change to how landCoverChange is calculated in GAMS.
parent
0584a9ec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GAMS/IntExtOpt.gms
+11
-20
11 additions, 20 deletions
GAMS/IntExtOpt.gms
with
11 additions
and
20 deletions
GAMS/IntExtOpt.gms
+
11
−
20
View file @
d85106f2
...
...
@@ -77,23 +77,10 @@ $load previousLandCoverArea, carbonFluxRate, woodYield, carbonPrice, woodPrice
$load minimumLandCoverArea
$gdxin
*
convert units from $/t to billion$/Mt
*convert units from $/t to billion$/Mt
carbonPrice = carbonPrice * 0.001;
woodPrice = woodPrice * 0.001;
* convert units from 1000$/ha to million$/Mha
* agriExpansionCost(location) = agriExpansionCost(location) * 1000;
* pastureIncCost = pastureIncCost * 1000;
* cropIncCost = cropIncCost * 1000;
* cropDecCost = cropDecCost * 1000;
* pastureDecCost = pastureDecCost * 1000;
* covert units from 1000$/t to million$/Mt
* exportPrices(import_crop) = exportPrices(import_crop) * 1000;
* importPrices(import_crop) = importPrices(import_crop) * 1000;
SCALAR delta use to smooth power function see 7.5 www.gams.com dd docs solversconopt.pdf / 0.00000000001 /;
demand(cereal_crop) = demand('cereals') * minDemandPerCereal(cereal_crop);
...
...
@@ -162,7 +149,7 @@ $gdxin
landCoverArea, landCoverChange, woodHarvest;
EQUATIONS
UNIT_COST_EQ(crop, location) cost per area -
m
illion
$
per Mha
UNIT_COST_EQ(crop, location) cost per area -
$1000 per ha or $b
illion per Mha
YIELD_EQ(crop, location) yield given chosen intensity - tonnes per hectare
CROP_DEMAND_CONSTRAINT(crop) satisfy demand for individual crops
TOTAL_CEREAL_DEMAND_CONSTRAINT satisfy demand for combined cereals
...
...
@@ -192,8 +179,8 @@ $gdxin
PASTURE_LAND_COVER_CALC(location) pasture area (land cover) equals pasture area (land use)
MINIMUM_LAND_COVER_CONSTRAINT(location) constraint on land cover conversion
LAND_COVER_CHANGE_CALC(land_cover, location)
LAND_COVER_CHANGE_CONSTRAINT(land_cover, location)
LAND_COVER_SELF_CHANGE_CONSTRAINT(land_cover, location)
LAND_COVER_CHANGE_CONSTRAINT(land_cover, location)
can't convert more land than was previously available
LAND_COVER_SELF_CHANGE_CONSTRAINT(land_cover, location)
calculate no change area (e.g. cropland to cropland)
WOOD_HARVEST_CALC(location) calc wood harvested
CARBON_FLUX_CALC(location) calc carbon flux
COST_EQ total cost objective function;
...
...
@@ -254,14 +241,19 @@ $gdxin
PASTURE_LAND_COVER_CALC(location) .. landCoverArea('pasture', location) =E= cropArea('pasture', location);
MINIMUM_LAND_COVER_CONSTRAINT(location, land_cover) .. landCoverArea(land_cover, location)
)
=G= minimumLandCover(land_cover
_after
, location);
MINIMUM_LAND_COVER_CONSTRAINT(location, land_cover) .. landCoverArea(land_cover, location) =G= minimumLandCover(land_cover, location);
LAND_COVER_CHANGE_CALC(land_cover, location) .. landCoverArea(land_cover, location) =E= previousLandCoverArea(land_cover, location) +
sum(land_cover_before, landCoverChange(land_cover_before, land_cover, location)) - sum(land_cover_after, landCoverChange(land_cover, land_cover_after, location));
* LAND_COVER_CHANGE_CALC(land_cover, location) .. landCoverArea(land_cover, location) =E= sum(land_cover_before, landCoverChange(land_cover_before, land_cover, location)) -
* sum(land_cover_after, landCoverChange(land_cover, land_cover_after, location));
LAND_COVER_CHANGE_CONSTRAINT(land_cover, location) .. sum(land_cover_after, landCoverChange(land_cover, land_cover_after, location)) =L= previousLandCoverArea(land_cover, location);
LAND_COVER_SELF_CHANGE_CONSTRAINT(land_cover, location) .. landCoverChange(land_cover, land_cover, location) =E=
0
;
LAND_COVER_SELF_CHANGE_CONSTRAINT(land_cover, location) .. landCoverChange(land_cover, land_cover, location) =E=
previousLandCoverArea(land_cover, location) - sum(land_cover_after$[not sameAs(land_cover, land_cover_after)], landCoverChange(land_cover, land_cover_after, location))
;
WOOD_HARVEST_CALC(location) .. woodHarvest(location) =E= sum((land_cover_before, land_cover_after), landCoverChange(land_cover_before, land_cover_after, location) * woodYield(land_cover_before, land_cover_after, location));
...
...
@@ -341,4 +333,3 @@ $gdxin
Scalar ms 'model status', ss 'solve status';
ms=LAND_USE.modelstat;
ss=LAND_USE.solvestat;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment