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

Seems to be working a bit better...

parent 0689de39
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ $gdxin
fertI.L(crop, location) = 0.5;
irrigI.L(crop, location) = 0.5;
otherIntensity.L(crop, location) = 0.5;
otherIntensity.L(crop, location) = 1.0;
area.L(crop, location) = previousArea(crop, location)
EQUATIONS
......@@ -82,8 +82,8 @@ $gdxin
ENERGY_EQ total energy objective function;
UNIT_ENERGY_EQ(crop, location) .. unitEnergy(crop, location) =E= fertI(crop, location) +
irrigI(crop, location)*irrigCost(location) +
power((1+otherIntensity(crop, location)), 2);
(1+irrigI(crop, location)*irrigCost(location) ** 1.3) +
(1+otherIntensity(crop, location) ** 2);
YIELD_EQ(crop, location) .. yield(crop, location) =E= (
yieldNone(crop, location) +
......
......@@ -45,7 +45,7 @@ public class DemandManager {
double thisFudgeFactorShouldBeSomewhereElse;
if (dc.getCropType().equals(CropType.MEAT_OR_PASTURE))
d *= 0.1;
d *= 0.9;
demandMap.put(dc.getCropType(), d);
}
......
......@@ -51,9 +51,10 @@ public class AreasItem implements RasterItem {
public CropToDouble getCropChanges(AreasItem prevAreaAggItem) {
CropToDouble changes = new CropToDouble();
for (Entry<CropType, Double> entry : cropAreas.entrySet()) {
double change = entry.getValue() - prevAreaAggItem.getCropArea(entry.getKey());
changes.put(entry.getKey(), change);
for (Entry<CropType, Double> entry : prevAreaAggItem.cropAreas.entrySet()) {
CropType crop = entry.getKey();
double change = getCropArea(crop) - entry.getValue();
changes.put(crop, change);
}
return changes;
......
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