I was experimenting with the distance control for vehicles and it looks really realistic. The only problem is that in some situations vehicles won't be released again when the front vehicle moves ahead and block the system for all times.
This seem to happen often after the front vehicle has changed the path segment while below distance. Maybe the distance sensor is not able to "watch" over to the next segment and forget to release the vehicle again? My method is as follows:
(UnderLimit:Boolean) is do if UnderLimit then ?.Stopped := true; else ?.Stopped := false; end; end;
Does anybody know a working solution for this?
Thanks and best regards
Solved! Go to Solution.
Can you post your model. Without model it is difficult to see what goes wrong.
The distance control looks to the next segment.
Many parameters are relevant, e.g. have the vehicles acceleration on, are there branches or junctions at the critical segments, what speed have the vehicles?
But I think your method is not correct. When the distance will be reached and you stop the second vehicle at the same time the distance will be exceeded. So a further distance event will be inserted which starts the second vehicle again.
I would make it work with an observer.
So every time the condition distance condition is met the method triggers.
Question? Vehicle reaches a slower one. Stops, car in-front moves, method triggers as soon as distance is again "safe". car behind moves, immidately reaches again.
Same loop over and over again.
Is this not the problem?
we have released the patch 12.1.1 end of october.
Hmm. It still do not solves my problem. I have attached three screen shots, one of the code and two of the case.
The Transporter (3), have just arrived at the track and has a destination.
The formost tugger (1), have a destination, and have just been waiting that transporter (3) was moved in to the track that it currently are located on.
When the Tugger (1), have space to follow Transporter (3). The rear most tugger train (2) starts to shifts between pause / Not Pause. And this will jam the rest of the simulation.
In my attached model the distance control with setting "pause" works. Can you please modify my model or post your model that I can see the endless loop.