use of org.acme.schooltimetabling.domain.Lesson in project optaplanner-quickstarts by kiegroup.
the class TimeTableConstraintProviderTest method teacherConflict.
@Test
void teacherConflict() {
String conflictingTeacher = "Teacher1";
Lesson firstLesson = new Lesson(1, "Subject1", conflictingTeacher, "Group1", TIMESLOT1, ROOM1);
Lesson conflictingLesson = new Lesson(2, "Subject2", conflictingTeacher, "Group2", TIMESLOT1, ROOM2);
Lesson nonConflictingLesson = new Lesson(3, "Subject3", "Teacher2", "Group3", TIMESLOT2, ROOM1);
constraintVerifier.verifyThat(TimeTableConstraintProvider::teacherConflict).given(firstLesson, conflictingLesson, nonConflictingLesson).penalizesBy(1);
}
use of org.acme.schooltimetabling.domain.Lesson in project optaplanner-quickstarts by kiegroup.
the class TimeTableConstraintProviderTest method teacherRoomStability.
@Test
void teacherRoomStability() {
String teacher = "Teacher1";
Lesson lessonInFirstRoom = new Lesson(1, "Subject1", teacher, "Group1", TIMESLOT1, ROOM1);
Lesson lessonInSameRoom = new Lesson(2, "Subject2", teacher, "Group2", TIMESLOT1, ROOM1);
Lesson lessonInDifferentRoom = new Lesson(3, "Subject3", teacher, "Group3", TIMESLOT1, ROOM2);
constraintVerifier.verifyThat(TimeTableConstraintProvider::teacherRoomStability).given(lessonInFirstRoom, lessonInDifferentRoom, lessonInSameRoom).penalizesBy(2);
}
use of org.acme.schooltimetabling.domain.Lesson in project optaplanner-quickstarts by kiegroup.
the class TimeTableConstraintProviderTest method studentGroupConflict.
@Test
void studentGroupConflict() {
String conflictingGroup = "Group1";
Lesson firstLesson = new Lesson(1, "Subject1", "Teacher1", conflictingGroup, TIMESLOT1, ROOM1);
Lesson conflictingLesson = new Lesson(2, "Subject2", "Teacher2", conflictingGroup, TIMESLOT1, ROOM2);
Lesson nonConflictingLesson = new Lesson(3, "Subject3", "Teacher3", "Group3", TIMESLOT2, ROOM1);
constraintVerifier.verifyThat(TimeTableConstraintProvider::studentGroupConflict).given(firstLesson, conflictingLesson, nonConflictingLesson).penalizesBy(1);
}
use of org.acme.schooltimetabling.domain.Lesson in project optaplanner-quickstarts by kiegroup.
the class TimeTableConstraintProviderTest method teacherTimeEfficiency.
@Test
void teacherTimeEfficiency() {
String teacher = "Teacher1";
Lesson singleLessonOnMonday = new Lesson(1, "Subject1", teacher, "Group1", TIMESLOT1, ROOM1);
Lesson firstTuesdayLesson = new Lesson(2, "Subject2", teacher, "Group2", TIMESLOT2, ROOM1);
Lesson secondTuesdayLesson = new Lesson(3, "Subject3", teacher, "Group3", TIMESLOT3, ROOM1);
Lesson thirdTuesdayLessonWithGap = new Lesson(4, "Subject4", teacher, "Group4", TIMESLOT4, ROOM1);
constraintVerifier.verifyThat(TimeTableConstraintProvider::teacherTimeEfficiency).given(singleLessonOnMonday, firstTuesdayLesson, secondTuesdayLesson, thirdTuesdayLessonWithGap).rewardsWith(// Second tuesday lesson immediately follows the first.
1);
}
use of org.acme.schooltimetabling.domain.Lesson in project optaplanner-quickstarts by kiegroup.
the class TimeTableConstraintProviderTest method roomConflict.
@Test
void roomConflict() {
Lesson firstLesson = new Lesson(1, "Subject1", "Teacher1", "Group1", TIMESLOT1, ROOM1);
Lesson conflictingLesson = new Lesson(2, "Subject2", "Teacher2", "Group2", TIMESLOT1, ROOM1);
Lesson nonConflictingLesson = new Lesson(3, "Subject3", "Teacher3", "Group3", TIMESLOT2, ROOM1);
constraintVerifier.verifyThat(TimeTableConstraintProvider::roomConflict).given(firstLesson, conflictingLesson, nonConflictingLesson).penalizesBy(1);
}
Aggregations