How to set a avoidance area on Pathway?

Hello every one ,
I’m designing a production line with several agvs.

Most of the time they share one road and can move in both directions, but only one can pass at a time.
I just want to know how to set a avoidance area on Pathway ,which means when two agvs are entering a pathway at the same time, the late one would wait untill the other passed.