Hi, for my use case of the `request_train_path`, I need the ability to mark certain RailEnds as impassible, disallowing the pathfinder from finding paths through them.
Thats why I propose the addition of a `blacklist = array[RailEnd]` parameter on the `request_train_path`.
In practical terms, assuming A*, this could be implemented by initializing the closed set from the blacklisted entries. Specifically with nodes with a g-score of 0, ensuring that the blacklisted RailEnd's can never be added to the open set. This way this feature does not add any cost/code to the A* pathfinding loop.
request_train_path{blacklist=...}
- BraveCaperCat
- Filter Inserter

- Posts: 519
- Joined: Mon Jan 15, 2024 10:10 pm
- Contact:
Re: request_train_path{blacklist=...}
Can you not just destroy the rail ends, request the path and then put them back?
Re: request_train_path{blacklist=...}
my understanding is that this would be a performance disaster, implicitely repathing all kinds of trains by breaking rails, and also trains might be currently occupying them.
