Hello Joana,
I reviewed you last model "data file.cfg" and changed it a bit.
1) I put the InterArrivalTime to 5[s].
2) The RawMaterialArrival creates an 1st entity after 10[s]. Just as a start point.
3) This 1st. entity goes to the RawMaterialsInventory to count this part.
1st Check: Whether this is this the first part I check for [RawMaterialsArrival].PartsOrdered==0 , then I know this is the first part and the
value is set to [RawMaterialsQuantity].Value.
2nd Check: Are produced parts < ordered parts minus 1 part (because the 1st part is already there),
if YES it counts 1 part more
if NO the arrived parts is reset to 0. This indicates the ordered parts are produced.
3rd Check: If this arrived parts ==0 then it asks for a new InterArrivalTime using [RawMaterialsA].Value, otherwise it keeps 5 minutes.
4th Check: If the arrived parts ==0, it indicates also the ordered parts a done and a new quantity is to ordered by a new value with
[RawMaterialsQuantity].Value, if
4) I added an EntityConveyor1 just to visualize the coming of the ordere parts.
5) I replaced EntityProcessor after Queue1 with a server "WaferFab" which has a service time of 5 minutes according your information.
6) The conveyor "BackToWaferFab" was in the wrong direction. So I rotated them by 180dgr.
Please take a look on the attached model.
Best Regards,
Klaus