0
votes

I am noticing some "strange" behaviour in the Road Traffic Library. In my model, I seize and release resources based on the position of a vehicle on the road network. The reason for this is not the issue here but in the model execution, some vehicles seemed to miss the seize step. To try and understand what was happening, I created a very simple model with a simple T-junction. Injecting a car on the vertical leg and moving it straight to the stopline at the intersection and specifying that it must stop before the line before proceeding to the next block which moves the vehicle on the horizontal, works as expected. However, if I put another stopline on the vertical road before the junction and add a carMoveTo block to first move the car to this stopline (but setting it to pass through) and then moving it to the stopline at the junction (set to stop before) the behaviour becomes inconsistent. The outer lane on a 2 lane road works as expected, but on the inner lane, the car overshoots the stopline at the junction and ends up in the intersection even before completing the block.

Can anyone explain why AnyLogic is doing this and how I can ensure that the car stop as specified?

EDIT

I have created a demonstration model in the public AnyLogic cloud at Road Traffic Demo

Also see below screenshot for an illustration Screenshot Without the pass-through stopline the vehicle completes the block in column 2 at zero speed (stop at intersection). With the mass-through the vehicle complete the block in column 2 (carMoveTo1) at speed ~30kph (does not stop at the intersection) - I update the value of the variable "speed" on exit from the relevant block in column 2 using the car.getSpeed(KPH) method.

1
likely, there is not enough space between the stop lines and cars struggle to change as is required of them. However, it could be lots of other things, really depends on the actual network setup. - Benjamin
cloud.anylogic.com/model/… I uploaded a demo model that illustrate this - Renier
Better to improve and clarify your questions with screenshots... Higher chance to get an answer ;) - Benjamin
this seems like a bug... unless you have a problem in the way you define stuff, but impossible to know since you forbid us to download the model - Felipe
@Felipe. This was the first model I published to the cloud so I did not "forbid" anything it just seem to be the default setting. I have now enabled downloading of the source files. - Renier

1 Answers

0
votes

It seems my question was poorly formulated and what I thought was a self-explanatory example wasn't. However, I think Benjamin actually answered it in his first comment. It seems AnyLogic calculates the vehicle physics one block at a time thus it allows the car to accelerate up to its preferred speed at the pass-through StopLine and then only in the next block determines that it needs to stop at the next line and therefore needs to decelerate. If the pass-through line is too close to the stop line then the car cannot decelerate fast enough and "overshoots" the stop line. I have tested this in the example model by moving the pass-through line further away from the stop line and when far enough away, the car stops as expected with or without the pass-through block.