Examples of SubChain


Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1, b2, b3});

        SubChainReversingSwapMove move = new SubChainReversingSwapMove(variableDescriptor,
                new SubChain(Arrays.<Object>asList(a2, a3, a4)),
                new SubChain(Arrays.<Object>asList(b1, b2)));
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, b2, b1, a5);
        SelectorTestUtils.assertChain(b0, a4, a3, a2, b3);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, a6, a7});

        SubChainReversingSwapMove move = new SubChainReversingSwapMove(variableDescriptor,
                new SubChain(Arrays.<Object>asList(a2, a3, a4)),
                new SubChain(Arrays.<Object>asList(a5, a6)));
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a6, a5, a4, a3, a2, a7);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, a6, a7});

        SubChainReversingSwapMove move = new SubChainReversingSwapMove(variableDescriptor,
                new SubChain(Arrays.<Object>asList(a5, a6)), // Opposite parameter order
                new SubChain(Arrays.<Object>asList(a2, a3, a4)));
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a6, a5, a4, a3, a2, a7);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1", b0);

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1});

        SubChainChangeMove move = new SubChainChangeMove(new SubChain(Arrays.<Object>asList(a3, a4, a5)),
                variableDescriptor, b1);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a2);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1", b0);

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1});

        SubChainChangeMove move = new SubChainChangeMove(new SubChain(Arrays.<Object>asList(a2, a3, a4)),
                variableDescriptor, b0);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a5);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1});

        SubChainReversingChangeMove move = new SubChainReversingChangeMove(
                new SubChain(Arrays.<Object>asList(a3, a4, a5)),
                variableDescriptor, b1);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a2);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5});

        SubChainReversingChangeMove move = new SubChainReversingChangeMove(
                new SubChain(Arrays.<Object>asList(a3, a4, a5)),
                variableDescriptor, a2);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a2, a5, a4, a3);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1});

        SubChainReversingChangeMove move = new SubChainReversingChangeMove(
                new SubChain(Arrays.<Object>asList(a2, a3, a4)),
                variableDescriptor, b0);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a5);
View Full Code Here

Examples of org.optaplanner.core.impl.heuristic.selector.value.chained.SubChain

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
                new TestdataChainedEntity[]{a1, a2, a3, a4, a5});

        SubChainReversingChangeMove move = new SubChainReversingChangeMove(
                new SubChain(Arrays.<Object>asList(a2, a3, a4)),
                variableDescriptor, a1);
        Move undoMove = move.createUndoMove(scoreDirector);
        move.doMove(scoreDirector);

        SelectorTestUtils.assertChain(a0, a1, a4, a3, a2, a5);
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.