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
a87ebd53
Commit
a87ebd53
authored
7 years ago
by
Peter Alexander
Browse files
Options
Downloads
Patches
Plain Diff
Stop increasing animal product demand for seed use
parent
3162fa53
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ac/ed/lurg/ModelConfig.java
+1
-1
1 addition, 1 deletion
src/ac/ed/lurg/ModelConfig.java
src/ac/ed/lurg/demand/DemandManager.java
+1
-1
1 addition, 1 deletion
src/ac/ed/lurg/demand/DemandManager.java
src/ac/ed/lurg/types/CommodityType.java
+7
-0
7 additions, 0 deletions
src/ac/ed/lurg/types/CommodityType.java
with
9 additions
and
2 deletions
src/ac/ed/lurg/ModelConfig.java
+
1
−
1
View file @
a87ebd53
...
@@ -201,7 +201,7 @@ public class ModelConfig {
...
@@ -201,7 +201,7 @@ public class ModelConfig {
public
static
final
double
AGRI_EXPANSION_COST_BASE
=
getDoubleProperty
(
"AGRI_EXPANSION_COST_BASE"
,
0.05
*
LAND_CHANGE_COST
*
AGRI_LAND_EXPANSION_COST_FACTOR
);
public
static
final
double
AGRI_EXPANSION_COST_BASE
=
getDoubleProperty
(
"AGRI_EXPANSION_COST_BASE"
,
0.05
*
LAND_CHANGE_COST
*
AGRI_LAND_EXPANSION_COST_FACTOR
);
public
static
final
double
AGRI_EXPANSION_COST_BASE_MANAGED_FOREST
=
getDoubleProperty
(
"AGRI_EXPANSION_COST_BASE_MANAGED_FOREST"
,
0.3
*
LAND_CHANGE_COST
*
AGRI_LAND_EXPANSION_COST_FACTOR
);
public
static
final
double
AGRI_EXPANSION_COST_BASE_MANAGED_FOREST
=
getDoubleProperty
(
"AGRI_EXPANSION_COST_BASE_MANAGED_FOREST"
,
0.3
*
LAND_CHANGE_COST
*
AGRI_LAND_EXPANSION_COST_FACTOR
);
public
static
final
double
SEED_AND_WASTE_FRACTION
=
getDoubleProperty
(
"SEED_AND_WASTE_FRACTION"
,
0.1
5
);
public
static
final
double
SEED_AND_WASTE_FRACTION
=
getDoubleProperty
(
"SEED_AND_WASTE_FRACTION"
,
0.1
);
public
static
final
double
TECHNOLOGY_CHANGE_ANNUAL_RATE
=
IS_CALIBRATION_RUN
?
0.0
:
getDoubleProperty
(
"TECHNOLOGY_CHANGE_ANNUAL_RATE"
,
0.0
);
public
static
final
double
TECHNOLOGY_CHANGE_ANNUAL_RATE
=
IS_CALIBRATION_RUN
?
0.0
:
getDoubleProperty
(
"TECHNOLOGY_CHANGE_ANNUAL_RATE"
,
0.0
);
public
static
final
int
TECHNOLOGY_CHANGE_START_STEP
=
getIntProperty
(
"TECHNOLOGY_CHANGE_START_STEP"
,
0
);
public
static
final
int
TECHNOLOGY_CHANGE_START_STEP
=
getIntProperty
(
"TECHNOLOGY_CHANGE_START_STEP"
,
0
);
...
...
This diff is collapsed.
Click to expand it.
src/ac/ed/lurg/demand/DemandManager.java
+
1
−
1
View file @
a87ebd53
...
@@ -59,7 +59,7 @@ public class DemandManager {
...
@@ -59,7 +59,7 @@ public class DemandManager {
double
bioenergy
=
bioenergyDemandManager
.
getFirstGenBioenergyDemand
(
c
,
year
,
commodity
);
double
bioenergy
=
bioenergyDemandManager
.
getFirstGenBioenergyDemand
(
c
,
year
,
commodity
);
// LogWriter.println(String.format("Country %s comm %s: %f", country, commodity, bioenergy));
// LogWriter.println(String.format("Country %s comm %s: %f", country, commodity, bioenergy));
double
newDemand
=
(
d
+
bioenergy
)
*
(
1.0
+
ModelConfig
.
SEED_AND_WASTE_FRACTION
);
double
newDemand
=
(
d
+
bioenergy
)
*
(
1.0
+
commodity
.
getSeedWasteRate
()
);
Double
prevDemand
=
demandMap
.
get
(
commodity
);
Double
prevDemand
=
demandMap
.
get
(
commodity
);
if
(
prevDemand
!=
null
)
if
(
prevDemand
!=
null
)
...
...
This diff is collapsed.
Click to expand it.
src/ac/ed/lurg/types/CommodityType.java
+
7
−
0
View file @
a87ebd53
...
@@ -4,6 +4,8 @@ import java.util.Collection;
...
@@ -4,6 +4,8 @@ import java.util.Collection;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
ac.ed.lurg.ModelConfig
;
public
enum
CommodityType
{
public
enum
CommodityType
{
CEREALS
(
"Cereals"
,
"cereals"
,
false
),
CEREALS
(
"Cereals"
,
"cereals"
,
false
),
...
@@ -54,4 +56,9 @@ public enum CommodityType {
...
@@ -54,4 +56,9 @@ public enum CommodityType {
public
boolean
isAnimalProduct
()
{
public
boolean
isAnimalProduct
()
{
return
isAnimalProduct
;
return
isAnimalProduct
;
}
}
public
double
getSeedWasteRate
()
{
// just waste rate for animal products
return
isAnimalProduct
?
ModelConfig
.
SEED_AND_WASTE_FRACTION
/
2
:
ModelConfig
.
SEED_AND_WASTE_FRACTION
;
}
}
}
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