diff --git a/lib/core.ts b/lib/core.ts index 44ad336..748d6d6 100644 --- a/lib/core.ts +++ b/lib/core.ts @@ -1560,11 +1560,11 @@ export class TinyHyperGraphSolver extends BaseSolver { const routeId = this.state.currentRouteId! const directedHopCountToEnd = this.problemSetup.directedHopCountToEndByRoute[routeId] - const startPortId = this.problem.routeStartPort[routeId]! + const endPortId = this.problem.routeEndPort[routeId]! if ( directedHopCountToEnd && - this.topology.portZ[neighborPortId] === this.topology.portZ[startPortId] + this.topology.portZ[neighborPortId] !== this.topology.portZ[endPortId] ) { const directedHopCount = getDirectedRouteHopCount( this.topology, diff --git a/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg b/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg index 3057b67..b0f13a5 100644 --- a/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg +++ b/tests/solver/__snapshots__/cross-layer-heuristic-detour.snap.svg @@ -1,487 +1,456 @@ input topologysolver resultinput topologysolver result