Skip to content
Snippets Groups Projects
Commit a87ebd53 authored by Peter Alexander's avatar Peter Alexander
Browse files

Stop increasing animal product demand for seed use

parent 3162fa53
No related branches found
No related tags found
No related merge requests found
...@@ -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.15); 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);
......
...@@ -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)
......
...@@ -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;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment