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

Data classes/Records: Exception "Undo does not exist" (don't rely on equals()/hashcode() if identity suffices)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.4.0.Final
    • None
    • None
    • None
    • 2021 Week 10-12 (from Mar 8)
    • 2
    • Undefined
    • NEW
    • NEW

      from(Lesson::class.java)
                      .filter { it.timeslot != null }
                      .groupBy({ it.studentGroup }, { it.timeslot!!.day }, ConstraintCollectors.toList())
                      .filter { group, day, list ->
                          list.any { it.timeslot!!.number != 1 }
                      }
                      .penalize(
                          "Student must have first lesson",
                          HardSoftScore.ONE_HARD
                      ) { group, day, list -> list.count { it.timeslot!!.number != 1 } },
      

      Exception:

      Undo for (Lesson(subj...)) does not exist

      SO discussion: https://stackoverflow.com/questions/66204604/optaplanner-school-timetabling-force-first-lession

      code https://github.com/Lewik/timetable

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              lllewik@gmail.com Lev Shagalov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: