Package org.drools.planner.core.score.calculator

Examples of org.drools.planner.core.score.calculator.DefaultHardAndSoftConstraintScoreCalculator


                case SIMPLE:
                    return new SimpleScoreCalculator();
                case SIMPLE_DOUBLE:
                    return new SimpleDoubleScoreCalculator();
                case HARD_AND_SOFT:
                    return new DefaultHardAndSoftConstraintScoreCalculator();
                default:
                    throw new IllegalStateException("The scoreDefinitionType (" + scoreDefinitionType
                            + ") is not implemented");
            }
        } else {
View Full Code Here


        if (scoreDefinitionType != null) {
            switch (scoreDefinitionType) {
                case SIMPLE:
                    return new SimpleScoreCalculator();
                case HARD_AND_SOFT:
                    return new DefaultHardAndSoftConstraintScoreCalculator();
                default:
                    throw new IllegalStateException("The scoreDefinitionType (" + scoreDefinitionType
                            + ") is not implemented");
            }
        } else {
View Full Code Here

    @Test
    public void moveRoom() {
        LocalSearchSolverScope localSearchSolverScope = new LocalSearchSolverScope();
        localSearchSolverScope.setRuleBase(buildRuleBase());
        localSearchSolverScope.setWorkingScoreCalculator(new DefaultHardAndSoftConstraintScoreCalculator());
        Examination examination = (Examination) new ExaminationDaoImpl().readSolution(getClass().getResourceAsStream(
                "/org/drools/planner/examples/examination/data/testExaminationScoreRules.xml"));
        localSearchSolverScope.setWorkingSolution(examination);
        WorkingMemory workingMemory = localSearchSolverScope.getWorkingMemory();
View Full Code Here

    @Test
    public void switchEmployeeAndUndo() {
        LocalSearchSolverScope localSearchSolverScope = new LocalSearchSolverScope();
        localSearchSolverScope.setRuleBase(buildRuleBase());
        localSearchSolverScope.setWorkingScoreCalculator(new DefaultHardAndSoftConstraintScoreCalculator());
        NurseRoster nurseRoster = (NurseRoster) new NurseRosteringDaoImpl().readSolution(getClass().getResourceAsStream(
                "/org/drools/planner/examples/nurserostering/data/testNurseRosteringScoreRules.xml"));
        localSearchSolverScope.setWorkingSolution(nurseRoster);
        WorkingMemory workingMemory = localSearchSolverScope.getWorkingMemory();
View Full Code Here

            return null;
        }
    }

    public ScoreCalculator buildScoreCalculator() {
        return new DefaultHardAndSoftConstraintScoreCalculator();
    }
View Full Code Here

TOP

Related Classes of org.drools.planner.core.score.calculator.DefaultHardAndSoftConstraintScoreCalculator

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.