diff --git a/MODFIRE-Prototype/out/production/MODFIRE-Prototype/GetInput.class b/MODFIRE-Prototype/out/production/MODFIRE-Prototype/GetInput.class index ba6153d..a5b567f 100644 Binary files a/MODFIRE-Prototype/out/production/MODFIRE-Prototype/GetInput.class and b/MODFIRE-Prototype/out/production/MODFIRE-Prototype/GetInput.class differ diff --git a/MODFIRE-Prototype/src/GetInput.java b/MODFIRE-Prototype/src/GetInput.java index 8fe7286..a650ebd 100644 --- a/MODFIRE-Prototype/src/GetInput.java +++ b/MODFIRE-Prototype/src/GetInput.java @@ -7,7 +7,7 @@ import java.io.*; import java.util.Scanner; public class GetInput { - public static void giveDomains (Model model, IntVar[] ugs, String dir, IntVar[] woodYield, int ugLimit){ + public static void giveDomains (Model model, IntVar[] ugs, String dir, IntVar[] woodYield, UG[] nodes){ int index = 0; try { File allUg = new File(dir + "/ugs_init.txt"); @@ -21,7 +21,7 @@ public class GetInput { String dataWood = myReaderWood.nextLine(); - if(index <= ugLimit) { + if(nodes[index].valid) { String[] str_split = dataUg.split(",", 0); String[] str_split_wood = dataWood.split(",", 0); @@ -87,7 +87,7 @@ public class GetInput { - giveDomains(m, ugs, fileDirectory, woodYield, ugLimit); // reads the ugs_init file and initializes each variable with its possible prescription values as domain + giveDomains(m, ugs, fileDirectory, woodYield, nodes); // reads the ugs_init file and initializes each variable with its possible prescription values as domain System.out.println("running"); @@ -115,13 +115,14 @@ public class GetInput { for(int i = 0; i < nodes.length; i++){ if(nodes[i].valid) { - IntVar prescIndex = m.intVar(0, 62); + IntVar prescIndex = m.intVar(0, 255); m.element(ugs[i], nodes[i].presc, prescIndex).post(); m.element(woodYield[i], nodes[i].wood_total, prescIndex).post(); } else{ + //System.out.println("UG_"+i + " "+woodYield[i]); m.arithm(woodYield[i], "=", 0).post(); } } -- libgit2 0.21.2