How could I link LocalTime variable and DayOfWeek variable together? #1085
Closed
JackTong24
started this conversation in
General
Replies: 1 comment
-
The school timetabling Quickstart assumes that you're planning a timetable of fixed days, which doesn't change through time. In other words - you define a fixed week, and that's it. If your weeks aren't fixed, arguably you want to start from the Employee Scheduling Quickstart. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
import java.time.LocalTime;
import java.time.DayOfWeek;
We are working on a school timetable project and need help with defining starting times for lessons. The challenge is that the list of possible starting times varies by day, e.g., no classes start on Friday afternoon. Therefore, we need to link the LocalTime and DayOfWeek variables together into a single @PlanningVariable.
We attempted to solve this by creating a new Timeslot class, which contains LocalTime and DayOfWeek as attributes. However, this approach prevents us from using the "overlapping" method in ConstraintFactory, which we need to avoid scheduling conflicts.
Could you please advise us on how to implement this properly? Is there a way to link LocalTime and DayOfWeek in a single @PlanningVariable while still being able to utilize the "overlapping" method?
Beta Was this translation helpful? Give feedback.
All reactions