Jump to content

Road Junctions


Recommended Posts

Hi.

B18BF551-1677-4277-AE1B-6019275E4E4E

That is my test track, uploaded as a draft so it doesn't clutter the catalogue. Dies ist mein Testtrack, den ich als Entwurf hochgeladen habe, damit er den Katalog nicht überfüllt.

Capture.thumb.JPG.674945f80690e445b5abe2560cc7e797.JPG

There's one junction that is controlled by counting vehicles in and out, and one junction that is uncontrolled. What I want to know is, is there a way of making the vehicles behave in a more realistic manner when turning left into or out of a junction? I can make them stop at the stop line until the junction is clear, but the longer vehicles are never clear of the junction before the next vehicle arrives at it. All the vehicles have auto-decelerate and auto-accelerate set, and yet some times for some reason a vehicle will crash into the back of a slower one and push it.

Es gibt eine Kreuzung, die durch Zählen der ein- und ausfahrenden Fahrzeuge kontrolliert wird, und eine Kreuzung, die nicht kontrolliert wird. Was ich wissen möchte, ist, gibt es eine Möglichkeit, das Verhalten der Fahrzeuge beim Linksabbiegen in oder aus einer Kreuzung realistischer zu gestalten? Ich kann sie an der Haltelinie anhalten lassen, bis die Kreuzung frei ist, aber die längeren Fahrzeuge haben die Kreuzung nie verlassen, bevor das nächste Fahrzeug dort ankommt. Alle Fahrzeuge haben eine automatische Verzögerungs- und Beschleunigungseinstellung, und dennoch prallt manchmal aus irgendeinem Grund ein Fahrzeug gegen das Heck eines langsameren und schiebt es.

And finally (and most annoying of all) especially on the uncontrolled junction, a car will occasionally insert itself between a tractor and trailer. This is the reason I no longer bother with articulated vehicles or trailers on my layouts.

Und schließlich (und am ärgerlichsten), besonders an der unkontrollierten Kreuzung, schiebt sich gelegentlich ein Auto zwischen Traktor und Anhänger. Aus diesem Grund habe ich auf meinen Anlagen keine Sattelzüge oder Anhänger mehr.

I've found that road vehicles are almost more trouble than they are worth to include, as they require constant micromanaging to keep them moving, which takes away the joy of running the trains.

Ich habe festgestellt, dass Straßenfahrzeuge fast mehr Ärger bereiten, als es wert ist, absorbiert zu werden, da sie ein ständiges Mikromanagement erfordern, um sie in Bewegung zu halten, was die Freude am Fahren der Züge beeinträchtigt.

The random target assignment works so far as it needs to and is just a way of making sure that things happen. Die zufällige Zielzuweisung funktioniert so weit wie nötig und ist nur eine Möglichkeit, dafür zu sorgen, dass Dinge passieren

[edit to add]

I also forgot the random "Tail Flick". This occurs when a vehicle goes over a junction that for some reason isn't set correctly and the back of the vehicle flicks over to the other route. Normally just annoying to look at, if there are a number of vehicles queueing up at the junction it can result in some very unrealistic "flicking" of the entire queue of cars, and I have seen this result in vehicles being on the wrong side of the road and heading backwards towards their target!

Ich habe auch das zufällige "Schwanzschnippen" vergessen. Dies tritt auf, wenn ein Fahrzeug eine Kreuzung passiert, die aus irgendeinem Grund nicht korrekt eingerichtet ist, und das Heck des Fahrzeugs auf die andere Route wechselt. Normalerweise nur ärgerlich anzusehen, wenn sich eine Reihe von Fahrzeugen an der Kreuzung anstellt, kann dies zu einem sehr unrealistischen "Schwanzschnippen" der gesamten Fahrzeugreihe führen, und ich habe gesehen, dass dies dazu führt, dass Fahrzeuge auf der falschen Seite der Kreuzung stehen Straße und rückwärts zum Ziel!

Edited by simonjackson1964
Forgot one!
Link to comment
Share on other sites

Hello Simon,

vor 10 Stunden schrieb simonjackson1964:

I also forgot the random "Tail Flick". This occurs when a vehicle goes over a junction that ...

isn't part of it's current route.

Example:

1751374688_tailflickexample.thumb.jpg.bb5f2ceb59a81ef06da584be652e74ff.jpg

the marked log truck did a "tail flick" at the junction behind, because it wasn't part of it's current route (the very short green line at the eastern end)

Greets
Goetz

Edited by Goetz
Link to comment
Share on other sites

10 hours ago, simonjackson1964 said:

the vehicle flicks over to the other route.

Hello @simonjackson1964, I had it too on my layout, but it happened on a junction with more routes, at that time the traffic regulation was not ready. So another vehicle nearby the collision caused it. After the regulation of the traffic, it dissapears.  But I'm going to investigate some routes more intense. Nice regards, Herman

Edited by Herman
Link to comment
Share on other sites

Thanks Guys.

I have to say that road vehicles are a particular bugbear of mine.

I'll make the random route assignment more sophisticated, so it only assigns routes that are reachable from the present location and re-upload.

Cheers

Simon

Link to comment
Share on other sites

B18BF551-1677-4277-AE1B-6019275E4E4E

There. It's actually much more elegant, code wise, removes that ugly nested condition.

And while it removes the tail flick when driving by, which was the annoying but inconsequential one, it doesn't remove any of the other issues.

Including the strange "failure to subtract 1" that seems to happen randomly. Fortunately this has a built in fix in that vehicles entering the junction from the side road don't add to the counter, but do subtract, and if the count goes below zero it is set back to zero.

But a vehicle stopped permanently at the stop sign because of this, thus causing the side road to fill, will precipitate the"mega-tail-flick" problem when it starts moving again, This can be created artificially by stopping a vehicle in the side road, then starting it up once the traffic has backed up behind it in both directions

Link to comment
Share on other sites

vor 30 Minuten schrieb simonjackson1964:

vehicles entering the junction from the side road don't add to the counter, but do subtract

That's messy, Simon
And the haphazard fix doesn't change that. You may still end up with a wrong count (before the value goes negative!), causing some undesired behaviour.

Also, the "failure to subtract 1" is most likely "by design". 

Greets
Goetz

Link to comment
Share on other sites

Actually no.

This is something I've been wrestling with since V4.

A vehicle enters the the junction, and hits the track contact, causing +1 to the count. Unless I go the whole hog and count each track contact separately, checking which route each vehicle is on and decide whether or not to slow or stop it on that basis, I have no way of saying that this vehicle is turning left therefore must wait for oncoming traffic. The only solution that doesn't require a "degree in astrophysics", is to say that traffic entering the junction from the straight routes adds 1 to the count when entering and subtracts 1 when leaving. Then to at least try and prevent the mess on the uncontrolled junction where cars jump out on top of each other, I say that when the count is > 0 the contact on the side road is set to decelerate to 0 and when it is 0 (or less) it will accelerate to 30.

The problem here s that when a vehicle enters the track contact on the side road, if this sets the count up by 1, the vehicle will always stop. Unless it sets the count when leaving the contact, but for a longer vehicle that is too late.

I would appreciate constructive advice on how to solve this conundrum.

In the mean time I will have a go at "Total Junction Management" to see if it can be made to work, involving a separate counter for every possible direction a vehicle can turn, which may even result in realistic right turns that don't have trucks passing through each other.

Link to comment
Share on other sites

Hi Simon

I couldn't help but look through all the post regarding traffic management. This is something that I too have wrestled with for quite some time. Late last year I got an almost passable test layout, the junctions on the south side only thus far, but my methodology is somewhat cruder than yours,lack of knowledge in the finer points of EV. However it did seem to work to a point, then I lost the enthusiasm to finish it and used traffic lights instead, not ideal but it does control the traffic well.

I've attached my unfinished attempt just in case, with your expertise you are able to do something with it. Mix and Match I think is the phrase that springs to mind. If not then there's always the bin!!!

Regards

Pete

My attempt at T junctions (unfinished).mbp

Link to comment
Share on other sites

I wish you luck with the venture; I too have wrestled with this, only to come undone with the imprecise arithmatic of the MBS , as yet unexplained with conviction. To me (analyst programmer for decades, with several languages...), adding one, then subtracting one, must do the job. It would appear that there are other gremlins and/or demons at work that reduce this simplicity to neant. I, too, resorted to traffic lights, and the latest system published just a few days ago (from @Roter Brummer, Accident-free Crossings 2...), using compulsory 'stops' for all traffic works well, too, so I shall hunt this Dahu no longer. The exact placing of the track contacts, just before, just after, or precisely on the junction itself caused me many evenings I shall never recover; enough for me. I hesitate to recommend exorcism, or incantations naked on a dark mountain top... 9_9

Ich wünsche Ihnen Glück mit dem Unternehmen; Auch ich habe damit gerungen, nur um mit der ungenauen Arithmetik der MBS, die noch nicht erklärt wurde, mit Überzeugung zunichte gemacht zu werden. Für mich (analytischer Programmierer seit Jahrzehnten mit mehreren Sprachen ...) muss das Addieren von Eins und das Subtrahieren von Eins die Arbeit erledigen. Es scheint, dass andere Gremlins und/oder Dämonen am Werk sind, die diese Einfachheit auf Neant reduzieren. Auch ich habe auf Ampeln und das erst vor wenigen Tagen veröffentlichte neueste System (von @Roter Brummer, Unfallfreie Kreuzungen 2...) zurückgegriffen, mit vorgeschriebenen „Haltestellen“ für den gesamten Verkehr funktioniert auch gut, also werde ich diesen Dahu nicht länger jagen. Die exakte Platzierung der Gleiskontakte kurz vor, kurz nach oder genau auf der Abzweigung selbst hat mir viele Abende bereitet, von denen ich mich nie erholen werde; genug für mich. Ich zögere, Exorzismus oder Beschwörungen nackt auf einem dunklen Berggipfel zu empfehlen ...9_9

Link to comment
Share on other sites

I also wish you all the best. i published a (think so) working solution some days ago. The problem with wrong adding or subtracting seems to result in parallel events, both changing the value of a counter. In detail such an operation is parted in at least 3 single steps: a) get the actual value b) changing the temporary value +/-1 c) Store the result in the Counter. In a parallel process modifies the same counter After a) and before c) the counter gets a wrong value.

[edit:] Therefor i use two counters: one for incoming and one for leaving cars. If both counters have the same value it's the same if a single counter has value 0. In a layout i set all counters: incoming = incoming - outgoing and outgoing = 0.

more Details See (sorry, only german)

best wishes, wolfgang

Am 13.3.2022 um 18:10 schrieb prinz:

Hallo zusammen, besonders Andy und HaNNoveraNer,

Das Thema Abzweigung lässt mir keine Ruhe. Außerdem fehlt mir eine brauchbare Lösung für meine Anlagen. Deshalb hab ich nochmal von vorne angefangen. Dabei habe ich die Zähler auf die Hauptstraße begrenzt und Einfahr- und Ausfahrzähler getrennt. Hier gab es ja öfter das Phänomen, dass ein einzelner Zähler unerklärlicherweise einen falschen Wert hatte. Meine Vermutung: Wenn durch zwei Ereignisse (z.B. Einfahrt und Ausfahrt) derselbe Zähler verändert wird, kann es zu zeitlichen Überschneidungen kommen. Beim Verändern eines Zählers wird der Wert neu gesetzt aus dem alten Wert und einem Veränderungswert (+/- 1). Das heißt, die Operation besteht intern aus (mindestens) 3 Operationen: Alten Zählerwert holen, Wert verändern, Neuen Zählerwert speichern.

699637915_Abzweigneu.thumb.jpg.95c050af53b2c8f181e62cc1ed2cd61a.jpg

Zum Verständnis:
Die Bezeichnungen der Richtungen ergeben sich vom Abzweig her. Demzufolge ist der Teil der Hauptstraße rechts vom Abzweig die Hauptstraße rechts (HSTR rechts) und der Teil links vom Abzweig die Hauptstraße links (HSTR links). Der Abzweig selbst ist die Nebenstraße (NSTR).

Objekte mit Steuerungsfunktion:

Abzweig: Schlagwort Kreuzung, Enthält die Ein- und Ausfahrzähler sowie einige Objektreferenzen (Reservierungskontakte, Stop-Kontakte, Ausfahrkontakte).
Registrierkontakt: Ziel festlegen und im Fahrzeug speichern, ggf. Blinker setzen
Reservierungskontakt: Einfahrzähler erhöhen (nur auf Hauptstraße)
Ausfahrkontakt: Ausfahrzähler erhöhen, falls gesetzt. Blinker abschalten, nächstes Fahrzeug starten
Stop HSTR: Stopkontakt für Linksabbieger auf der Hauptstraße.
Stop NSTR: Stopkontakt für Fahrzeuge auf der Nebenstraße
Fahrzeuge: Optional Namen der Blinkeranimationen links/rechts
Fahrzeuge: Optional Bus: Fest vorgegebene Richtung

Bei mir trat bei der Abzweigung über eine längere Zeit im Schnelllauf keine Fehler auf.

Wenn ihr Lust und Zeit habt, überprüft das mal. Ergibt sich auch dann kein Fehler, kann ich die Beschreibung vervollständigen.

Die EV ist bereits darauf ausgelegt, dass man die Anlage importieren und Abzweige incl, der Kontakt kopieren kann, Deshalb waren an einigen Stellen Objektreferenzen notwendig, die das Lesen der EV erschweren. Die Steuerung passt auch die Abzweigungen mit abknickender Vorfahrt. Bei der Platzierung der Kontakte (Besonders Reservierungskontakte) muss man die richtige Entfernung zum Abzweig finden.

 

Abzweig neu.mbp 10 kB · 15 downloads

Viele Grüße

Wolfgang

 

 

 

 

Edited by prinz
Link to comment
Share on other sites

Seriously, the counters are not really the problem.

Just maker sure that there are more operations subtracting than adding, and after every subtraction set it to if it's negative.

This is a red herring , distracting everyone from the real issue:

Why do cars end up between tractor and trailer?

And is there any way of stopping this from happening?

Link to comment
Share on other sites

22 minutes ago, simonjackson1964 said:

Seriously, the counters are not really the problem.

Just maker sure that there are more operations subtracting than adding, and after every subtraction set it to if it's negative.

This is a red herring , distracting everyone from the real issue:

Why do cars end up between tractor and trailer?

And is there any way of stopping this from happening?

It's because there's a counter problem. 9_9

Es liegt daran, dass es ein Zählerproblem gibt. 9_9

Link to comment
Share on other sites

vor 12 Stunden schrieb simonjackson1964:

This is a red herring , distracting everyone from the real issue:

Why do cars end up between tractor and trailer?

This is a normal behavior in MBS. Look at this:junction1.thumb.jpg.b57024b7fbe30e887d1e53569ef33dab.jpg

If two trains are approaching the same junction and nothing will stop one of the trains, the following will happens:

junction2.thumb.jpg.4ea9522a4581e8e571649a25ebbab8ea.jpg

And that the same with tractors and trailers. So someone (--> you ) has to take control, that a car or even a truck with trailer only enters the junction, if it is allowed to. Means: if no other car blocks the track(s) for the entering car.

There some "leaks" in your events:

1. the track contacts (car in) are too near to the junction. The cars on the side road are blocked too late.
2. left turn from main road is allowed even if a car passes on the other track (left -> right)
3. "self healing" of the counter (counter < 0 ==> counter = 0) does not really solve the counter problem
4. right turn from main road blocks cars entering from side road to main road.

I'll try to solve these "leaks" in afternoon (if you like me to)

best regards

Wolfgang

 

 

Link to comment
Share on other sites

If you're looking to a simple solution for street crossings that works (but ignores some traffic rules): @Roter Brummer in Tutorials, Mini-Experimente mit V7

Am 2.4.2022 um 15:04 schrieb Roter Brummer:

Hallo zusammen,

es scheint so, als hätte ich eine einfache Lösung für eine unfallfreie Kreuzung gefunden.

Kreuzung unfallfrei.mbp 6 kB · 23 downloads

Einziges Manko: Alle Fahrzeuge müssen zunächst an der Kreuzung anhalten. Naja, es muss ja zuerst geprüft werden, ob niemand von rechts kommt:D

 

 

 

Link to comment
Share on other sites

53 minutes ago, simonjackson1964 said:

I've tried, honestly. But it gets too complicated for words with a counter for each route and conditions that have multiple "or" statements.

Personally I'd rather concentrate on the railways and just leave the roads empty!

Hi Simon

I might just have a solution which if all goes well I hope to be able to post tomorrow. So far all is running well. My EV is a bit long winded, compared to yours, it's a bit like comparing the encyclopedia Britannica with a lunch menu but I'm sure you'll be able to trim it down. and from that I'll learn a thing or two.

Pete

Link to comment
Share on other sites

10 hours ago, prinz said:

If you're looking to a simple solution for street crossings that works (but ignores some traffic rules): Roter Brummer in Tutorials, Mini-Experimente mit V7

 

 

That works, but is actually just traffic lights without the lights.

10 hours ago, 220hotwheels said:

Hi Simon

I might just have a solution which if all goes well I hope to be able to post tomorrow. So far all is running well. My EV is a bit long winded, compared to yours, it's a bit like comparing the encyclopedia Britannica with a lunch menu but I'm sure you'll be able to trim it down. and from that I'll learn a thing or two.

Pete

The problem with "trimming " the EV code is that I might "trim" something important!

Link to comment
Share on other sites

Okaaaaaay........

B18BF551-1677-4277-AE1B-6019275E4E4E

Try that! As far as I can tell it works perfectly 99% of the time, and the only glitch is when a small car is waiting to turn left into the side road, sometimes the car behind will "pass through" it, and this is because I don't know exactly where to put the stop contacts, so that they are on the correct route, but far enough back to stp the shortest vehicle while part of it is still on the joint route.

Does Germany have these road signs? I can't find them in the catalogue.

p-51936-warning-junction-on-right-sign.jpg.0266ce7914fc0aa365a381dd9ef1057c.jpg77159.jpg.9ad2da670c12ef13eb8de99d4e128da6.jpg

Versuch das! Soweit ich das beurteilen kann, funktioniert es zu 99% perfekt, und der einzige Fehler ist, wenn ein kleines Auto darauf wartet, nach links in die Seitenstraße abzubiegen, manchmal "passiert" das hintere Auto durch, und das liegt daran, dass ich nicht genau wissen, wo die Haltekontakte angebracht werden sollen, damit sie auf der richtigen Route sind, aber weit genug zurück, um das kürzeste Fahrzeug anzuhalten, während ein Teil davon noch auf der gemeinsamen Route ist.

Hat Deutschland diese Verkehrszeichen? Ich finde sie nicht im Katalog.

Link to comment
Share on other sites

Hallo / Hello Simon,

nein, diese Verkehrszeichen gibt es in Deutschland nicht.
No, these traffic signs do not exist in Germany.

VZ0301_1970.jpg.93ebdbd456a5e644059a6058cb6394ff.jpg

Es gibt nur dieses symmetrische Verkehrszeichen, das die Vorfahrt an genau dieser Kreuzung signalisiert.
There is only this symmetrical traffic sign that signals the right of way at exactly this crossing.

Viele Grüße / many greetings
BahnLand

Edited by BahnLand
Link to comment
Share on other sites

Hi BahnLand

Thanks. I had a feeling that might be the case, that's the sign I used on my test track (just for completeness).

Vielen Dank. Ich hatte das Gefühl, dass das der Fall sein könnte, das ist das Zeichen, das ich auf meiner Teststrecke verwendet habe (nur der Vollständigkeit halber).

Link to comment
Share on other sites

Hi Simon

As I mentioned yesterday, here is my attempt at solving the T junction problem. I too have experienced the squishing problem. At Jn02 the poor red porsche can, at times be totally squished by the following vehicle and my solution is to continue to move the stop TC back just a touch to try to solve this problem.

I'll take a look at your solution now, no doubt much briefer as far as the EV is concerned so let's see what I can learn from that.

Cheers

Pete

T junction trial layout-copy.mbp

Link to comment
Share on other sites

2 hours ago, simonjackson1964 said:

I'm in the process of transposing it into my work-in-progress layout

Hi Simon

Just taken a brief look at your solution. As I suspected your EV is definitely a lunch menu compared to my encyclopedic solution. Now I need to try to absorb how you achieved such simplicity and see if I can adapt such thinking to my test layout. Your solution works very well, most impressive although with mine I have tried to emulate a more natural approach and exit at the junctions although with today's traffic you are perhaps more accurate!!!

Cheers

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...