What you want is to loop through all of the parts on the transporter and check there names, from this you can then know the right ones to move. The easiest way to do this is as follows.
for var i := @.NumMU downto 1
if @.MU(i).name="a" then
Now when you put this into your code, you will see that only 1 MU goes down each line still dispite we wanted all of the MU's of that name to go instead, this is as when we move a MU to the line then it will block the end so the next MU cannot go that way anymore.
There is a few ways to solve this issue depending on what you want, one is to make the transporter stop until it has unloaded all of the MU's, introducing a time delay between the unloading of each MU to give the previous one time to go down the line to free up the end.
Another way is to insert the second MU futher down the line into a posistion that is not blocked, so the transporter does not need to stop moving at all.