Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority signs should affect 'Enter blocked junction'? #424

Open
originalfoo opened this issue Jul 10, 2019 · 14 comments
Open

Priority signs should affect 'Enter blocked junction'? #424

originalfoo opened this issue Jul 10, 2019 · 14 comments
Labels
enhancement Improve existing feature JUNCTION RESTRICTIONS Feature: Junction restrictions PRIORITY SIGNS Feature: Stop / Yield / Priority signs Usability Make mod easier to use

Comments

@originalfoo
Copy link
Member

When setting priority signs, it would be nice if they could affect the "Enter blocked junction" setting either automatically (via mod option) or with keybind modifier.

  • Priority segment = allow enter blocked junction
  • Yield / Stop segment = deny enter blocked junction
@originalfoo originalfoo added feature A new distinct feature triage Awaiting issue categorisation enhancement Improve existing feature Usability Make mod easier to use and removed feature A new distinct feature triage Awaiting issue categorisation labels Jul 10, 2019
@originalfoo originalfoo changed the title Set priority segments to allow vehicles to enter blocked junction Priority signs should affect 'Enter blocked junction' setting? Jul 10, 2019
@originalfoo originalfoo changed the title Priority signs should affect 'Enter blocked junction' setting? Priority signs should affect 'Enter blocked junction'? Jul 10, 2019
@originalfoo
Copy link
Member Author

Brain: Why even have 'enter blocked junction' when we have priority signs?

Also brain: No idea.

Also brain: Why not merge priority signs in to junction restrictions, and ditch the 'enter blocked junction' thing?

@Rafario448
Copy link

Isn't "(don't)enter blocked junctions" a more CPU lightweight option than TMPE priority signs since it's something that is in the vanilla game?

At least that's the exact reason why I preffer to just use this setting instead of priority Signs in my roundabouts lol.

@originalfoo originalfoo added JUNCTION RESTRICTIONS Feature: Junction restrictions PRIORITY SIGNS Feature: Stop / Yield / Priority signs labels Aug 11, 2019
@kianzarrin
Copy link
Collaborator

In a 4 way junction with priority signs people on the major road should not want to enter blocked junctions for people on the minor road to be able to go into directions that is not blocked.
ideally software can automatically understand if we should enable entering blocked junctions according to common situations, though I suspect its going to be really hard considering people have all sort of custom junctions.

@brunoais
Copy link

brunoais commented Nov 4, 2019

I agree with kianzarrin.
I use priority signs and "can enter in blocked junctions" differently depending on multiple factors, including what rafamariofan and kianzarrin said together. Please don't take that away.

As for the feature that is suggested here... I have doubts!
If I have a 3 lane road with L/S/R directions on each lane, going to a 4-way intersection. Only the turning left has to wait because too much traffic, the others could cross right away... Keeping this one can lead all lanes to be blocked because the traffic in the main road is just there waiting on the way and the other cars are blocking the whole block.
I think that can be a very bad thing™ for people who are not expecting it.

However, if you want to activate such feature in situations where it does help (1 lane road to intersection, instead of 2+ lane road), then it's fine for me.

@originalfoo
Copy link
Member Author

originalfoo commented Nov 13, 2019

Isn't "(don't)enter blocked junctions" a more CPU lightweight option than TMPE priority signs since it's something that is in the vanilla game?

The feature in vanilla is the "Stop" sign (traffic routes > junctions info view) - and we already have that covered in TM:PE priority signs. So the "don't enter blocked junctions", as far as I know, isn't even part of vanilla.

Vanilla essentially has two signs: Yield (default) and Stop. The priority routes feature in vanilla, as far as I can tell, has two purposes:

  1. It automatically adds stop signs for side roads at junctions (which is often very annoying)
  2. It tells snow ploughs which roads to prioritise for snow clearing (I've still never played a Snow biome map so not sure if that's correct)

In a 4 way junction with priority signs people on the major road should not want to enter blocked junctions for people on the minor road to be able to go into directions that is not blocked.

Isn't that what TM:PE priority signs are for? The Priority/Yield/Stop sign (default: Yield) for each segment at the junction controls how traffic should enter the junction (however, see additional note below).

ideally software can automatically understand if we should enable entering blocked junctions according to common situations, though I suspect its going to be really hard considering people have all sort of custom junctions.

Any lane that would cross oncoming traffic (eg. left or right turn depending on what side of road cars drive on) should always yield to avoid collisions. That's a "road rule" that applies everywhere: Don't crash in to other cars. So that should be baked in to the priority sign logic - it shouldn't require is to fiddle with "enter blocked junction" stuff.

For complex junctions we could use conflict point detection (see #4 for details) to determine which lanes must yield at the junction.

If I have a 3 lane road with L/S/R directions on each lane, going to a 4-way intersection. Only the turning left has to wait because too much traffic, the others could cross right away... Keeping this one can lead all lanes to be blocked because the traffic in the main road is just there waiting on the way and the other cars are blocking the whole block.

See my comments above. The yielding when crossing oncoming traffic should be baked in to priority sign logic. We shouldn't have to fudge it with "allow enter blocked junction" stuff.

Also, I think the whole implementation of "allow enter blocked junction" is wrong in TM:PE. It shouldn't be defined segment by segment (we have Priority/Yield/Stop signs for that), it should be defined in the junction node. I can't speak for other countries, but in UK we have this:

image

So on a normal junction, everything is handled by priority rules. But some super-busy junctions, which can lead to gridlock if they get blocked, have that extra "keep this junction clear" rule (the yellow hash pattern on the road).

I think all too often users are using "enter blocked junction" feature as a weird alternate to priority/yield/stop signs. For good traffic flow, generally speaking, vehicles should be able to enter junctions if they are clear (ie. default of Yield for all roads entering a junction, unless user defines otherwise).

There are some cases where you want to keep junctions clear of stagnant traffic, most notably level crossings (or busy junctions like the image above). But in those cases the "enter blocked junction" setting applies to the junction itself, not the roads entering the junction.

My suggestion is therefore:

  1. Improve the Priority/Yield/Stop signs to be 'conflict point'-aware, and yield intelligently for lanes that would cross other traffic
  2. Retire existing "enter blocked junction" feature
  3. Add new "Keep junction clear" feature, which applies to the node, in the Priority Signs (or junction restrictions?) UI.
  4. Level crossings would automatically get "keep junction clear" (for freaking obvious reasons), and maybe junctions with tram routes too? User could still override on junction by junction basis.

If even more control is required, traffic lights should be used to fully control traffic across the junction. There's a bunch of other stuff too, see #46 and #63

@originalfoo
Copy link
Member Author

originalfoo commented Nov 13, 2019

Some other thoughts:

  • Box junctions (image above) are just a hacky way of dealing with symptoms which manifest in the road network due to problems elsewhere
    • It's generally best idea to find the root problem, and deal with that at source (which in many cases could simply be providing better public transport)
    • Sometimes fixing the root problem would be too much grief (eg. requiring buildings to be destroyed or excessive road works), so it's easier to apply the "keep junction clear" hack
    • Also, sometimes retaining the root problem is beneficial to keep rest of system stable; a known constraint is better than an unknown constraint - eg. "Herbie" in Theory of Constriants
  • There is sometimes benefit to allowing vehicles to enter blocked level crossing, in cases where it's close to train station and there are multiple tracks to cross (see also: Merge close-proximity level crossings. #11)

@originalfoo
Copy link
Member Author

originalfoo commented Apr 27, 2020

Maybe an enum at the node could define traffic behaviour through the node?

For junction nodes:

Priority signs then define who has right of way when entering junction. Traffic Lights override priority signs, but could be affected by them (eg. priority route gets more green time or more beneficial flow ratios etc).

For other node types:

@kianzarrin
Copy link
Collaborator

kianzarrin commented Apr 27, 2020

It is true that users get confused by enter blocked junction. I know I did. But this problem is soon diminished when we allow users to setup intent. Intent can be used for generic stuff and for more advanced users who like flexibility they can micro manage a bit more for all the crazy junctions they have.

@aubergine10 I think this is a bad idea to take that flexibility away. We should let the user decide to enter blocked junctions or not on a segment end by segment end basis. TMPE users like flexibility. To automatically decide to enter blocked junctions or not can be complicated. If we are going to take that flexibility away from the user then: Either do it perfect or don't do it at all.

I am worried that this is going to be a repeat of the highway rules mistake that people don't use because they don't like extra restrictions.

I also think that the code for enter blocked junction can improve (EDIT: created #871). for example consider a big highway roundabout. once I disable enter blocked junctions, cars entering the roundabout wait for the junction to be clear before entering. This happens even if traffic is flowing fast. I think if traffic is flowing fast there is no need for cars entering the roundabout to wait a little bit longer. For this reason in my highway roundabouts, I generally set enter blocked junction for yielding cars entering the roundabout. The traffic just flows faster that way. for my urban roundabouts yielding cars cannot enter blocked junctions.

So we need to solve some problems including the one I mentioned above to abolish enter blocked junctions and I think we are no where near ready. Also I think its not worth the time specially considering that the intent feature is coming.

@kianzarrin
Copy link
Collaborator

Also, I think the whole implementation of "allow enter blocked junction" is wrong in TM:PE. It shouldn't be defined segment by segment (we have Priority/Yield/Stop signs for that), it should be defined in the junction node. I can't speak for other countries, but in UK we have this: [box junction]

@aubergine10 this is in contradiction to another thing you said:

Any lane that would cross oncoming traffic (eg. left or right turn depending on what side of road cars drive on) should always yield to avoid collisions. That's a "road rule" that applies everywhere: Don't crash in to other cars. So that should be baked in to the priority sign logic - it shouldn't require is to fiddle with "enter blocked junction" stuff.

So first you say enter blocked junction belongs to node where it can be modified manually. Then you say it belongs to segment end but should be automatic.
can think of situations where some cars can enter blocked junction and some cars cannot. for example T junctions:
Screenshot (934)

Again making it automatic is a do it perfect or don't do it at all thing.

@originalfoo
Copy link
Member Author

In the image above, it shows another issue we have - the priority signs should factor in 'does this lane cross traffic'. A similar connundrum is discussed in #565.

@originalfoo
Copy link
Member Author

For anyone following this issue #424 please go take a look at the awesome stuff being worked on in #1229 (specifically the videos near bottom of that issue) - very significant improvements to both normal junctions, and also those with priority signs.

Example of normal junction with turning lane - no priority signs, etc., just junction with lane-arrow based turning lane:

2022-02-06.21-52-53.mp4

@brunoais
Copy link

brunoais commented Feb 8, 2022

@aubergine10 What's that mod for traffic scenario? It would be great for my junction testing as I'm experimenting with different junctions

@krzychu124
Copy link
Member

It's my internal mod for testing. I plan to release it as a debug tool but for now... it's just never-ending sandbox where I throw my prototypes and ideas.

@brunoais
Copy link

brunoais commented Feb 8, 2022

@krzychu124 Thanks for sharing that. When you are comfortable enough, I'll make time to test it and also to test my own stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature JUNCTION RESTRICTIONS Feature: Junction restrictions PRIORITY SIGNS Feature: Stop / Yield / Priority signs Usability Make mod easier to use
Projects
None yet
Development

No branches or pull requests

5 participants