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

Mixed impact type is not properly asserted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: