Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2299

ScoreManager.explainScore does not support BAVET constraint streams

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.7.0.Final
    • 8.0.0.Final
    • optaplanner-core
    • None
    • 2021 Week 16-18 (from Apr 19)
    • 3
    • Hide
      // instantiate solverFactory with constraintStreamImplType = ConstraintStreamImplType.BAVET
      val scoreManager = ScoreManager.create<SolutionClass, HardMediumSoftLongScore>(solverFactory)
      val explanation = scoreManager.explainScore(solution)
      println(explanation)
      

      output:

      Explanation of score (0hard/0medium/-240soft):
          Constraint match totals:
              0: constraint (constraint 1) has 0 matches:
              0: constraint (constraint 2) has 0 matches:
              0: constraint (constraint 3) has 0 matches:
          Indictments:
      
      

      When switching the constraintStreamImplType to DROOLS we obtain the expected output

      Show
      // instantiate solverFactory with constraintStreamImplType = ConstraintStreamImplType.BAVET val scoreManager = ScoreManager.create<SolutionClass, HardMediumSoftLongScore>(solverFactory) val explanation = scoreManager.explainScore(solution) println(explanation) output: Explanation of score (0hard/0medium/-240soft): Constraint match totals: 0: constraint (constraint 1) has 0 matches: 0: constraint (constraint 2) has 0 matches: 0: constraint (constraint 3) has 0 matches: Indictments: When switching the constraintStreamImplType to DROOLS we obtain the expected output
    • Undefined
    • NEW
    • NEW

      Expected behavior

      When configuring constraintStreamImplType.BAVET the scoreManager's score explanation should yield the same output as when configuring constraintStreamImplType.DROOLS

      Actual behavior

      The score explanation is empty when using BAVET. When using DROOLS a proper, correct score explanation is created.

            lpetrovi@redhat.com Lukáš Petrovický (Inactive)
            fabian-braun Fabian Braun (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: