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

Disable pedestrian crossing if adjacent roads have no pedestrian lanes #1302

Open
Elesbaan70 opened this issue Jan 22, 2022 · 10 comments · May be fixed by #1558
Open

Disable pedestrian crossing if adjacent roads have no pedestrian lanes #1302

Elesbaan70 opened this issue Jan 22, 2022 · 10 comments · May be fixed by #1558
Labels
enhancement Improve existing feature JUNCTION RESTRICTIONS Feature: Junction restrictions Pedestiran Crossing

Comments

@Elesbaan70
Copy link
Contributor

Elesbaan70 commented Jan 22, 2022

Describe the problem

A junction that has no pedestrian lanes on any of its segments is still set to allow pedestrian crossings by default.

Steps to reproduce

View the junction restrictions of a highway junction with no pedestrian lanes, and note how pedestrian crossings are allowed.

Expected behavior

When the junction has no pedestrian lanes on any of its segments, pedestrian crossings should be disabled by default. If pedestrian lanes are introduced into a junction that is in this state, the pedestrian crossings should be automatically enabled at that time.

Why does this matter?

I want to create highway ramps for Adaptive Networks that will show crosswalks when they cross roads that allow pedestrians. As it stands now, I cannot do this using AN's ZebraCrossing flag because this would be a significant nuisance for the player, who would have to go through and disable them at every highway junction.

Possible alternative solutions

Adaptive Networks could introduce a node flag that indicates whether the node has pedestrian lanes on any of its segments. I'm tempted to say it could just never set the ZebraCrossing flag unless there are pedestrian lanes present, but I really think that flag should always mirror the junction restriction settings.

Screenshots?

This screenshot demonstrates the behavior I want for my highway ramp when it crosses a city street:

image

This screenshot demonstrates the problem it causes for highway junctions, due to the default junction restriction being wrong:

image

@Elesbaan70 Elesbaan70 added BUG Defect detected triage Awaiting issue categorisation labels Jan 22, 2022
@Elesbaan70
Copy link
Contributor Author

Elesbaan70 commented Jan 22, 2022

Turns out it was stupid-easy to implement a flag in AN as described above. If the pull request is accepted, I will close this. 🙂

kianzarrin/AdaptiveNetworks#18

@originalfoo
Copy link
Member

originalfoo commented Jan 22, 2022

To summarise: Ped crossing on a segment entering junction should be disabled if adjacent roads don't have ped lanes. ?

@Elesbaan70
Copy link
Contributor Author

Right. Or alternatively, rely on the change I made in AN, if @kianzarrin will accept it, and if changing it in TM:PE is too much work.

@originalfoo originalfoo changed the title Junction restrictions allow pedestrian crossing when there are no pedestrian lanes Disable pedestrian crossing if adjacent roads have no pedestrian lanes Jan 22, 2022
@originalfoo originalfoo added enhancement Improve existing feature JUNCTION RESTRICTIONS Feature: Junction restrictions Pedestiran Crossing and removed BUG Defect detected triage Awaiting issue categorisation labels Jan 22, 2022
@Elesbaan70
Copy link
Contributor Author

Elesbaan70 commented Jan 22, 2022

Three additional points on this:

  1. It's important to note that simply disabling the option is not enough. It also needs to default to reporting crossings as disallowed when the option is disabled.

  2. Even one road with pedestrian lanes is enough for crossings to be enabled--at least for that one road. Consider the scenario where a road with pedestrian lanes ends at a node where none of the other roads have them. A pedestrian's shortest path across the road may be through that node, so the road still needs to allow crossings by default in that case.

image

  1. One advantage fixing this in TM:PE has over my AN flag-based solution is that TM:PE is better positioned to selectively enable crossings based on pedestrian paths that make sense. For example, consider the edge case in the image below, where crossings over the ramps don't make sense. It makes sense to only enable them for the local streets in this case. But this kind of selective enabling is just a nice-to-have, not a core part of change I'm requesting.

image

@kianzarrin
Copy link
Collaborator

I think there is another more generic issue regarding this.

@Elesbaan70
Copy link
Contributor Author

You might be thinking of #1231. I think it's worth keeping this issue around to document use cases and it matters, and their specific requirements.

@originalfoo
Copy link
Member

Tagging #854

@Elesbaan70
Copy link
Contributor Author

@aubergine10, the more I think about this, the more I'd love to see this implemented in TM:PE, including the selective disabling part.

You may recall a discussion we had some time back about asymmetrical pedestrian lanes. I really thought I created an issue for it, but I can't find it anywhere. So a quick recap: The traffic AI does not support only providing a pedestrian lane on one side. If you do this, then pedestrians ignore stoplights to get to the side of the road that has the pedestrian lane. To work around this limitation, you have to make the unwanted lane useless by disabling as many crossings connected to it as you can, like this screenshot from my Access Roads:

image

If TM:PE were selectively disabling crossings at segment ends where they "don't make sense," it could be leveraged to resolve this limitation. It would go something like this:

  1. TM:PE has this hypothetical logic that just completely disables a crossing if no pedestrian would reasonably use it to cross the node.
  2. In Adaptive Networks we add a "node traversal only" toggle to lanes.
  3. TM:PE examines the "node traversal only" flag and if it is true, then certain crossings which connect that lane get disabled. I think I already know what the rules would be, but for brevity I won't go into that here unless you want all that.
  4. Additionally, TM:PE would probably need to disable such crossings at node types such as middle nodes, which I'm guessing it doesn't touch at all right now.

@kianzarrin
Copy link
Collaborator

Maybe we should not apply the rule above if there are more than 2 pedestrian lanes.

image
for example on tram roads ppl need to get from the stops to the sides if there are tram stops near intersection A.

but one can argue they won't need to get to the sides on intersection A and need to get to the sides on intersection B so let them walk all the way to there instead.

In the image bellow they would be trapped if there are no pedestrian crossings:
image

@Elesbaan70
Copy link
Contributor Author

#1558 enables all crossings by default in each of your examples.

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 Pedestiran Crossing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants