From d1e15fd1b46fb4140fefc9648b285875dce34956 Mon Sep 17 00:00:00 2001
From: Peter Alexander <p.m.w.alexander@gmail.com>
Date: Tue, 29 Aug 2017 15:45:48 +0100
Subject: [PATCH] Correct rounding of irrigation cost to GAMS

---
 src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java b/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java
index cbfa7486..5c426fb3 100644
--- a/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java
+++ b/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java
@@ -165,8 +165,8 @@ public class GamsLocationOptimiser {
 			IrrigationItem irrigCostItem = entry.getValue();
 			double irrigCost = irrigCostItem.getIrrigCost();
 			double irrigConstraint = irrigCostItem.getIrrigConstraint();
-			if (DEBUG) LogWriter.println(String.format("  %d  \t %.3f,\t %.1f", locationId, irrigCost, irrigConstraint));
-			setGamsParamValue(irrigCostP.addRecord(Integer.toString(locationId)), irrigCost, 4);
+			if (DEBUG) LogWriter.println(String.format("  %d  \t %.5f,\t %.1f", locationId, irrigCost, irrigConstraint));
+			setGamsParamValue(irrigCostP.addRecord(Integer.toString(locationId)), irrigCost, 5);
 			setGamsParamValue(irrigConstraintP.addRecord(Integer.toString(locationId)), irrigConstraint, 3);
 		}
 
-- 
GitLab