I'm new to Timefold and would appreciate any guidance on how to model and choose the right solver pattern for the following allocation problem:
The goal is to allocate all tasks by feeding each worker's available slot with as much of tasks as possible (and, of course, respecting the tasks constraints)
I managed to use the solver to assign tasks to workers' available time slots, but I can only assign one task per slot, which results in inefficient use of workers' available time (with unused time).
What solver pattern should I use to improve this, so that workers can execute multiple tasks within their available time slots without wasting resources? Any tips or examples would be highly appreciated!
There are a few different patterns available when working with time. You seem to currently be using Timeslots but this indeed limits tasks and leads to some wasted time (since a task always has to take up the full timeslot).
On this page, you can read about 2 alternative approaches: Timegrain and Chained Through Time.
The task allocation quickstart on GitHub uses Chained Through Time. It seems to match most of your requirements.