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

Boats sent to unreachable depots #5713

Open
DorpsGek opened this issue Aug 18, 2013 · 9 comments
Open

Boats sent to unreachable depots #5713

DorpsGek opened this issue Aug 18, 2013 · 9 comments

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Aug 18, 2013

Leftie opened the ticket and wrote:

Hiya.

Boats sometimes attempt to go to places they are simply unable to reach. I first saw this on the TT-F forum, here http://www.tt-forums.net/viewtopic.php?f=29&t=68364&p=1093057#p1093055

I then tried to replicate it to see if it was still possible in the current version (1.3.2). Using YAPF, i managed to recreate this. Boats attempted to go to a depot that was nearer, but was completely inaccessible through any valid means, and totally ignored a boat yard further away, but in clear open waters.

My attempt at replication is in the below screenshot, using OpenTTD 1.3.2 and YAPF as the pathfinder in advanced settings.

Reported version: 1.3.2
Operating system: All


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

@DorpsGek DorpsGek commented Aug 18, 2013

Leftie wrote:

Whoops, screenshot attached, it seems it wasn't done in the original post, possibly due to my forgetting to add the title and being prompted to re-enter ;)

edit: also if its of value, this is a vanilla game, there are no GRFs involved, at all, although i did cheat (ctrl+alt+c) to get the money needed to mess with terrain.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12530

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Aug 18, 2013

Alberth wrote:

Could you please provide a save game before the problem happens, and a (preferably) short sequence of steps to do, to replicate the issue?
That gives us the certainty we talk about the exact same problem, gives an easy means to examine the issue closer, and also verify afterwards that it is fixed.

A vanilla game without newgrf would be preferable, cheating for money is no problem. In general using trunk or a recent nightly is best, but latest stable will work too.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12532

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Aug 18, 2013

LordAro wrote:

I got bored and decided to reproduce this

r25725

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12533

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Aug 18, 2013

LordAro wrote:

far as i can tell, the unreachable depot must be closer to the ship than the 'reachable' depot


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12534

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Aug 18, 2013

krinn wrote:

Have a look at http://bugs.openttd.org/task/5656
i have a savegame there, it is not limited to boats or limited to the YAPF (but i'm unsure if road vehicle use it or not)


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12535

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Aug 18, 2013

Leftie wrote:

LordAros save is accurate. You basically just need a boat and two depots, one of them (the nearest) being impossible to go to due to land. The boat will always choose the nearest depot. My best guess is that clicking on the depot button is missing a check, and it doesn't actually see if its possible to go to the depot, it just chooses the nearest instead of trying to plot routes to see.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12539

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented Nov 12, 2013

Rubidium wrote:

Ships are stupid... they find the closest depot by finding the one with the shorted manhattan distance, instead of the distance it would need to travel. Probably as optimisation for finding the closest one, which can be extremely expensive when there isn't a reachable depot but it still has to search a vast amount of the map.

I'm not quite sure whether we actually want this 'optimisation' fixed or not.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment12747

@DorpsGek
Copy link
Author

@DorpsGek DorpsGek commented May 29, 2016

frosch wrote:

I guess it needs both:
* First check whether there is a depot near-by using the bird-distance heuristic.
* Then run the pathfinder to check the actual distance/reachability.

As mentioned by juanjo in #6410, YAPF only supports limited search distances for trains. Road- and ship pathfinder always search to the destination, without limit.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5713#comment14198

@TrueBrain TrueBrain changed the title Boats sent to impossible depots Boats sent to unreachable depots Apr 12, 2018
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Oct 1, 2018
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 10, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 10, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 12, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 12, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 12, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 13, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 17, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 20, 2019
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
@stale
Copy link

@stale stale bot commented Jan 24, 2019

This issue has been automatically marked as stale because it has not had any activity in the last two months.
If you believe the issue is still relevant, please test on the latest nightly and report back.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label Jan 24, 2019
@LordAro LordAro added pinned and removed stale labels Jan 24, 2019
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 4, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 4, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 4, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 8, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 8, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 11, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 11, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 11, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 12, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 19, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 6, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 23, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 23, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 24, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 24, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 29, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 13, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Apr 1, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Apr 1, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Dec 24, 2020
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
@TrueBrain TrueBrain removed the pinned label Jan 3, 2021
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jun 27, 2021
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants