Capacity planning algorithm resources Let's say I have a machine with many boxes of different sizes. I want to put packages inside those boxes. Packages arrive at different time and then stay in the box for specific period of time. I need to be able to tell if there is be an appropriate box available in the future for the package (will there be small size box for package in five days?).

I'm sure there are many papers about this kind of problem. Unfortunately I cannot find one, wrong keywords probably.

Thank you for your answers.
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!