springspring-bootschedulingoptaplannertimetable

Plan a schedule in optaplanner that takes in account that the lesson takes 2 hours or 3 hours


I have made a timetable that needs to be populated with lessons, each lesson has a subject a studentGroup and two planning variables which are timeslot which indicates the day and the beginning and the end of the lesson and also the room. My problem is that i want to fix for each lesson the time they should be taken for exampe math would tak 2 hours, Chemistery would take 3 hours.

Is their a way to do that in optaplanner (adding some special function or constraints) to achieve this because i didn't see that in the documentation.

Any help is appreciated and thanks in advance.


Solution

  • Read the docs chapter "Design patterns", the section about "Assigning to time".

    That leaves you with several options: