From 414b97fd51619b7c59089158151883433ee04989 Mon Sep 17 00:00:00 2001
From: Bart Arendarczyk <s1924442@ed.ac.uk>
Date: Fri, 19 May 2023 12:23:06 +0100
Subject: [PATCH] Transport parameters now gradually adjusted after
 calibration.

---
 src/ac/ed/lurg/country/GlobalPrice.java | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/ac/ed/lurg/country/GlobalPrice.java b/src/ac/ed/lurg/country/GlobalPrice.java
index 5cc0ea55..278e3bc6 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)
-- 
GitLab