diff --git a/src/ac/ed/lurg/country/GlobalPrice.java b/src/ac/ed/lurg/country/GlobalPrice.java index 5cc0ea55822d922845d402074aacdfcebb91ec5c..278e3bc618a396c6f6352e5f5a5ac847c73cd4a3 100644 --- a/src/ac/ed/lurg/country/GlobalPrice.java +++ b/src/ac/ed/lurg/country/GlobalPrice.java @@ -53,12 +53,10 @@ public class GlobalPrice implements Serializable { public double getCountryImportPrice(double countryTradeBarrier) { int currentYear = timestep.getYear(); - double tradeBarrierMultiplier = ModelConfig.updateParameterForShocks(currentYear, "TRADE_BARRIER_MULTIPLIER"); - double transportLossesRate =ModelConfig.updateParameterForShocks(currentYear, "TRANSPORT_LOSSES"); - double transportCosts = ModelConfig.updateParameterForShocks(currentYear, "TRANSPORT_COST"); + double tradeBarrierMultiplier = ModelConfig.getAdjParam("TRADE_BARRIER_MULTIPLIER"); + double transportLossesRate =ModelConfig.getAdjParam("TRANSPORT_LOSSES"); + double transportCosts = ModelConfig.getAdjParam("TRANSPORT_COST"); - //transportCosts = timestep.getYear() >= 2023 ? transportCosts * 1.5 : transportCosts; - double importPrice = exportPrice * (1 + transportCosts) * (1.0 + countryTradeBarrier*tradeBarrierMultiplier) / (1.0 - transportLossesRate); return importPrice; } @@ -111,7 +109,6 @@ public class GlobalPrice implements Serializable { else if (ModelConfig.PRICE_UPDATE_METHOD.equals("StockFlow")) { // Market lambda lower when the rate of change in stock is decreasing // Acts as a damping mechanism to reduce price fluctuation - double lambda = Math.atan2(Math.abs(stockChange), Math.abs(prevStockChange)) / (0.5 * Math.PI) * marketLambda; // Prices decrease more slowly than they increase (20% slower according to FAO food price index)