feat: specialized linear layout for decoupling capacitor partitions#50
Open
chengyixu wants to merge 3 commits intotscircuit:mainfrom
Open
feat: specialized linear layout for decoupling capacitor partitions#50chengyixu wants to merge 3 commits intotscircuit:mainfrom
chengyixu wants to merge 3 commits intotscircuit:mainfrom
Conversation
When a partition is tagged as "decoupling_caps", bypass the general PackSolver2 and instead arrange capacitors in a clean horizontal row centered at the origin. Caps are sorted by chipId for deterministic ordering and spaced evenly using decouplingCapsGap (falling back to chipGap). This eliminates the messy overlapping layout that PackSolver2 produces for groups of same-sized decoupling capacitors. /claim tscircuit#15 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the InputProblem data from LayoutPipelineSolver06.page.tsx into a separate .data.ts file. This prevents the test from transitively loading the LayoutPipelineDebugger component (and its circuit-to-svg dependency) which has a missing export in the current pinned version. Fixes the pre-existing test failure on main (1 fail, 1 error -> 0 fail).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #15
Summary
SingleInnerPartitionPackingSolverencounters a partition withpartitionType === "decoupling_caps", it skips the general packing algorithm and uses a newcreateLinearDecouplingCapLayout()method insteaddecouplingCapsGap(falls back tochipGap)Changes
lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts_step()fordecoupling_capspartition typecreateLinearDecouplingCapLayout()private method that places caps in a clean horizontal rowtests/PackInnerPartitionsSolver/LinearDecouplingCapLayout.test.tsWhy this works
The existing pipeline already identifies decoupling caps (
IdentifyDecouplingCapsSolver) and creates separate partitions for them (ChipPartitionsSolverwithpartitionType: "decoupling_caps"). The problem was thatPackSolver2produces messy, overlapping layouts for groups of identically-sized 2-pin components. This PR adds a targeted override: when a partition is known to contain only decoupling caps, arrange them in a clean row instead.Zero impact on non-decoupling partitions — the early return only fires for tagged partitions.
Test plan
bun test tests/PackInnerPartitionsSolver/LinearDecouplingCapLayout.test.ts)IdentifyDecouplingCapsSolver06.test.tsis a dependency issue onmain)bun run format:check)