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

Mixed impact type is not properly asserted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 9.38.0.Final
    • optaplanner-test
    • None
      1. TriConstraintBuilder.impactLong with a soft constraint.
      2. Either DefaultSingleConstraintAssertion.penalizesBy or DefaultSingleConstraintAssertion.rewardsWith.
    • NEW
    • NEW

      I'm using TriConstraintBuilder.impactLong with a soft constraint, but when I try to assert the match weight in tests I get errors like:

      Expected reward: 460 (class java.lang.Long)
           Actual impact: 460 (class java.lang.Long)

      Expected penalty: 540 (class java.lang.Long)
           Actual impact: -540 (class java.lang.Long)

      I debugged the test and came up with the code I'm hitting.

            Unassigned Unassigned
            dsmontoya Daniel Montoya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: