Skip to content
Snippets Groups Projects
Commit d1e15fd1 authored by Peter Alexander's avatar Peter Alexander
Browse files

Correct rounding of irrigation cost to GAMS

parent 4176dcbe
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
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