Class BendableScoreVerifier<Solution_>

  • Type Parameters:
    Solution_ - the solution type, the class with the PlanningSolution annotation

    @Deprecated(forRemoval=true)
    public class BendableScoreVerifier<Solution_>
    extends AbstractScoreVerifier<Solution_>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Score DRL is deprecated and will be removed in a future major version of OptaPlanner. See DRL to Constraint Streams migration recipe.
    To assert the constraints of a SolverFactory that uses a BendableScore. If you're using ConstraintStreams, use ConstraintVerifier instead.
    • Constructor Summary

      Constructors 
      Constructor Description
      BendableScoreVerifier​(org.optaplanner.core.api.solver.SolverFactory<Solution_> solverFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void assertHardWeight​(String constraintName, int hardLevel, int expectedWeight, Solution_ solution)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert that the constraint of PlanningSolution has the expected weight for that score level.
      void assertHardWeight​(String constraintPackage, String constraintName, int hardLevel, int expectedWeight, Solution_ solution)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert that the constraint of PlanningSolution has the expected weight for that score level.
      void assertSoftWeight​(String constraintName, int softLevel, int expectedWeight, Solution_ solution)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert that the constraint of PlanningSolution has the expected weight for that score level.
      void assertSoftWeight​(String constraintPackage, String constraintName, int softLevel, int expectedWeight, Solution_ solution)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert that the constraint of PlanningSolution has the expected weight for that score level.
    • Field Detail

      • hardLevelsSize

        protected final int hardLevelsSize
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Constructor Detail

      • BendableScoreVerifier

        public BendableScoreVerifier​(org.optaplanner.core.api.solver.SolverFactory<Solution_> solverFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Parameters:
        solverFactory - never null, the SolverFactory of which you want to test the constraints.
    • Method Detail

      • assertHardWeight

        public void assertHardWeight​(String constraintName,
                                     int hardLevel,
                                     int expectedWeight,
                                     Solution_ solution)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Assert that the constraint of PlanningSolution has the expected weight for that score level.
        Parameters:
        constraintName - never null, the name of the constraint
        hardLevel - 0 <= hardLevel < hardLevelSize. The scoreLevel is hardLevel for hard levels and softLevel + hardLevelSize for soft levels.
        expectedWeight - the total weight for all matches of that 1 constraint
        solution - never null, the actual PlanningSolution
      • assertHardWeight

        public void assertHardWeight​(String constraintPackage,
                                     String constraintName,
                                     int hardLevel,
                                     int expectedWeight,
                                     Solution_ solution)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Assert that the constraint of PlanningSolution has the expected weight for that score level.
        Parameters:
        constraintPackage - sometimes null. When null, constraintName for the scoreLevel must be unique.
        constraintName - never null, the name of the constraint
        hardLevel - 0 <= hardLevel < hardLevelSize. The scoreLevel is hardLevel for hard levels and softLevel + hardLevelSize for soft levels.
        expectedWeight - the total weight for all matches of that 1 constraint
        solution - never null, the actual PlanningSolution
      • assertSoftWeight

        public void assertSoftWeight​(String constraintName,
                                     int softLevel,
                                     int expectedWeight,
                                     Solution_ solution)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Assert that the constraint of PlanningSolution has the expected weight for that score level.
        Parameters:
        constraintName - never null, the name of the constraint
        softLevel - 0 <= softLevel < softLevelSize. The scoreLevel is hardLevel for hard levels and softLevel + hardLevelSize for soft levels.
        expectedWeight - the total weight for all matches of that 1 constraint
        solution - never null, the actual PlanningSolution
      • assertSoftWeight

        public void assertSoftWeight​(String constraintPackage,
                                     String constraintName,
                                     int softLevel,
                                     int expectedWeight,
                                     Solution_ solution)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Assert that the constraint of PlanningSolution has the expected weight for that score level.
        Parameters:
        constraintPackage - sometimes null. When null, constraintName for the scoreLevel must be unique.
        constraintName - never null, the name of the constraint
        softLevel - 0 <= softLevel < softLevelSize. The scoreLevel is hardLevel for hard levels and softLevel + hardLevelSize for soft levels.
        expectedWeight - the total weight for all matches of that 1 constraint
        solution - never null, the actual PlanningSolution