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

Inheriting termination a Termination with minutesSpentLimit on a termination with secondsSpentLimit should not sum them, but replace it

    Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      The problem lies in TerminationConfig.inherit():

          @Override
          public void inherit(TerminationConfig inheritedConfig) {
              ...
              millisecondsSpentLimit = ConfigUtils.inheritOverwritableProperty(millisecondsSpentLimit,
                      inheritedConfig.getMillisecondsSpentLimit());
              secondsSpentLimit = ConfigUtils.inheritOverwritableProperty(secondsSpentLimit,
                      inheritedConfig.getSecondsSpentLimit());
              minutesSpentLimit = ConfigUtils.inheritOverwritableProperty(minutesSpentLimit,
                      inheritedConfig.getMinutesSpentLimit());
              hoursSpentLimit = ConfigUtils.inheritOverwritableProperty(hoursSpentLimit,
                      inheritedConfig.getHoursSpentLimit());
              daysSpentLimit = ConfigUtils.inheritOverwritableProperty(daysSpentLimit,
                      inheritedConfig.getDaysSpentLimit());
      
              unimprovedMillisecondsSpentLimit = ConfigUtils.inheritOverwritableProperty(unimprovedMillisecondsSpentLimit,
                      inheritedConfig.getUnimprovedMillisecondsSpentLimit());
              unimprovedSecondsSpentLimit = ConfigUtils.inheritOverwritableProperty(unimprovedSecondsSpentLimit,
                      inheritedConfig.getUnimprovedSecondsSpentLimit());
              unimprovedMinutesSpentLimit = ConfigUtils.inheritOverwritableProperty(unimprovedMinutesSpentLimit,
                      inheritedConfig.getUnimprovedMinutesSpentLimit());
              unimprovedHoursSpentLimit = ConfigUtils.inheritOverwritableProperty(unimprovedHoursSpentLimit,
                      inheritedConfig.getUnimprovedHoursSpentLimit());
              unimprovedDaysSpentLimit = ConfigUtils.inheritOverwritableProperty(unimprovedDaysSpentLimit,
                      inheritedConfig.getUnimprovedDaysSpentLimit());
              ...
          }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated: