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
b904db23
Commit
b904db23
authored
6 years ago
by
Peter Alexander
Browse files
Options
Downloads
Patches
Plain Diff
Hold cereal fraction constant during calibration
parent
3c542c57
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debug_config.properties
+7
-4
7 additions, 4 deletions
debug_config.properties
src/ac/ed/lurg/country/CountryAgent.java
+1
-1
1 addition, 1 deletion
src/ac/ed/lurg/country/CountryAgent.java
with
8 additions
and
5 deletions
debug_config.properties
+
7
−
4
View file @
b904db23
BASE_DIR
=
.
BASE_DIR
=
.
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.2_rcp45_ipsl_lessIO_forED
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.2_rcp45_ipsl_lessIO_forED
YIELD_DIR
=
/Users/peteralexander/Documents/LURG/LPJ/runs_20170925/LPJG_PLUM_expt1.2_rcp26_ipsl_irrV7104_b20170728_bothDS_irrWaits_forED_20170925154752
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/runs_20170925/LPJG_PLUM_expt1.2_rcp26_ipsl_irrV7104_b20170728_bothDS_irrWaits_forED_20170925154752
YIELD_DIR
=
/Users/peteralexander/Documents/LURG/LPJ/LPJGPLUM_expt1.1_2006-2100_PLUM6xtra_20180412171654/rcp60
# Properties for testing
# Properties for testing
#CHANGE_YIELD_DATA_YEAR=true
#CHANGE_YIELD_DATA_YEAR=true
#CHANGE_DEMAND_YEAR=false
#CHANGE_DEMAND_YEAR=false
DEBUG_LIMIT_COUNTRIES
=
tru
e
DEBUG_LIMIT_COUNTRIES
=
fals
e
DEBUG_COUNTRY_NAME
=
China
DEBUG_COUNTRY_NAME
=
China
#MAX_IMPORT_CHANGE=0.0
#MAX_IMPORT_CHANGE=0.0
#MARKET_ADJ_PRICE=false
#MARKET_ADJ_PRICE=false
...
@@ -15,7 +16,8 @@ DEBUG_JUST_DEMAND_OUTPUT=false
...
@@ -15,7 +16,8 @@ DEBUG_JUST_DEMAND_OUTPUT=false
SSP_SCENARIO
=
SSP2_v9_130325
SSP_SCENARIO
=
SSP2_v9_130325
IS_CALIBRATION_RUN
=
false
IS_CALIBRATION_RUN
=
true
GENERATE_NEW_YIELD_CLUSTERS
=
false
LIMIT_CEREAL_FRACTION
=
true
LIMIT_CEREAL_FRACTION
=
true
...
@@ -26,7 +28,8 @@ ENABLE_GEN2_BIOENERGY=true
...
@@ -26,7 +28,8 @@ ENABLE_GEN2_BIOENERGY=true
#TRADE_BARRIER_FACTOR_DEFAULT=0.3
#TRADE_BARRIER_FACTOR_DEFAULT=0.3
#NUM_YIELD_CLUSTERS=100
#NUM_YIELD_CLUSTERS=100
END_TIMESTEP
=
2
END_TIMESTEP
=
4
TIMESTEP_SIZE
=
1
TIMESTEP_SIZE
=
1
INTERPOLATE_OUTPUT_YEARS
=
false
INTERPOLATE_OUTPUT_YEARS
=
false
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/ac/ed/lurg/country/CountryAgent.java
+
1
−
1
View file @
b904db23
...
@@ -184,7 +184,7 @@ public class CountryAgent {
...
@@ -184,7 +184,7 @@ public class CountryAgent {
private
Map
<
CropType
,
Double
>
getMinCerealFraction
(
Timestep
timestep
)
{
private
Map
<
CropType
,
Double
>
getMinCerealFraction
(
Timestep
timestep
)
{
Map
<
CropType
,
Double
>
minCerealFraction
=
new
HashMap
<
CropType
,
Double
>();
Map
<
CropType
,
Double
>
minCerealFraction
=
new
HashMap
<
CropType
,
Double
>();
int
yearsOfChange
=
(
timestep
.
getTimestep
()
-
ModelConfig
.
TECHNOLOGY_CHANGE_START_STEP
)
*
ModelConfig
.
TIMESTEP_SIZE
;
int
yearsOfChange
=
ModelConfig
.
IS_CALIBRATION_RUN
?
0
:
(
timestep
.
getTimestep
()
-
ModelConfig
.
TECHNOLOGY_CHANGE_START_STEP
)
*
ModelConfig
.
TIMESTEP_SIZE
;
for
(
Map
.
Entry
<
CropType
,
Double
>
entry
:
demandManager
.
getBaseCerealFraction
(
country
).
entrySet
())
{
for
(
Map
.
Entry
<
CropType
,
Double
>
entry
:
demandManager
.
getBaseCerealFraction
(
country
).
entrySet
())
{
minCerealFraction
.
put
(
entry
.
getKey
(),
entry
.
getValue
()
*
Math
.
max
(
ModelConfig
.
TOTAL_MAX_CEREAL_CHANGE
,
(
1
-
ModelConfig
.
ANNUAL_MAX_CEREAL_CHANGE
*
yearsOfChange
)));
minCerealFraction
.
put
(
entry
.
getKey
(),
entry
.
getValue
()
*
Math
.
max
(
ModelConfig
.
TOTAL_MAX_CEREAL_CHANGE
,
(
1
-
ModelConfig
.
ANNUAL_MAX_CEREAL_CHANGE
*
yearsOfChange
)));
...
...
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