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

Potential score corruption when using an Integer(method) pattern in score drl?

XMLWordPrintable

    • NEW
    • NEW

      According to Mario this rule should normally work correctly (despite it being poorly written):

      rule "qualification correct"
      when
          $vehicle : Vehicle($vehicleQualifications:qualifications)
          $customer : Customer(vehicle==$vehicle,$customerQualification:qualifications)
          $test : Integer(RuleHelper.qualified($vehicleQualifications,$customerQualification)<1)
      then
          scoreHolder.addHardConstraintMatch(kcontext, -100L);
      end
      

      But a user reports that it behaves as if it's causing score corruption:
      https://stackoverflow.com/questions/51130220/rules-are-ignored-in-vehiclerouting-with-timewindows

      Do a short investigation to see if you can reproduce this score corruption (and if not just close this issue). If you can reproduce it, it's a potential issue in drools.

              Unassigned Unassigned
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: