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

T Junctions don't seem to have u-turns occur #347

Closed
SubaruSVX opened this issue May 31, 2019 · 4 comments · Fixed by #1212
Closed

T Junctions don't seem to have u-turns occur #347

SubaruSVX opened this issue May 31, 2019 · 4 comments · Fixed by #1212
Assignees
Labels
BUG Defect detected JUNCTION RESTRICTIONS Feature: Junction restrictions U-Turn
Milestone

Comments

@SubaruSVX
Copy link

Description

Perhaps I can use better words, but when I put in a metro station with several parking garages, all the cars seem to have a rather peculiar habit of doing a loop, even when the u-turns policy is enabled.

Reproduction Steps

Add more steps as nessecary.

  1. Select any T-Junction on the game (preferably with the six-lane roads)
  2. Allow the policy for u-turns to be enabled
  3. Watch.

Mod List

Please list the mods enabled when you noticed the bug.

config SubaruSVX.docx

Output Log

Player.log

Savegame (Optional)

https://steamcommunity.com/sharedfiles/filedetails/?id=1736078702

Screenshots (Optional)

Screenshot 11
Screenshot 12
Screenshot 13
Screenshot 14
Screenshot 15

@SubaruSVX SubaruSVX added BUG Defect detected triage Awaiting issue categorisation labels May 31, 2019
@originalfoo
Copy link
Member

Plain text mods list:

config SubaruSVX's Mod List

### mods list ###

Hard Mode (ID=18446744073709551615)                         deactivated
Unlimited Money (ID=18446744073709551615)                   activated
Unlimited Oil And Ore (ID=18446744073709551615)             activated
Unlimited Soil (ID=18446744073709551615)                    activated
Unlock All (ID=18446744073709551615)                        deactivated
Employ Overeducated Workers V2 (ID=1674732053)              activated
Network Skins (ID=543722850)                                activated
Prop Snapping (ID=787611845)                                activated
Los Santos Rock Radio (ID=1564632871)                       activated
Metro Overhaul (ID=816260433)                               activated
Train Converter (ID=795514116)                              activated
Prefab Hook (ID=530771650)                                  activated
Advanced Stop Selection (ID=1394468624)                     activated
Non Stop Pop FM (ID=1563236161)                             activated
Ambient Sounds Tuner (ID=818641631)                         activated
Rebalanced Industries (ID=1562650024)                       activated
Tiny Segments 2.0 (ID=1586027591)                           activated
Plop The Growables (ID=924884948)                           activated
BigCity (ID=1270675750)                                     activated
Vehicle Wealthizer 1 (ID=1633580257)                        deactivated
Klyte Commons 1.1.6 (ID=1312735149)                         deactivated
First Person Camera (ID=650805785)                          activated
CSL Music Mod (ID=422934383)                                activated
Pollution Solution (ID=1263262833)                          activated
Airport Roads 1.3.7 (ID=465127441)                          activated
Unlock All + Wonders & Landmarks (ID=458519223)             activated
Better bulldoze Tool (ID=417965096)                         activated
Surface Painter (ID=689937287)                              activated
Automatic Bulldoze v2 (ID=639486063)                        activated
Find It! 1.5.4 (ID=837734529)                               activated
Network Extensions 2 (ID=812125426)                         activated
Prop & Tree Anarchy (ID=593588108)                          activated
Extra Landscaping Tools (ID=502750307)                      activated
Fine Road Anarchy 1.3.5 (ID=802066100)                      activated
Fine Road Tool 1.3.7 (ID=651322972)                         activated
Precision Engineering (ID=445589127)                        activated
More Effective Transfer Manager (ID=1680840913)             activated
Favorite Cims v0.3.1b (ID=426460372)                        activated
Move It 2.4.1 (ID=1619685021)                               activated
No Park Building Fires (ID=1718245521)                      activated
AST: KRA Sound Pack (ID=618536610)                          activated
TM:PE 10.20 (ID=1637663252)                                 activated
Empty It! (ID=1661072176)                                   activated
Achieve It! (ID=1567569285)                                 activated
Real Time (ID=1420955187)                                   activated
Advanced Vehicle Options 1.8.5 (ID=1548831935)              activated
Cargo Hold Fix (ID=1721492498)                              activated
WG Citizen Lifecycle Rebalance v2.6 (ID=654707599)          activated
WG Realistic Population v8.4.0 (ID=426163185)               activated
Show It! (ID=1556715327)                                    activated
Hide It! (ID=1591417160)                                    activated
Service Vehicle Selector 2 (r4.0.2) (ID=934994075)          activated
Improved Public Transport 2 [r4.3.1] (ID=928128676)         activated
Loading Screen Mod (ID=667342976)                           activated

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented May 31, 2019

Some ideas:

  • U-turns are treated as 2 lane changes. Multiple lane changes are penalized heavier than single ones. So cars might prefer to take a small detour instead of performing a u-turn. (You can change the number of accounted lane changes in the TMPE_GlobalConfig.xml file:
    grafik
  • U-turns can only happen if there is a left-pointing (RHD) / right-pointing (LHD) lane arrow
  • Cars must be able to reach the turn lane. Check whether there are sufficient lane changing points in front of the turn lane.

@originalfoo
Copy link
Member

@VictorPhilipp Is that UTurnLaneDistance used for all u-turns, regardless of node type?

Maybe it should be:

  • Terminal node: 0 (cul-de-sac)
  • Junction node: UTurnLaneDistance
  • Transition node: 1 + UTurnLaneDistance

@originalfoo originalfoo added awaiting feedback More information required and removed triage Awaiting issue categorisation labels Jun 7, 2019
@originalfoo originalfoo added JUNCTION RESTRICTIONS Feature: Junction restrictions and removed awaiting feedback More information required labels Aug 11, 2019
@kianzarrin
Copy link
Collaborator

kianzarrin commented Dec 2, 2021

2 relevant lines of code (I have simplified the code in my branch but its effectively the same):

1- here U-turn routing of type LaneEndTransitionType.Default happens if it is a junction with 2 segments but not when it is a junction with 3 segments.

bool canTurn = !nextIsRealJunction || nextIsEndOrOneWayOut || hasFarTurnArrow;

note nextIsRealJunction = nextNode.CountSegments() >= 3

2- this line is reached for T junction with right turn. only relaxed vehicles can do u-turn.
EDIT: this is only for when the lane is not inner most lane.

LaneEndTransitionType.Relaxed; // TODO : normal when u-turn allowed

EDIT:
So basically what this means is we have the picture bellow:
image
an orange relaxed u-turn routing on one side and a green default u-turn routing on the other side

EDIT2: How to test my theory:
We can use bus stops to see if u-turn is possible. By using the "Buses may ignore lane arrows" policy we can test relaxed/default lane routings.
Buses may Ignore lane arrows policy = off
image
image

Buses may Ignore lane arrows policy = on
image

@kianzarrin kianzarrin self-assigned this Dec 2, 2021
@originalfoo originalfoo added this to the 11.6.2 milestone Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected JUNCTION RESTRICTIONS Feature: Junction restrictions U-Turn
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants