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

Constraint Streams: support multiple groupBy calls

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 7.34.0.Final
    • 7.33.0.Final
    • optaplanner-core
    • None

    Description

      In some constraints, multiple groupBy calls might be necessary. See Machine reassignment : service move cost as an example:

      return factory.from(MrProcessAssignment.class)
      .filter(MrProcessAssignment::isMoved)
      .groupBy(processAssignment -> processAssignment.getService(), ConstraintCollectors.countLong())
      .groupBy((service, processMoveCount) -> processMoveCount)
      .groupBy(ConstraintCollectors.max())
      ...

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: