cristiklein / simpy

MIT License
109 stars 16 forks source link

Machine that can batch process #15

Open mysteriousHerb opened 3 years ago

mysteriousHerb commented 3 years ago

Hi, I want to model a process that can handle multiple samples in a batch. Let's say we are making pizza using a big oven. We will make 5 pizza dough and then send them together into the oven for cooking.

I cant simply set the capacity of a oven to 5, because the dough will be processed 1 by 1 once ready from the previous step.

In other word, the oven can handle multiple samples, but once it starts, it has to wait for the complete process to finish to load another batch.

Could you offer some guidance on this?

hansen1101 commented 3 years ago

Hi,

my suggestion would be to use an intermediate resource (e.g. a store) with unlimited capacity holding the pizza dough which is ready for the baking process. The baking process actively grabs a batch (up to 5 items) from the intermediate store, puts it in the oven, timeouts until the pizza is ready, unloads the oven and loops...