anchor.diff:  
   [source,properties]
   ----
  -# The solver runs only for 5 seconds to avoid a HTTP timeout in this simple implementation.
  -# It's recommended to run for at least 5 minutes ("5m") otherwise.
   quarkus.optaplanner.solver.termination.spent-limit=5s
   
  -# Effectively disable this termination in favor of the best-score-limit
  +# Effectively disable spent-time termination in favor of the best-score-limit
   %test.quarkus.optaplanner.solver.termination.spent-limit=1h
   %test.quarkus.optaplanner.solver.termination.best-score-limit=0hard/*soft
   ----
  
positive.code:                 roomConflict(constraintFactory),
                  teacherConflict(constraintFactory),
                  studentGroupConflict(constraintFactory),
                  // Soft constraints are only implemented in optaplanner-quickstart
          };
      }
  
  
negative.code:         // Select a lesson ...
          return constraintFactory
                  .from(Lesson.class)
                  // ... and pair it with another lesson ...
                  .join(Lesson.class,
                          // ... in the same timeslot ...
                          Joiners.equal(Lesson::getTimeslot),
                          // ... in the same room ...
                          Joiners.equal(Lesson::getRoom),
                          // ... and the pair is unique (different id, no reverse pairs) ...
                          Joiners.lessThan(Lesson::getId))
                  // ... then penalize each pair with a hard weight.
                  .penalize("Room conflict", HardSoftScore.ONE_HARD);
      }
  
      private Constraint teacherConflict(ConstraintFactory constraintFactory) {
          // A teacher can teach at most one lesson at the same time.
          return constraintFactory.from(Lesson.class)
                  .join(Lesson.class,
                          Joiners.equal(Lesson::getTimeslot),
                          Joiners.equal(Lesson::getTeacher),
                          Joiners.lessThan(Lesson::getId))
                  .penalize("Teacher conflict", HardSoftScore.ONE_HARD);
      }
  
      private Constraint studentGroupConflict(ConstraintFactory constraintFactory) {
          // A student can attend at most one lesson at the same time.
          return constraintFactory.from(Lesson.class)
                  .join(Lesson.class,
                          Joiners.equal(Lesson::getTimeslot),
                          Joiners.equal(Lesson::getStudentGroup),
                          Joiners.lessThan(Lesson::getId))
                  .penalize("Student group conflict", HardSoftScore.ONE_HARD);
      }
  
  