Transport Pathfinding - room for improvement

Fixed
super_aardvark · 3 years ago

Issue description

In certain situations, when attempting to build a transport (belt), I get the message "Transport to selected position was not found," even though there's a route available (and it's not a very long distance). It's often able to find a route if I draw it in the other direction.

E.g. building from cement storage output to concrete mixer input, it can't find a path:

image

However, building from concrete mixer input to cement storage output, it finds a path:

image

Expected behavior

It should be able to route the transport in either direction.

Reproduction steps

  1. Load the attached save.
  2. Enter transport building mode.
  3. Attempt to build the transport shown in the screenshots. Ensure Port Avoidance (F) is on (or... off? The icon is orange and ports are not avoided), other toggles are off.
  4. Observe: it works in one direction only.

Game version

0.5.1b (206)

Attachments

transport-pathfinding.save

Files not imported: transport-pathfinding.save

super_aardvark · 3 years ago

Here's another example.

  1. Load the save:
    transport-pathfinding-2.save
  2. Build a flat conveyor, beginning from the left, adjacent to the U-shaped conveyor, and connecting to the output from the (already-built) farm. This works normally, passing over the U-shaped conveyor and returning to height 0.
  3. Build the same conveyor in the other direction, beginning from the farm's output port and extending 10+ tiles to the left, adjacent to the existing conveyor. It says "Transport to selected position was not found."
  4. Beginning from the same output port, extend the belt down one tile (click once there) and then to the left. Now, it's able to find the correct path.

Bonus issue: Press F to toggle Port Avoidance. Now when executing step 3, it finds a route that includes a self-collision, and reports that error instead. I don't see any point in reporting this as a separate error; just discard any path that includes a self-collision and report "not found" if there are none remaining.

Files not imported: transport-pathfinding-2.save

Closed as ✅ Fixed

6 Showing 1–2 of 2