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
b2a274e9
Commit
b2a274e9
authored
2 years ago
by
Bart Arendarczyk
Browse files
Options
Downloads
Patches
Plain Diff
Option to disable imports update for CRAFTY agents.
parent
fbffa545
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
src/ac/ed/lurg/ModelConfig.java
+1
-0
1 addition, 0 deletions
src/ac/ed/lurg/ModelConfig.java
src/ac/ed/lurg/country/crafty/CraftyCountryAgent.java
+3
-1
3 additions, 1 deletion
src/ac/ed/lurg/country/crafty/CraftyCountryAgent.java
with
4 additions
and
1 deletion
src/ac/ed/lurg/ModelConfig.java
+
1
−
0
View file @
b2a274e9
...
...
@@ -409,6 +409,7 @@ public class ModelConfig {
public
static
final
boolean
USE_CRAFTY_COUNTRIES
=
getBooleanProperty
(
"USE_CRAFTY_COUNTRIES"
,
false
);
public
static
final
String
CRAFTY_COUNTRIES_FILE
=
getProperty
(
"CRAFTY_COUNTRIES_FILE"
,
DATA_DIR
+
File
.
separator
+
"craftyCountries.csv"
);
public
static
final
String
CRAFTY_PRODUCTION_DIR
=
getProperty
(
"CRAFTY_PRODUCTION_DIR"
,
OUTPUT_DIR
+
File
.
separator
+
"crafty"
);
public
static
final
boolean
ENABLE_CRAFTY_IMPORTS_UPDATE
=
getBooleanProperty
(
"ENABLE_CRAFTY_IMPORTS_UPDATE"
,
true
);
public
static
final
boolean
EXTRAPOLATE_YIELD_FERT_RESPONSE
=
getBooleanProperty
(
"EXTRAPOLATE_YIELD_FERT_RESPONSE"
,
false
);
...
...
This diff is collapsed.
Click to expand it.
src/ac/ed/lurg/country/crafty/CraftyCountryAgent.java
+
3
−
1
View file @
b2a274e9
...
...
@@ -2,6 +2,7 @@ package ac.ed.lurg.country.crafty;
import
java.util.Map
;
import
ac.ed.lurg.ModelConfig
;
import
ac.ed.lurg.country.AbstractCountryAgent
;
import
ac.ed.lurg.country.CompositeCountry
;
import
ac.ed.lurg.country.CountryPrice
;
...
...
@@ -30,7 +31,8 @@ public class CraftyCountryAgent extends AbstractCountryAgent {
public
void
updateProduction
(
Map
<
CropType
,
CropUsageData
>
cropUsageMap
,
Map
<
CropType
,
GlobalPrice
>
worldPrices
)
{
this
.
cropUsageData
=
cropUsageMap
;
calculateCountryPricesAndDemand
(
worldPrices
,
false
);
updateNetImportsFromProdAndDemand
(
currentProjectedDemand
,
currentDemandFract
,
cropUsageMap
);
if
(
ModelConfig
.
ENABLE_CRAFTY_IMPORTS_UPDATE
)
updateNetImportsFromProdAndDemand
(
currentProjectedDemand
,
currentDemandFract
,
cropUsageMap
);
}
@Override
...
...
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