The problem is that in arrows and in FRP, the flow of information is generally unidirectional. Think of the FRP arrow as part of a digital circuit. The output of a circuit element does not depend on what is connected with it - it simply βoffersβ a solution to someone who is interested in it. This is also described visually in the primitive signaling functions in the Yampa overview :

Your situation is different. The condition of the road segment depends on both the next and the previous segments - the cars go from the previous one, but if the cars cannot go to the next, they should stay. It's like a pipe with running water. If you close the pipe at its end, the water stops, and information about it spreads back through the pipe at the speed of sound in the water.
Thus, each segment of the road should have 2 entrances: one of them allows you to say how many cars the next segment can take, and how many cars fall on the previous segment (which should always be less than or equal to the number of cars the segment can take at the moment). This means that the FRP signal flow will be virtually circular. To do this, you need the loops shown in the last image in the above diagram, which are captured by a class of type ArrowLoop . Most likely, you will have a special snap function for road segments that will internally create the necessary loops. Please note that there must be a time delay in the cycle so that it does not diverge, which makes sense, since it takes some time to move from one segment to another.
(Perhaps I will answer an example if I have more time.)
source share