public WCConservation(int forestPatchSize) {
        comparator = new PatchLumberComparator();
        habitatCandidates = new PriorityQueue<>(forestPatchSize, comparator);
        habitatZone = new PriorityQueue<>(forestPatchSize, comparator);
        cutCandidates = new PriorityQueue<>(forestPatchSize, comparator);
        candidateMap = new HashMap<>();
        habitatMap = new HashMap<>();
        selectFreq = new HashMap<>();
        
        neosClient = new NeosClient(Calculation.NEOS_HOST, Calculation.NEOS_PORT);
        
        modelTemplate = new StringBuilder();
        modelTemplateS1 = new StringBuilder();
        modelTemplateS4 = new StringBuilder();
        modelTemplateS5 = new StringBuilder();
        modelTemplateS6 = new StringBuilder();
        
        distTemplate = new StringBuilder();
        
        Scanner scanner; 
        try {
            scanner = new Scanner(new FileInputStream(Calculation.inputTemplatePath),
                    "US-ASCII");
            while (scanner.hasNextLine()) {
                modelTemplate.append(scanner.nextLine()).append("\n");
            }
            
            scanner = new Scanner(new FileInputStream(Calculation.inputTemplatePathS1),
                    "US-ASCII");
            while (scanner.hasNextLine()) {
                modelTemplateS1.append(scanner.nextLine()).append("\n");
            }
                
            scanner = new Scanner(new FileInputStream(Calculation.inputTemplatePathS4), "US-ASCII");
            while(scanner.hasNextLine())
                modelTemplateS4.append(scanner.nextLine()).append("\n");
            
            scanner = new Scanner(new FileInputStream(Calculation.inputTemplatePathS5), "US-ASCII");
            while(scanner.hasNextLine())
                modelTemplateS5.append(scanner.nextLine()).append("\n");
            
            scanner = new Scanner(new FileInputStream(Calculation.inputTemplatePathS6), "US-ASCII");
            while(scanner.hasNextLine())
                modelTemplateS6.append(scanner.nextLine()).append("\n");
            
            scanner = new Scanner(new FileInputStream(Calculation.inputDistPath), "US-ASCII");
            while(scanner.hasNextLine())
                distTemplate.append(scanner.nextLine()).append("\n");
        } catch (FileNotFoundException ex) {
            //Logger.getLogger(WCConservation.class.getName()).log(Level.SEVERE, null, ex);
            System.err.println("FATAL: Failed to read in model file.");
            System.exit(-1);
        }
            
        
        //candidateTree = new RTree(4, 8);

        /*
        String pathEnv = System.getenv("PATH");
        hasGams = pathEnv.contains("GAMS");
        if (hasGams == false) {
            hasGams = pathEnv.contains("gams");
        }
        */
    }