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

(YA/N)PF, PBS - red_penalty incompatibility #4302

Closed
DorpsGek opened this issue Dec 14, 2010 · 4 comments
Closed

(YA/N)PF, PBS - red_penalty incompatibility #4302

DorpsGek opened this issue Dec 14, 2010 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Eisenbaehr opened the ticket and wrote:

Hello guys,

since some time I notice some conflicts when using PBS (Path Based Signaling). Yesterday I was able to reconstruct the problem to a simple example. Today I have replicated this issue with a stable version of OpenTTD and without NewGRFs or custom settings. I have also tested r21450.

Stands on a two-track trail per track a path signal (not one-way), drives the train the wrong way if certain conditions are met (slope, curves).

For mehr details, see PNG.

Start the game with "openttd -d yapf=9" and observe the output.

Currently costs the left and wrong track 4200 (penalty) and the right 4184!
Now if a slope or curve was added, then the costs increase over 4200. The train now selects only the left track.

I have studied the pathfinder settings. I was able to resolve the problem by increasing the rail_pbs_signal_back_penalty from 1500 to 2500 for the moment. But after that I had the same problem in some other situations observed (for example, tracks with more signals or crossings).

I think the problem comes from the incompatibility between the rail_red_penalties (... rail_look_ahead_signal_) and the main feature of the PBS: The default setting of signals is red, not green!
The result is that the pathfinder treat all routes to be blocked?

Btw.: Before the time of PBS, I have programmed for OpenTTD a very similar feature (with an alpha stage). I had trouble with the same problem.

Greetings
Robert alias Eisenbaehr

Attachments

Reported version: 1.0.5
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4302
@DorpsGek
Copy link
Member Author

michi_cc wrote:

The red signal penalties aren't applied for PBS signals, only for normal block signals.

It's simply not possible to provide a single default set of pathfinder penalties that
will provide an optimal result in every conceivable situation, simply because the
definition of optimal will vary greatly between players. As such, the settings have to
be some kind of compromise.

You can always try using one-way path signals or additional back-facing path signals in
situations you think of as unwanted. If that doesn't help or is impractical, the penalties
can be changed for exactly that reason.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4302#comment9244

@DorpsGek
Copy link
Member Author

Eisenbaehr wrote:

You're right. It is also difficult to understand the parameters.

Of course, I thought that the red_penalties values are not applied. Maybe you have right.

However, I have created a new save game and PNG.
In the left corner is a new line with two PBS signals. Additionally you see the debug output. The last two rows are the results with and without PBS signal.

Steps to reproduce:
- Remove signal, turn the train, turn again: 1684
- Add PBS signal: 2684

The problem I am thinking: I remembered a maximum penalty. But I can not remember the amount.

What I do not understand: If I remove the PBS signal, then the trip will cost 2000 instead of 1684.

Additionally, if you replace the PBS signal by a block signal, are also calculated 1684.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4302#comment9247

@DorpsGek
Copy link
Member Author

michi_cc wrote:

There was indeed a problem with *rail_lastred_penalty, this is now fixed.

Of course there are still situation where the default pathfinder penalties
might not produce the best result, but this is unavoidable.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4302#comment9252

@DorpsGek
Copy link
Member Author

michi_cc closed the ticket.

Reason for closing: Fixed

In r21524.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4302

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant