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

ConstraintVerifier: test for impact() is inverted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 9.43.0.Final
    • Constraint Streams
    • None

    Description

      Found that when using ConstraintVerifier to verify match totals for constraints terminated with "impact()", the expected outcome is inverted, i.e. penalizesBy passes for a reward and vice versa.

      I believe this relates to changes in PLANNER-2477 ConstraintVerifier: penalizesBy / rewardsWith do not work with impact() - Red Hat Issue Tracker.

      Tried to find an example of a test for this but only one example implements an impact() constraint and that is not covered by tests, so this branch is not covered as far as I can see.

      Suppose this is the wrong way round in this code here.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              r.johansen Rob Johansen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: