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

ConstraintVerifier: test for impact() is inverted

XMLWordPrintable

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

      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.

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

                Created:
                Updated: