Package org.drools.planner.examples.examination.domain

Examples of org.drools.planner.examples.examination.domain.InstitutionParametrization


            }
            return Integer.parseInt(line.substring(header.length() + 2, line.length() - 1));
        }

        private void readInstitutionalWeighting(Examination examination) throws IOException {
            InstitutionParametrization institutionParametrization = new InstitutionParametrization();
            institutionParametrization.setId(0L);
            String[] lineTokens;
            lineTokens = readInstitutionalWeightingProperty("TWOINAROW", 2);
            institutionParametrization.setTwoInARowPenalty(Integer.parseInt(lineTokens[1]));
            lineTokens = readInstitutionalWeightingProperty("TWOINADAY", 2);
            institutionParametrization.setTwoInADayPenalty(Integer.parseInt(lineTokens[1]));
            lineTokens = readInstitutionalWeightingProperty("PERIODSPREAD", 2);
            institutionParametrization.setPeriodSpreadLength(Integer.parseInt(lineTokens[1]));
            institutionParametrization.setPeriodSpreadPenalty(1); // constant
            lineTokens = readInstitutionalWeightingProperty("NONMIXEDDURATIONS", 2);
            institutionParametrization.setMixedDurationPenalty(Integer.parseInt(lineTokens[1]));
            lineTokens = readInstitutionalWeightingProperty("FRONTLOAD", 4);
            institutionParametrization.setFrontLoadLargeTopicSize(Integer.parseInt(lineTokens[1]));
            institutionParametrization.setFrontLoadLastPeriodSize(Integer.parseInt(lineTokens[2]));
            institutionParametrization.setFrontLoadPenalty(Integer.parseInt(lineTokens[3]));
            examination.setInstitutionParametrization(institutionParametrization);
        }
View Full Code Here

TOP

Related Classes of org.drools.planner.examples.examination.domain.InstitutionParametrization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.