diff --git a/src/ac/ed/lurg/country/GlobalPrice.java.orig b/src/ac/ed/lurg/country/GlobalPrice.java.orig deleted file mode 100644 index 3a8658376d00efc04363c6f2e5a05ff8f67557da..0000000000000000000000000000000000000000 --- a/src/ac/ed/lurg/country/GlobalPrice.java.orig +++ /dev/null @@ -1,58 +0,0 @@ -package ac.ed.lurg.country; - -import ac.ed.lurg.ModelConfig; - -public class GlobalPrice { - double exportPrice; - double importAmount; - double exportAmount; - - public GlobalPrice(double exportPrice, double importAmount, double exportAmount) { - this.exportPrice = exportPrice; - this.importAmount = importAmount; - this.exportAmount = exportAmount; - } - - public static GlobalPrice createInitial(double exportPrice) { - return new GlobalPrice(exportPrice, Double.NaN, Double.NaN); - } - - public double getExportPrice() { - return exportPrice; - } - - public double getCountryImportPrice(double countryTradeBarrier) { - double importPrice = exportPrice * (1.0 + countryTradeBarrier*ModelConfig.TRADE_BARRIER_ADJ) / (1.0 - ModelConfig.TRANSPORT_LOSSES); - return importPrice; - } - - public double getImportAmount() { - return importAmount; - } - - public double getExportAmount() { - return exportAmount; - } - - public GlobalPrice createWithUpdatedMarketPrices(double imports, double exports, boolean adjustPrice) { - if (imports > 0 || exports > 0) { - double ratio; - - if (imports > exports) - ratio = (imports-exports)/imports; - else - ratio = (imports-exports)/exports; - - double adjustment = adjustPrice ? Math.exp(ratio * ModelConfig.MARKET_LAMBA) : 1.0; - return new GlobalPrice(exportPrice * adjustment, imports, exports); - } - else { - return this; - } - } - - @Override - public String toString() { - return String.format("export=%.3f", exportPrice); - } -}