Package org.drools.planner.core.constructionheuristic.scope

Examples of org.drools.planner.core.constructionheuristic.scope.ConstructionHeuristicMoveScope


    }

    public void doPlacement(ConstructionHeuristicStepScope stepScope) {
        // TODO extract to PlacerForager
        Score maxScore = stepScope.getPhaseScope().getScoreDefinition().getPerfectMinimumScore();
        ConstructionHeuristicMoveScope maxMoveScope = null;

        Object entity = stepScope.getEntity();
        int moveIndex = 0;
        for (Object value : valueSelector) {
            ConstructionHeuristicMoveScope moveScope = new ConstructionHeuristicMoveScope(stepScope);
            moveScope.setMoveIndex(moveIndex);
            ChangeMove move = new ChangeMove(entity, variableDescriptor, value);
            moveScope.setMove(move);
            if (!move.isMoveDoable(stepScope.getScoreDirector())) {
                logger.trace("        Ignoring not doable move ({}).", move);
            } else {
                doMove(moveScope);
                // TODO extract to PlacerForager
                if (moveScope.getScore().compareTo(maxScore) > 0) {
                    maxScore = moveScope.getScore();
                    // TODO for non explicit Best Fit *, default to random picking from a maxMoveScopeList
                    maxMoveScope = moveScope;
                }
                if (moveIndex >= selectedCountLimit) {
                    break;
View Full Code Here

TOP

Related Classes of org.drools.planner.core.constructionheuristic.scope.ConstructionHeuristicMoveScope

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.