-
Notifications
You must be signed in to change notification settings - Fork 85
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
add automatic timed traffic lights #540
Comments
please assign to me. |
If possible:
|
@aubergine10
of course!
there are no priority signs when there is traffic lights. so nothing to do here. U turns are same as left turns.
lane arrows will be separated using code from #537 . Lane connectors are too complicated for what I had originally in mind. I just wanted something simple and effective. people always can make further modifications. If you have something cool in mind though I am totally up for it! adding lane connectors all over is going to create a big mess. furthermore if the next junction is too close we should avoid lane connections and let cars choose their lane. Taking the amount of traffic on each lane into account might also be a good Idea but it may prove to be too difficult. I will see what I can do. |
TMPE has existing option to factor in the TMPE priority signs at traffic lights: Vehicles follow priority rules at junctions with timed traffic lights on Policies tab in mod options. For example, priority signs could tell the default traffic light config which 'route' gets prioritised at the junction, The order of priority would be:
If no priority signs are checked, road UI category (or number of lanes or speed?) could be used to determine prioritisation of routes entering the junction?
Agreed. We can add extra features later (including the stuff about prioritisation I mentioned above). |
if would be a good idea to create automatic timed traffic lights for multi nodes like a green wave #278 or something. but not in this issue. Now I need to handle cases where its 3 segments or 5 or more segments. they all use the same concept though. one side can go at a time, the road to its right can only turn right. also there are one way roads I need to consider. Ideas are welcome! |
And I WILL remember to separate turning lanes as necessary by the timed traffic lights. its a good thing I have a code for that already! |
It is not a good idea to have a mode that bans left turns. for that simple traffic light would do just fine. |
I think that default you made is quite sensible and provides a good start. Also, |
As I said before:
so yeah timer traffic light is unnecessary when left turns are banned. Just use a default one. |
Alright. Fair enough. I still think that when two have banned left turns and, for example, there's 2 more without banned left turns, this could still be useful... Specially because of pedestrians. |
I also was thinking of the template thing :) If there is only two segments that ban left turns I recommend: 2- use templates. The built-in ones can even modify lane arrows. 3- ban left turns then use the default timed traffic lights. I can add a feature to read lane arrows and use them as guideline for creating timed traffic lights. I don't recommend this: Edit: I'd like to do the advanced features in a separate review. |
I like these two:
As for:
Sure thing! Get this sorted out and I will be waiting for the followup PR \o/ |
@kianzarrin Don't invest too much work into making the UI pretty, the UI will be reviewed and reworked, possibly already this year. Make the simplest UI changes as much as possible. |
I am not touching the UI at all. I am almost done with this. In debug mode its a bit slow. but even in release mode and in extreme cases it can take a moment(half a second) to insert the custom traffic lights. I did some tests to determine what is slowing it down: my code or the interface. So I disabled most of my code (so that it just puts traffic lights without calculations) and felt no improvement in speed. So the interface is to blame. |
Feature ideas: |
Wiki documentation: Quick setupAre you not interested in spending ages to setup a timed traffic light? Do you hate traffic jams? Then don't worry ... you CAN have it both ways! Just press CTRL-click on a junction and TMPE creates a basic timed traffic light on that junction for you:
|
Thanks for the docs :) Few questions:
I assume they need the timed traffic lights tool active for that to happen?
Please elaborate. Are you referring to the left segment of the main road? And if so, does that only apply at t-junctions? Or is it something else? |
@aubergine10
Isn't that implied since this is going to be in the page for timed traffic light tool?
I replaced 'road' with 'entry to the junction' to avoid confusion. I didn't use the term segment because I think its to low level (computer level) of a concept which should be hidden from user. If you think I should use segment instead please tell me. Entry though might be more accurate since segments without entries to the junction do not get a traffic light
In the example pictures I have demonstrated how it works both for cross junction and T junction The real logic is: Unfortunately I did not mange to find a way to explain this in plain language to the user so I decided to show it in the pictures. |
Not when there's three different tools with a traffic light icon on the TM:PE menu bar. ;) It needs stating explicitly (from docs perspective). In the UI a contextual mention can be made in the button tool tip and/or the adviser text that appears when button is first clicked.
Generally, I would agree, however in C:SL community it does seem that segment is a widely understood term. While it's a mid-level term, which is also used at low-level (code), remember that users build their roads segment by segment so they are already familiar with concepts such as nodes and segments. I think where it becomes too low-level is when we have to start differentiating between different kinds of segments and, in particular, nodes. But even there we will still have to expose users to some of the more advanced terminology to comprehend functionality where necessary. To that end, I've been chipping away at a glossary of terms for nodes, segments, lanes.
Pictures are always the best choice so keep doing that 👍
|
This is awesome!! Would close #5 i think. |
I suspect this would cover a lot (if not all?) of what is in #324 as well. Regarding making it default: Currently this is using TM:PE timed traffic lights, which are heavier than vanilla in terms of computations required. If it works well in practice, we could maybe look at hard-coding a sequence somehow so that it would be fast enough to use by default. |
Im wondering, if i change lane connectors or lane arrows after this, will it automatically adjust? And how about segment upgrading to another type of road? |
people spend a tone of time to add timed traffic lights. i suggest to add a default time traffic lights which allows one road to go through at a time and automatically modifies the turning lanes all with one click would be a massive help.
The text was updated successfully, but these errors were encountered: