Examples of PlanningEntitySorter


Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

        initSelectedPlanningEntityList(phaseScope);
    }

    private void validate() {
        if (selectionOrder == PlanningEntitySelectionOrder.DECREASING_DIFFICULTY) {
            PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
            if (!planningEntitySorter.isSortDifficultySupported()) {
                throw new IllegalStateException("The selectionOrder (" + selectionOrder
                        + ") can not be used on a PlanningEntity ("
                        + planningEntityDescriptor.getPlanningEntityClass().getName()
                        + ") that has no support for difficulty sorting. Check the @PlanningEntity annotation.");
            }
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

                break;
            case RANDOM:
                Collections.shuffle(workingPlanningEntityList, phaseScope.getWorkingRandom());
                break;
            case DECREASING_DIFFICULTY:
                PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
                planningEntitySorter.sortDifficultyDescending(
                        phaseScope.getWorkingSolution(), workingPlanningEntityList);
                break;
            default:
                throw new IllegalStateException("The selectionOrder (" + selectionOrder + ") is not implemented");
        }
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

        initSelectedPlanningEntityList(solverPhaseScope);
    }

    private void validateConfiguration() {
        if (selectionOrder == PlanningEntitySelectionOrder.DECREASING_DIFFICULTY) {
            PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
            if (!planningEntitySorter.isSortDifficultySupported()) {
                throw new IllegalStateException("The selectionOrder (" + selectionOrder
                        + ") can not be used on a PlanningEntity ("
                        + planningEntityDescriptor.getPlanningEntityClass().getName()
                        + ") that has no support for difficulty sorting. Check the @PlanningEntity annotation.");
            }
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

                break;
            case RANDOM:
                Collections.shuffle(workingPlanningEntityList, solverPhaseScope.getWorkingRandom());
                break;
            case DECREASING_DIFFICULTY:
                PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
                planningEntitySorter.sortDifficultyDescending(
                        solverPhaseScope.getWorkingSolution(), workingPlanningEntityList);
                break;
            default:
                throw new IllegalStateException("The selectionOrder (" + selectionOrder + ") is not implemented");
        }
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

        initSelectedPlanningEntityList(solverPhaseScope);
    }

    private void validateConfiguration() {
        if (selectionOrder == PlanningEntitySelectionOrder.DECREASING_DIFFICULTY) {
            PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
            if (!planningEntitySorter.isSortDifficultySupported()) {
                throw new IllegalStateException("The selectionOrder (" + selectionOrder
                        + ") can not be used on a PlanningEntity ("
                        + planningEntityDescriptor.getPlanningEntityClass().getName()
                        + ") that has no support for difficulty sorting. Check the @PlanningEntity annotation.");
            }
View Full Code Here

Examples of org.drools.planner.core.domain.entity.PlanningEntitySorter

                break;
            case RANDOM:
                Collections.shuffle(workingPlanningEntityList, solverPhaseScope.getWorkingRandom());
                break;
            case DECREASING_DIFFICULTY:
                PlanningEntitySorter planningEntitySorter = planningEntityDescriptor.getPlanningEntitySorter();
                planningEntitySorter.sortDifficultyDescending(
                        solverPhaseScope.getWorkingSolution(), workingPlanningEntityList);
                break;
            default:
                throw new IllegalStateException("The selectionOrder (" + selectionOrder + ") is not implemented");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.