Capacity planning algorithm resources
I am still unclear about the precise objective you want to optimise over, but you could look at


Peter Brucker,
Andreas Drexl,
Rolf Möhring,
Klaus Neumann, and
Erwin Pesch,
Resource-constrained project scheduling: Notation, classification, models, and methods,
European Journal of Operational Research
112
3–41,
1999.
doi:10.1016/S0377-2217(98)00204-5


for a comprehensive interdisciplinary overview of related terminology for many such problems.  These kinds of problems are studied in operational research, management science, computer science, and statistics.  There is an extensive literature about nearly every kind of such problem, but it can be hard to find the right terms and to translate between the different styles of exposition.  Good luck!