Examples of HardSoftDoubleScore


Examples of org.optaplanner.core.api.score.buildin.hardsoftdouble.HardSoftDoubleScore

    }

    @Test
    public void buildOptimisticBoundOnlyUp() {
        HardSoftDoubleScoreDefinition scoreDefinition = new HardSoftDoubleScoreDefinition();
        HardSoftDoubleScore optimisticBound = scoreDefinition.buildOptimisticBound(
                InitializingScoreTrend.buildUniformTrend(InitializingScoreTrendLevel.ONLY_UP, 2),
                HardSoftDoubleScore.valueOf(-1.7, -2.2));
        assertEquals(Double.POSITIVE_INFINITY, optimisticBound.getHardScore(), 0.0);
        assertEquals(Double.POSITIVE_INFINITY, optimisticBound.getSoftScore(), 0.0);
    }
View Full Code Here

Examples of org.optaplanner.core.api.score.buildin.hardsoftdouble.HardSoftDoubleScore

    }

    @Test
    public void buildOptimisticBoundOnlyDown() {
        HardSoftDoubleScoreDefinition scoreDefinition = new HardSoftDoubleScoreDefinition();
        HardSoftDoubleScore optimisticBound = scoreDefinition.buildOptimisticBound(
                InitializingScoreTrend.buildUniformTrend(InitializingScoreTrendLevel.ONLY_DOWN, 2),
                HardSoftDoubleScore.valueOf(-1.7, -2.2));
        assertEquals(-1.7, optimisticBound.getHardScore(), 0.0);
        assertEquals(-2.2, optimisticBound.getSoftScore(), 0.0);
    }
View Full Code Here

Examples of org.optaplanner.core.api.score.buildin.hardsoftdouble.HardSoftDoubleScore

    }

    @Test
    public void buildPessimisticBoundOnlyUp() {
        HardSoftDoubleScoreDefinition scoreDefinition = new HardSoftDoubleScoreDefinition();
        HardSoftDoubleScore pessimisticBound = scoreDefinition.buildPessimisticBound(
                InitializingScoreTrend.buildUniformTrend(InitializingScoreTrendLevel.ONLY_UP, 2),
                HardSoftDoubleScore.valueOf(-1.7, -2.2));
        assertEquals(-1.7, pessimisticBound.getHardScore(), 0.0);
        assertEquals(-2.2, pessimisticBound.getSoftScore(), 0.0);
    }
View Full Code Here

Examples of org.optaplanner.core.api.score.buildin.hardsoftdouble.HardSoftDoubleScore

    }

    @Test
    public void buildPessimisticBoundOnlyDown() {
        HardSoftDoubleScoreDefinition scoreDefinition = new HardSoftDoubleScoreDefinition();
        HardSoftDoubleScore pessimisticBound = scoreDefinition.buildPessimisticBound(
                InitializingScoreTrend.buildUniformTrend(InitializingScoreTrendLevel.ONLY_DOWN, 2),
                HardSoftDoubleScore.valueOf(-1, -2));
        assertEquals(Double.NEGATIVE_INFINITY, pessimisticBound.getHardScore(), 0.0);
        assertEquals(Double.NEGATIVE_INFINITY, pessimisticBound.getSoftScore(), 0.0);
    }
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.