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

Closed
DorpsGek opened this issue Aug 18, 2013 · 10 comments
Closed

Boats sent to unreachable depots #5713

DorpsGek opened this issue Aug 18, 2013 · 10 comments
Labels
bug Something isn't working component: pathfinder This issue is related to Pathfinder flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

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
Member Author

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
Member Author

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
Member Author

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
Member Author

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
Member Author

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
Member Author

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
Member Author

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
Member Author

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

@DorpsGek DorpsGek added component: pathfinder This issue is related to Pathfinder flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
@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 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 Stale issues label Jan 24, 2019
@LordAro LordAro added pinned and removed stale Stale issues 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 20, 2024
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.

stuff

Update water_regions.cpp

Revert "stuff"

This reverts commit 2291f50994144b06ba2d2042c5355919133036d6.

da

trala

p

9

get rig of has_cross_region_aqueducts

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

remove enter_dir

Update yapf_ship_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update yapf_ship_regions.cpp

Update yapf_ship_regions.cpp

Update water_regions.cpp

rename

Update water_regions.cpp

Update water_regions.cpp

Update yapf_base.hpp

Update yapf_ship.cpp

Update yapf_ship_regions.cpp

Update yapf_ship_regions.cpp

undo minor changes

undo minor changes

undo minor changes

Update water_regions.h

Update water_regions.h

Update CMakeLists.txt

Create water_regions_sl.cpp

a

Update water_regions.cpp

Update yapf_ship_regions.cpp

9

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

Update water_regions.cpp

5

Update yapf_ship.cpp

Update water_regions.cpp

Update water_cmd.cpp

Update yapf_ship.cpp

8

k
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Jan 20, 2024
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 21, 2024
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 21, 2024
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 21, 2024
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 22, 2024
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 22, 2024
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 22, 2024
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 23, 2024
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 24, 2024
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 24, 2024
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 24, 2024
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 25, 2024
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 25, 2024
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 25, 2024
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 25, 2024
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 25, 2024
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 28, 2024
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, 2024
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, 2024
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 25, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 25, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 25, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Feb 29, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 3, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 3, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 7, 2024
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).
SamuXarick added a commit to SamuXarick/OpenTTD that referenced this issue Mar 17, 2024
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: pathfinder This issue is related to Pathfinder flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

4 participants