Skip to content
Snippets Groups Projects
Commit 414b97fd authored by Bart Arendarczyk's avatar Bart Arendarczyk
Browse files

Transport parameters now gradually adjusted after calibration.

parent 37773d29
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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