Add multidimensional sweep coordinates and measurement results - #687
Draft
Abse2001 wants to merge 1 commit into
Draft
Add multidimensional sweep coordinates and measurement results#687Abse2001 wants to merge 1 commit into
Abse2001 wants to merge 1 commit into
Conversation
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.
Summary
simulation_parameter_sweep_coordinatesfor multidimensional analysis results while retaining the singular coordinate for one-dimensional compatibilitysimulation_measurement_resultelementAnyCircuitElementRFC context
This implements the Circuit JSON portion of the merged SPICE Simulation Analyses, Stimulus, and Measurements RFC, specifically the multidimensional sweep relationships and measurement-result contract introduced through tscircuit/rfc#11.
The RFC specifies that multidimensional analysis results carry an ordered
simulation_parameter_sweep_coordinatesarray, while one-dimensional results retainsimulation_parameter_sweep_coordinate. It also specifies onesimulation_measurement_resultper measurement, withmeasurement_valuesaligned tosimulation_parameter_sweep_coordinate_setsin Cartesian-product order.The immediate use case is a TPS63802 load-regulation simulation: input voltage and load current form a two-dimensional sweep, and each run contributes one scalar regulation measurement. The schemas in this PR remain generic and are not tied to that device.
This PR intentionally covers only the Circuit JSON contract. The corresponding props, core execution, and Circuit-to-SVG rendering work will follow in their respective repositories.
Compatibility
Validation
bun test- 294 tests passedbun run buildbunx tsc --noEmitbun run lint:zodbun run check-snake-casebun run generate-docs