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

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

    Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      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.

        Gliffy Diagrams

          Marvel

          Marvel Prototype Add-On for Confluence Server written by David Simpson.

            Attachments

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ge0ffrey Geoffrey De Smet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: