I would like your help to create a restriction in the simulation that is attached to this post.
As you can see, I have a logistics process where only a forklift works in two cases, it's a shared resource.
The function of the forklift is transport pallets to different warehouses, but there is a restriction in this case that is not happening.
First, the forklift must carry all pallets arriving in the first hour - there is a table which shows the delivery (Janela_Entrega), it takes all pallets of warehouse (Estoque_1) for the storage(Ca_350), after the end this part of the process it changes course and will carry those same storage Ca_350 pallets to the warehouse (Estoque_2)
the forklift returns only the first track to load the second delivery pallets when all of the first delivery are allocated in the last warehouse (Estoque_2).
after loading ca_350 you need to drive a little distance backwards until track1, turn there back to foreward driving, then all works fine.
See in PartsCtrl1. Returno as sensor control on track 1 switches the transporter to foreward.
continuos doesn't work, look again the attachment... I modified the number of MU in the deliver table; the forklift doesn't change of track when it finishes loading the first lots.
If timer appoints the same time that second or third lots, the forklift continues loading pallets
instead of unloading the next track
this is because your condition
if Estoque_1.numMu=0 then
only works for a max. lot size of around 50
Your transporter needs for one round approx. 70 sec. if you set an interval between the lots of one hour then it works only until a lot size of 50, if the lot size is bigger, the new lot arrives while the transporter is still unloading estoque_1, if you want to take into account also the second loop, the lot size should not be bigger then 25 with an interval of one hour.
If you need more flexibility, you need to change the condition in PartsCtrl to start the second loop.
I believe that only way to solve this is create a line in method that look to "Table deliver" and search for the column where is appoint the size lot, when this lot was completely transfer to Ca_350 then transporter changes the track.
Do you have some example abou this method?
you can define attributes for the MUs in the delivery table, I have included the lot size as attribute.
I have also defined lot as user defined attribute in your transporter. In tagetCtrl1 you can transfer the lot size from the part to the transporter. Then you can read the lot size from the transporter in the method PartsCtrl1 to start the second round after completing the lot.
I guess this is the shortest way.