From 2d018f38fceea6648fcff5c67f63d8664e3b89aa Mon Sep 17 00:00:00 2001 From: ShiboSoftwareDev Date: Wed, 26 Aug 2026 12:24:03 +0200 Subject: [PATCH] Scale trace-line iteration budget per connection --- .../SchematicTraceLinesSolver.ts | 9 + ...1282-isolated-dcdc-default-budget.snap.svg | 1530 ++++++++++++++--- ...1282-trace-lines-iteration-budget.snap.svg | 560 +++--- .../repro-pmp11282-isolated-dcdc.test.ts | 39 +- ...11282-trace-lines-iteration-budget.test.ts | 13 +- 5 files changed, 1554 insertions(+), 597 deletions(-) diff --git a/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts b/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts index 8ee6a648c..cf04c3132 100644 --- a/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +++ b/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts @@ -83,6 +83,15 @@ export class SchematicTraceLinesSolver extends BaseSolver { this.chipMap = params.chipMap this.queuedConnectionPairs = [...this.mspConnectionPairs] + + // Connection pairs are solved sequentially and each child inherits the + // BaseSolver iteration limit. Give the parent enough steps to let every + // child reach its own terminal state, including scheduling/finalization. + const maxStepsPerConnectionPair = this.MAX_ITERATIONS + 2 + this.MAX_ITERATIONS = Math.max( + this.MAX_ITERATIONS, + maxStepsPerConnectionPair * this.mspConnectionPairs.length + 1, + ) } override getConstructorParams(): ConstructorParameters< diff --git a/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc-default-budget.snap.svg b/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc-default-budget.snap.svg index 43856eca1..75b1aeb40 100644 --- a/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc-default-budget.snap.svg +++ b/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc-default-budget.snap.svg @@ -1,284 +1,496 @@ -