Package org.drools.planner.core.score.director

Examples of org.drools.planner.core.score.director.ScoreDirector


        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        GenericChainedChangeMove move = new GenericChainedChangeMove(a3, variableDescriptor, b1, null, null);
        move.doMove(scoreDirector);

        assertEquals(a0, a1.getChainedObject());
View Full Code Here


        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        GenericChainedChangeMove move = new GenericChainedChangeMove(a2, variableDescriptor, b0, a3, b1);
        move.doMove(scoreDirector);

        assertEquals(a0, a1.getChainedObject());
View Full Code Here

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
        entitiesSubChain.add(a5);
View Full Code Here

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a2);
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
View Full Code Here

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
        entitiesSubChain.add(a5);
View Full Code Here

        TestdataChainedEntity a5 = new TestdataChainedEntity("a5");
        a5.setChainedObject(a4);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
        entitiesSubChain.add(a5);
View Full Code Here

        TestdataChainedEntity b1 = new TestdataChainedEntity("b1");
        b1.setChainedObject(b0);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a2);
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
View Full Code Here

        TestdataChainedEntity a5 = new TestdataChainedEntity("a5");
        a5.setChainedObject(a4);

        PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
        PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        List<Object> entitiesSubChain = new ArrayList<Object>();
        entitiesSubChain.add(a2);
        entitiesSubChain.add(a3);
        entitiesSubChain.add(a4);
View Full Code Here

    @Test
    public void original() {
        PlanningVariableDescriptor variableDescriptor = SelectorTestUtils.mockVariableDescriptor(
                TestdataChainedEntity.class, "chainedObject");
        when(variableDescriptor.isChained()).thenReturn(true);
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        TestdataChainedAnchor a0 = new TestdataChainedAnchor("a0");
        TestdataChainedEntity a1 = new TestdataChainedEntity("a1", a0);
        TestdataChainedEntity a2 = new TestdataChainedEntity("a2", a1);
        TestdataChainedEntity a3 = new TestdataChainedEntity("a3", a2);
View Full Code Here

    @Test
    public void emptyEntitySelectorOriginal() {
        PlanningVariableDescriptor variableDescriptor = SelectorTestUtils.mockVariableDescriptor(
                TestdataChainedEntity.class, "chainedObject");
        when(variableDescriptor.isChained()).thenReturn(true);
        ScoreDirector scoreDirector = mock(ScoreDirector.class);

        TestdataChainedAnchor a0 = new TestdataChainedAnchor("a0");
        TestdataChainedAnchor b0 = new TestdataChainedAnchor("b0");

        SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
View Full Code Here

TOP

Related Classes of org.drools.planner.core.score.director.ScoreDirector

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.