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

Confusing exception on score and match weight type mismatch

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 8.0.0.Final
    • None
    • optaplanner-core
    • None
    • 2020 Week 43-45 (from Okt 19)
    • 3
    • Undefined
    • NEW
    • NEW

      If I have something along the lines:
       
       {{constraintFactory.from(Entity.class)
      .penalize("...",
      BendableBigDecimalScore.ofSoft(2, 1, 0, BigDecimal.ONE),
      entity -> // some integer);}}
      I'm getting an error In the rule (...), the scoreHolder class (class org.optaplanner.core.impl.score.buildin.bendablebigdecimal.BendableBigDecimalScoreHolderImpl) does not support an int weightMultiplier (830)., but the weightMultiplier must be an integer IIUC (ToIntFunction<Entity>).

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: