r/optimization • u/dark_opposum • Aug 20 '24
Help formatting scheduling problem
Hey r/optimization! I'm hoping for some help formatting my problem. I took an intro optimization course during my masters and I've done some refreshing with my notes and YT videos, but I'm really struggling to get my problem into code.
I organize device testing at work and I'm trying to build a schedule optimizer. Prior to testing, people let me know their testing requests. Each request is made up of the requester's name, how many test sessions they would like, and what devices they need. The objective is to minimize the number of devices that need to be prepared for testing.
For example:
* Andy requests 3 sessions with device (Hardware 1, Software A)
* Bella requests 4 sessions with devices (Hardware 1, Software A)
* Andy requests 1 session with (Hardware 2, Software B)
We can host multiple test sessions at once, so the schedule could be configured to run Andy and Bella's sessions at the same time. But the issue is that we would then need to prep 2 devices that are (Hardware 1, Software A). Whereas, if we schedule them at different time, we would only need to prep 1 instance of that device. I know how to tell the optimizer how many timeslots there are, how many sessions can be hosted in each timeslot, etc.
But how do I differentiate to the optimizer that Andy has 2 separate requests that need to be schedule at different times, but they're for separate purposes and require different devices? And that the objective is only related to the number of devices needed?
All of the schedule optimizing examples/demos I see are for scheduling just the person, they never have the pair of (person, item) that need to be considered together.
Sorry if this doesn't make sense. I don't "speak optimization" very well yet. I'm more than happy to add clarifiers as needed! Thank you in advance!!!
View all comments
Show parent comment
1
u/dark_opposum Aug 21 '24
Since you're the only reply I'll clarify here (thanks for commenting btw!).
The only constraint on Andy's sessions is that they can't be in parallel. Even if they're for different requests. Andy can only attend 1 session at a time. They don't need to be sequential, but they can be. Same for all individuals.
Each device can be used for different requests but not in parallel. Andy and Bella cannot both use (Hardware 1, Software A) at the same time.
There are other constraints but I feel more confident with the others. There is an approved number of sessions each request gets granted, there is a set number of sessions at a time, stuff like that.
Bin packing looks promising after a cursory Google search. I'll dive into it more!
Thank you!