Ahhh, bots are my answer to that. You can exert pretty damned precise control via bots and logistic chests. Use a requester chest every now and then which requests the empty barrels and move them from there to the train station/belt bus/etc which you are using for transfer. My preferred method is to use a simple system whereby half of a train car has empty barrel slots and the other half has full ones, that way you wire up the loader and unloader inserters in pairs which only remove a barrel from the train when an empty one is put in. make sure you have a few spare barrels floating in buffer chests amongst the system at either or both ends and you're absolutely fine.mrvn wrote:Except how do you handle empty barrels?
If using belts the same basic principle can easily be applied, merely run parallel tracks, one in either direction, or better yet a loop, since inserters always place to the far side of a belt, you can place full barrels on the nearside of the unbarrellers and the empties will always go on the other side of the belt.