CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
563 stars 85 forks source link

bus line path problem #1751

Closed hellas2000 closed 10 months ago

hellas2000 commented 1 year ago

Describe the problem

In order to locate the problem, I started a new city, make the road grid like this: https://steamcommunity.com/sharedfiles/filedetails/?id=2992863697 A more closer screenshot: https://steamcommunity.com/sharedfiles/filedetails/?id=2993063305

First, without TMPE subscribed, I build a bus line like this (there are at least 3 blocks between bus stations): https://steamcommunity.com/sharedfiles/filedetails/?id=2992863842

Then, with TMPE subscribed, the bus line become like this(may need some time, or just rebuild this bus line): https://steamcommunity.com/sharedfiles/filedetails/?id=2992869019

It is obviously not right. I didnt activative the "Advanced Vehicle AI". So if I understand right, the "path finding" should be the same with vanilla game, but now it has changed. Is this a bug?

My TMPE Options are like these: https://steamcommunity.com/sharedfiles/filedetails/?id=2992869212 https://steamcommunity.com/sharedfiles/filedetails/?id=2992869440 https://steamcommunity.com/sharedfiles/filedetails/?id=2992869541

Steps to reproduce

  1. start a new city
  2. draw road grid like this: https://steamcommunity.com/sharedfiles/filedetails/?id=2992863697 https://steamcommunity.com/sharedfiles/filedetails/?id=2993063305
  3. build a bus line like this (there are at least 3 blocks between bus stations):https://steamcommunity.com/sharedfiles/filedetails/?id=2992863842

Log files

Savegame?

Screenshots?

Notes or questions?

Ruslank122 commented 1 year ago

It's most likely that TMPE forces the right lane to be right-turn only, while vanilla doesn't, so it changes the route

krzychu124 commented 1 year ago

Two question to the setup, just after looking on lane configuration

image

If the answer is NO on both of those questions then the path calculated by TM:PE is the shortest possible, considering traffic rules you've set up🙂

hellas2000 commented 1 year ago

It's most likely that TMPE forces the right lane to be right-turn only, while vanilla doesn't, so it changes the route

A strange thing, if there are 3 blocks between stations there is the wrong route. If there are 2 blocks between them, buses will go straight forward like what we want.

hellas2000 commented 1 year ago

Two question to the setup, just after looking on lane configuration

image

* are vehicles allowed to change lanes moving straight at intersection marked with **green** circle?

* are vehicles allowed to do u-turns at intersection marked with **red** circle?

If the answer is NO on both of those questions then the path calculated by TM:PE is the shortest possible, considering traffic rules you've set up🙂

After started the new city, I didn't make any mark with TMPE. The rules should be the default, which are no for both of your questions.

And when I try it, if there are 3 blocks between stations there is the wrong route. If there are 2 blocks between them, buses will go straight forward like what we want.

You can have a try, its easy to reproduce.

krzychu124 commented 12 months ago

After started the new city, I didn't make any mark with TMPE. The rules should be the default, which are no for both of your questions.

So the answer on my question is: YES. I mean, you even shown on screenshot that options:

Additionally you've said that you didn't make any adjustments to roads which means that mentioned settings are not overriden and they are fully controlling pathfinding.

Here enabled U-turn on the left and enabled "lane change at junction" on the right. Both with help of TM:PE Junction Restrictions tool.

image

You have two options to solve "the problem":

Summarizing, pathfinding works exactly as expected, within the set of rules were set. Vanilla is not as restrictive (doesn't care about such cases and also you don't really have a control), while TM:PE provides a way to control things and follows exactly what was set by the user - it doesn't care (to a certain point) if the rules are correct or even make sense since the mod cannot read the user mind, so it gives full control and responsibility of rules they set.

hellas2000 commented 11 months ago

You have two options to solve "the problem":

* enable U-turns and lane change at junction globally (via options screen settings)

* use TM:PE tools and "mark" junctions where vehicles may change lanes or perform U-turns.

Summarizing, pathfinding works exactly as expected, within the set of rules were set. Vanilla is not as restrictive (doesn't care about such cases and also you don't really have a control), while TM:PE provides a way to control things and follows exactly what was set by the user - it doesn't care (to a certain point) if the rules are correct or even make sense since the mod cannot read the user mind, so it gives full control and responsibility of rules they set.

I enabled the 2 options, now the bus line looks like this: https://steamcommunity.com/sharedfiles/filedetails/?id=3004677287 also the road layout and lane arrows can be seen in this: https://steamcommunity.com/sharedfiles/filedetails/?id=3004677571

I think it worth a investigation that this wrong bus line only happened when there are 3(or more) blocks between stations, if there are 2 blocks between stations(nothing else changed), it looks good. https://steamcommunity.com/sharedfiles/filedetails/?id=3004682398

krzychu124 commented 11 months ago

You have two options to solve "the problem":

* enable U-turns and lane change at junction globally (via options screen settings)

* use TM:PE tools and "mark" junctions where vehicles may change lanes or perform U-turns.

Summarizing, pathfinding works exactly as expected, within the set of rules were set. Vanilla is not as restrictive (doesn't care about such cases and also you don't really have a control), while TM:PE provides a way to control things and follows exactly what was set by the user - it doesn't care (to a certain point) if the rules are correct or even make sense since the mod cannot read the user mind, so it gives full control and responsibility of rules they set.

I enabled the 2 options, now the bus line looks like this: https://steamcommunity.com/sharedfiles/filedetails/?id=3004677287 also the road layout and lane arrows can be seen in this: https://steamcommunity.com/sharedfiles/filedetails/?id=3004677571

I think it worth a investigation that this wrong bus line only happened when there are 3(or more) blocks between stations, if there are 2 blocks between stations(nothing else changed), it looks good. https://steamcommunity.com/sharedfiles/filedetails/?id=3004682398

Ok, so the problem occurs only if you don't enable Advanced AI and TBH, if you use TM:PE to improve AI and pathfinding the option Advanced AI should be always enabled, otherwise significant improvements provided by the mod in pathfinding and AI behaviour will not work, so vehicles will behave more or less like in vanilla e.g.: vehicles won't use many lanes, won't change lane if the lane of original path is congested (while there are better options) and other vanilla issues.

hellas2000 commented 10 months ago

Thank you for your detailed answer, after enabled the "Advanced AI", it's ok now.

And I have found a potential bug, it is described here: https://github.com/CitiesSkylinesMods/TMPE/issues/1754

Further more I have a feather request, please have a look: https://github.com/CitiesSkylinesMods/TMPE/issues/1755

Thanks a lot.