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
2bc68eff
Commit
2bc68eff
authored
3 years ago
by
Bart Arendarczyk
Browse files
Options
Downloads
Patches
Plain Diff
Annualised wood harvest.
parent
b23148e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GAMS/IntExtOpt.gms
+14
-28
14 additions, 28 deletions
GAMS/IntExtOpt.gms
src/ac/ed/lurg/forestry/WoodYieldItem.java
+2
-4
2 additions, 4 deletions
src/ac/ed/lurg/forestry/WoodYieldItem.java
with
16 additions
and
32 deletions
GAMS/IntExtOpt.gms
+
14
−
28
View file @
2bc68eff
...
@@ -154,7 +154,7 @@ $gdxin
...
@@ -154,7 +154,7 @@ $gdxin
landCoverArea(land_cover, location) land cover area in Mha
landCoverArea(land_cover, location) land cover area in Mha
landCoverChange(land_cover_before, land_cover_after, location) land cover change in Mha
landCoverChange(land_cover_before, land_cover_after, location) land cover change in Mha
totalConversionCost(location) land cover conversion cost - $1000 per ha
totalConversionCost(location) land cover conversion cost - $1000 per ha
newF
orest
P
ot
ential
Harvest(location)
f
orest
R
ot
a
Harvest(location)
naturalDeforestedArea(location)
naturalDeforestedArea(location)
woodHarvestNat(location)
woodHarvestNat(location)
woodHarvestLuc(location)
woodHarvestLuc(location)
...
@@ -164,7 +164,6 @@ $gdxin
...
@@ -164,7 +164,6 @@ $gdxin
woodSold
woodSold
carbonFlux(location) total carbon flux - Mt C
carbonFlux(location) total carbon flux - Mt C
supply(all_types)
supply(all_types)
npv
* A "artificial variable for debugging https://www.gams.com/blog/2017/07/misbehaving-model-infeasible/"
* A "artificial variable for debugging https://www.gams.com/blog/2017/07/misbehaving-model-infeasible/"
total_cost total cost of domestic supply including net imports;
total_cost total cost of domestic supply including net imports;
...
@@ -202,7 +201,7 @@ $gdxin
...
@@ -202,7 +201,7 @@ $gdxin
LAND_COVER_CHANGE_CONSTRAINT(land_cover, location) conservation of land area
LAND_COVER_CHANGE_CONSTRAINT(land_cover, location) conservation of land area
CONVERSION_COST(location) cost of land cover conversion
CONVERSION_COST(location) cost of land cover conversion
NEW_
FOREST_
P
OT
ENTIAL
_HARVEST(location)
FOREST_
R
OT
A
_HARVEST
_CALC
(location)
WOOD_HARVEST_NATURAL_CALC(location)
WOOD_HARVEST_NATURAL_CALC(location)
WOOD_HARVEST_NATURAL_CONSTRAINT(location)
WOOD_HARVEST_NATURAL_CONSTRAINT(location)
WOOD_HARVEST_LUC_CALC(location)
WOOD_HARVEST_LUC_CALC(location)
...
@@ -214,7 +213,7 @@ $gdxin
...
@@ -214,7 +213,7 @@ $gdxin
CARBON_FLUX_CALC(location) calc carbon flux
CARBON_FLUX_CALC(location) calc carbon flux
NPV
_CALC Net Present Value function;
COST
_CALC Net Present Value function;
**************** Crop cost **************************
**************** Crop cost **************************
...
@@ -279,7 +278,7 @@ $gdxin
...
@@ -279,7 +278,7 @@ $gdxin
************* Forestry ***********************************
************* Forestry ***********************************
NEW_
FOREST_
P
OT
ENTIAL
_HARVEST(location) ..
newF
orest
P
ot
ential
Harvest(location) =E= sum(land_cover, landCoverChange(land_cover, 'timberForest', location) * woodYieldRota(land_cover, 'timberForest', location));
FOREST_
R
OT
A
_HARVEST
_CALC
(location) ..
f
orest
R
ot
a
Harvest(location) =E= sum(land_cover, landCoverChange(land_cover, 'timberForest', location) * woodYieldRota(land_cover, 'timberForest', location))
/ forestRotationPeriod(location)
;
WOOD_HARVEST_NATURAL_CALC(location) .. woodHarvestNat(location) =E= naturalDeforestedArea(location) * woodYieldLuc('natural', 'natural', location);
WOOD_HARVEST_NATURAL_CALC(location) .. woodHarvestNat(location) =E= naturalDeforestedArea(location) * woodYieldLuc('natural', 'natural', location);
...
@@ -287,7 +286,7 @@ $gdxin
...
@@ -287,7 +286,7 @@ $gdxin
WOOD_HARVEST_LUC_CALC(location) .. woodHarvestLuc(location) =E= sum((forested, exc_natural), landCoverChange(forested, exc_natural, location) * woodYieldLuc(forested, exc_natural, location));
WOOD_HARVEST_LUC_CALC(location) .. woodHarvestLuc(location) =E= sum((forested, exc_natural), landCoverChange(forested, exc_natural, location) * woodYieldLuc(forested, exc_natural, location));
WOOD_SUPPLY_CALC .. woodSupply =E=
woodFromRotation + sum
(location
,
woodHarvestNat(location) + woodHarvestLuc(location));
WOOD_SUPPLY_CALC .. woodSupply =E=
sum(location, forestRotaHarvest
(location
) +
woodHarvestNat(location) + woodHarvestLuc(location));
WOOD_MARKET_CONSTRAINT .. woodSold =L= woodDemand + woodExported - woodImported;
WOOD_MARKET_CONSTRAINT .. woodSold =L= woodDemand + woodExported - woodImported;
...
@@ -305,26 +304,13 @@ $gdxin
...
@@ -305,26 +304,13 @@ $gdxin
************ Net Present Value ******************************
************ Net Present Value ******************************
NPV_CALC .. npv =E= {
COST_CALC .. total_cost =E= sum((crop, location), cropArea(crop, location) * unitCost(crop, location) * (1-subsidyRate(crop))) * domesticPriceMarkup +
[
sum(location, totalConversionCost(location)) +
sum(import_crop, exportPrices(import_crop) * supply(import_crop)) +
sum(import_crop, importPrices(import_crop) * importAmount(import_crop)) +
sum(location, landCoverArea('natural', location)) * naturalAreaValue
woodImported * woodImportPrice -
] * exp(-discountRate) -
sum(import_crop, exportPrices(import_crop) * exportAmount(import_crop)) -
sum((crop, location), cropArea(crop, location) * unitCost(crop, location) * (1-subsidyRate(crop)))
(woodExportPrice - vegClearingCost) * woodSold;
} / (1 - exp(-discountRate)) +
sum(location,
[
(woodExportPrice - vegClearingCost) * newForestPotentialHarvest(location) * exp(-discountRate * forestRotationPeriod(location)) -
landCoverArea('timberForest', location) * forestEstablishmentCost
] / (1 - exp(-discountRate * forestRotationPeriod(location)))
) +
(woodExportPrice - vegClearingCost) * woodSold +
sum(location, carbonFlux(location) * carbonPrice) -
sum(import_crop, importPrices(import_crop) * importAmount(import_crop)) -
sum(location, totalConversionCost(location)) -
woodImportPrice * woodImported -
sum(location, woodHarvestLuc(location) * vegClearingCost);
...
@@ -344,8 +330,8 @@ $gdxin
...
@@ -344,8 +330,8 @@ $gdxin
* display landCoverChange.L
* display landCoverChange.L
*
SOLVE LAND_USE USING NLP MINIMIZING total_cost;
SOLVE LAND_USE USING NLP MINIMIZING total_cost;
SOLVE LAND_USE USING NLP MAXIMIZING npv;
*
SOLVE LAND_USE USING NLP MAXIMIZING npv;
display previousCropArea, irrigMaxRate, otherIntensity.L, fertI.L, irrigI.L, cropArea.L;
display previousCropArea, irrigMaxRate, otherIntensity.L, fertI.L, irrigI.L, cropArea.L;
display supply.l, demand, ruminantFeed.l, monogastricFeed.l, exportAmount.l;
display supply.l, demand, ruminantFeed.l, monogastricFeed.l, exportAmount.l;
...
...
This diff is collapsed.
Click to expand it.
src/ac/ed/lurg/forestry/WoodYieldItem.java
+
2
−
4
View file @
2bc68eff
...
@@ -29,10 +29,6 @@ public class WoodYieldItem implements RasterItem {
...
@@ -29,10 +29,6 @@ public class WoodYieldItem implements RasterItem {
LccKey
key
=
entry
.
getKey
();
LccKey
key
=
entry
.
getKey
();
Double
[]
yields
=
entry
.
getValue
();
Double
[]
yields
=
entry
.
getValue
();
if
(!
landUseTiles
.
containsKey
(
key
.
getFromLc
()))
{
int
foo
=
1
;
}
LandCoverTile
tiles
=
landUseTiles
.
get
(
key
.
getFromLc
());
LandCoverTile
tiles
=
landUseTiles
.
get
(
key
.
getFromLc
());
double
totalArea
=
tiles
.
getTotalConvertibleArea
();
// Assuming no harvest from protected areas
double
totalArea
=
tiles
.
getTotalConvertibleArea
();
// Assuming no harvest from protected areas
...
@@ -79,6 +75,7 @@ public class WoodYieldItem implements RasterItem {
...
@@ -79,6 +75,7 @@ public class WoodYieldItem implements RasterItem {
currentRotationHarvest
=
0.0
;
currentRotationHarvest
=
0.0
;
}
else
{
}
else
{
currentRotationHarvest
+=
timberTiles
.
getConvertibleArea
(
optimalRotation
)
*
yieldAtRotation
;
currentRotationHarvest
+=
timberTiles
.
getConvertibleArea
(
optimalRotation
)
*
yieldAtRotation
;
/*
timberTiles.resetAreaForAge(optimalRotation); // WARNING: side effect
timberTiles.resetAreaForAge(optimalRotation); // WARNING: side effect
for (int age=optimalRotation+1; age<=LandCoverTile.getMaxAgeBin(); age++) { // TODO better way of dealing with stands over rotation age?
for (int age=optimalRotation+1; age<=LandCoverTile.getMaxAgeBin(); age++) { // TODO better way of dealing with stands over rotation age?
...
@@ -86,6 +83,7 @@ public class WoodYieldItem implements RasterItem {
...
@@ -86,6 +83,7 @@ public class WoodYieldItem implements RasterItem {
currentRotationHarvest += areaHarvested * yields[age];
currentRotationHarvest += areaHarvested * yields[age];
timberTiles.resetAreaForAge(age, areaHarvested);
timberTiles.resetAreaForAge(age, areaHarvested);
}
}
*/
}
}
}
}
...
...
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