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

Meeting scheduling: constraint "Overlapping meetings" has score trap

XMLWordPrintable

    • 2018 Week 39-41, 2021 Week 34-36 (from Aug 23)
    • 2
    • NEW
    • NEW

      Current drl code:

      rule "Overlapping meetings"
          when
              MeetingParametrization($weight: overlappingMeetings != 0)
              $leftAssignment : MeetingAssignment(startingTimeGrain != null)
              $rightAssignment : MeetingAssignment(startingTimeGrain != null, meeting.getId() < $leftAssignment.getMeeting().getId(),
                  meeting != $leftAssignment.getMeeting())
          then
              if ($leftAssignment.calculateOverlap($rightAssignment) != 0) {
                  scoreHolder.addSoftConstraintMatch(kcontext, - $weight);
              }
      end
      
      • calculateOverlap() should affect weight - this is a score trap
      • if should not be needed in then side, the LHS should do that
      • bind $leftMeetingId : getMeeting().getId() so it's clearly where that comes from
      • if the id's of the meetings are less than, then there's no need to do meeting != $leftAssignment.getMeeting()

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: