Examples of doMove()


Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a3);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a3);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, b1);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, b1);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3);
        SelectorTestUtils.assertChain(b0, b1);
    }

}
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector, atLeastOnce()).beforeVariableChanged(variableDescriptor, b2);
        verify(scoreDirector, atLeastOnce()).afterVariableChanged(variableDescriptor, b2);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, b3);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, b3);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
        SelectorTestUtils.assertChain(b0, b1, b2, b3);
    }

    @Test
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector, atLeastOnce()).beforeVariableChanged(variableDescriptor, a6);
        verify(scoreDirector, atLeastOnce()).afterVariableChanged(variableDescriptor, a6);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a7);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a7);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5, a6, a7);
    }

    @Test
    public void oldAndNewTrailing() {
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector).beforeVariableChanged(variableDescriptor, b2);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, b2);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, b3);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, b3);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
        SelectorTestUtils.assertChain(b0, b1, b2, b3);
    }

    @Test
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a6);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a6);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a7);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a7);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5, a6, a7);
    }

    @Test
    public void oldAndNewTrailingInPlaceOppositeParameterOrder() {
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a6);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a6);
        verify(scoreDirector, atLeastOnce()).beforeVariableChanged(variableDescriptor, a7);
        verify(scoreDirector, atLeastOnce()).afterVariableChanged(variableDescriptor, a7);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5, a6, a7);
    }

}
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        Move move = moveScope.getMove();
        Move undoMove = move.createUndoMove(scoreDirector);
        moveScope.setUndoMove(undoMove);
        move.doMove(scoreDirector);
        processMove(moveScope);
        undoMove.doMove(scoreDirector);
        if (assertExpectedUndoMoveScore) {
            LocalSearchPhaseScope phaseScope = moveScope.getStepScope()
                    .getPhaseScope();
            phaseScope.assertExpectedUndoMoveScore(move, undoMove);
        }
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector, never()).beforeVariableChanged(variableDescriptor, a4);
        verify(scoreDirector, never()).afterVariableChanged(variableDescriptor, a4);
        verify(scoreDirector, never()).beforeVariableChanged(variableDescriptor, a5);
        verify(scoreDirector, never()).afterVariableChanged(variableDescriptor, a5);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
        SelectorTestUtils.assertChain(b0, b1);
    }

    @Test
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector, never()).beforeVariableChanged(variableDescriptor, a4);
        verify(scoreDirector, never()).afterVariableChanged(variableDescriptor, a4);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, b1);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, b1);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
        SelectorTestUtils.assertChain(b0, b1);
    }

}
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.move.Move.doMove()

        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a4);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a4);
        verify(scoreDirector).beforeVariableChanged(variableDescriptor, a3);
        verify(scoreDirector).afterVariableChanged(variableDescriptor, a3);

        undoMove.doMove(scoreDirector);
        SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
        SelectorTestUtils.assertChain(b0, b1);
    }

    @Test
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.