I am looking for some guidance on making an algorithm. My scenario is described below.
Scenario
I have N teams and M rooms and want to create a weekly schedule that suits all the N teams based on some criteria.
Each of the N teams looks as follows:
- Size (int): The amount members in the team.
- Sessions (int): The number of sessions that the team needs a room for. Each lasting one hour.
- Consecutive (bool): Indicates whether a team is able to have sessions on consecutive days or not.
The following conditions must also be considered:
- If a team's size is below a certain threshold T, a room can be split in half for them to use, which possibly frees up the other half for another team's session.
- If it is not possible to meet all teams' criteria, the algorithm should relax the criteria to find a schedule that breaks the criteria as little as possible.
Future conditions would be to include team availability for those that must or can't practice at specific times. Though, I am just looking for a simple starting point at the moment.
My initial thoughts were a dynamic programming algorithm while a quick chat with ChatGPT brought up the constraint satisfaction algorithm. Does any of you see a solution to this problem and how it can be modeled?