I will try to explain you the problem I have...
Machines are in blue and buffers in red, as you can see exist two storage areas, ST1 with 4 buffers and ST2 with 9 buffers. For the case of OP 20, 30A, 30B and 40 if any machine fails the following process is performed:
-- The parts from previous stations begin to be stored in their nearby buffers, but if the capacity of these buffers is exceeded and the machine or machines are not available yet, the parts are moved to storage1, If storage 1 is full and machines not available yet, parts are moved to storage 2.
--For the case of storage 2, the parts to come from the rest of machines are stored there until are available again.
So in this process are some constraints:
1.- Is not possible mixing parts that come from different stations in the same buffer. I mean, if another machine fails the parts are stored in an empty buffer (2-9).
2.- If the machine is operational again, parts are moved and redirected to his respective station in order to complete production plan and ensure FIFO's principle, in this case, the first parts that return to the line are those that come from nearby buffers.
3.- If all parts of one type have no been released, the new part type cannot enter to the next station
The real system I'm modeling looks like the one in the attached image, or if you need to see the model maybe I could share it with you.
This is my final master's project, and this activity is the last I need modeling to perform validation. I think this is really complex, at least for me because I'm not an expert and still to learning about software, but I hope you can help me with your suggestions and approaches, or if you have an example model for creating a base, it would be great