Time-Domain System Equivalent logoTime-Domain System EquivalentLinear dynamics, solved faster.Discuss Integration

Examples Guide

Example selection, build flow, and the quickest route to the sample matching a user task.

Audience: Anyone looking for a runnable reference implementation that matches their integration scenario. Start here after Installation and the first hands-on tutorial run.

Use this chapter to match the shipped evaluation examples to real integration paths. If you are not sure which chapter to read next, choose the example closest to your source data and follow the linked workflow from there.

Use this chapter in two passes:

  1. pick the example family that matches your starting artifact
  2. use the linked chapter as the durable reference after the example runs

For a one-day minimal integration, the usual path is:

  1. run Hands-On Tutorial once so create, step, and destroy are already proven on your machine
  2. choose exactly one example that matches your real starting point
  3. switch from the example to the linked chapter and keep that chapter as the contract source for production code

Start Here

If your starting point looks like thisBest first exampleThen read
I just finished Hands-On Tutorial and want one more minimal Runtime exampleruntime_bare_metalRuntime Lifecycle and Step Execution
I already have FRF databuilder_frf_1p or builder_frf_2pBuilder and Data Contracts
I need circuit-to-pack workflowworkflow_cpp_quickstartAdapter Circuit
I need host embedding patternsmna_block_embed_2pAdapter Circuit
I need RAW conversionraw_import_api or raw_import_cppAdapter Circuit and CLI Reference
I need observability or perf worktelemetry_basicTelemetry and Profiler

Fastest evaluation picks:

  • runtime_bare_metal when you want one more Runtime-only proof after Hands-On Tutorial
  • workflow_cpp_quickstart when you want the shortest netlist -> pack PoC path
  • package_consumer_targets or package_consumer_pkgconfig when you need proof that a downstream build can consume the installed SDK cleanly

If you are still in the first 30 minutes of an evaluation, ignore the full index below and choose only one of those three paths.

Example Index

Core Runtime

ExampleWhat It Does
runtime_bare_metalLoad a pack, create a model, run a step loop — no Builder or Adapter involved
variable_dtPass different dt values at each step; demonstrates non-uniform time-stepping

Builder

ExampleWhat It Does
builder_frf_1pBuild a pack from synthetic 1-port FRF data, then verify via Runtime step loop
builder_frf_2pSame for a 2-port passive admittance
builder_ircApply IRC compression (MULTIRES_V1, MULTIRES_V2_MOMENT1) and compare tap counts

Adapter Circuit

ExampleWhat It Does
circuit_adapter_1pMinimal host circuit solver: stamp TDSE into a 1-port MNA system, solve, step
circuit_adapter_2pSame for 2-port with explicit KCL stamping
mna_block_embed_2pEmbed TDSE 2-port contributions into a 4-node MNA network
adapter_cpp_quickstartC++ wrapper: compile a netlist, compute Y matrix, AC probe, adaptive plan, build H
adapter_cpp_threaded_lanesMulti-threaded pattern: per-worker handles with compile and request policy overrides
workflow_cpp_quickstartHigh-level netlist_to_pack workflow: one call from SPICE file to .pack file
netlist_to_pack_npLow-level Adapter-to-Builder handoff with manual/adaptive sweep planning (advanced)
raw_import_apiConvert PSS/E RAW to netlist via C API
raw_import_cppSame RAW conversion using the C++ wrapper (raw::fileToNetlist)
nport_y2p_acAC probe with an NPORT element loaded from a Touchstone .y2p file
tail_scanRun scanTailVsNfreq to determine the required frequency resolution for a circuit
region_prepareResolve named circuit regions into explicit port definitions
try_apiUse the try* no-throw C++ API variants with manual error-code checking

Telemetry

ExampleWhat It Does
telemetry_basicInitialize telemetry service, attach to model, run steps, inspect JSON output

Deployment

ExampleWhat It Does
package_consumer_targetsConsume TDSE via CMake find_package(tdse)
package_consumer_pkgconfigConsume TDSE via pkg-config

Choosing the Right Example

What are you trying to do?
├─ "I just want to see the Runtime step loop"
│  → runtime_bare_metal
├─ "I have FRF data and want to build a pack"
│  → builder_frf_1p (1 port) or builder_frf_2p (2+ ports)
├─ "I want to compress a long impulse response"
│  → builder_irc
├─ "I have a circuit netlist and want end-to-end"
│  → circuit_adapter_1p or circuit_adapter_2p
├─ "I want to embed TDSE in my host solver"
│  → mna_block_embed_2p
├─ "I want to use the C++ wrapper API"
│  → adapter_cpp_quickstart
├─ "I want the fastest netlist-to-pack path"
│  → workflow_cpp_quickstart
├─ "I need full control of the Adapter-to-Builder pipeline"
│  → netlist_to_pack_np
├─ "I want to convert a PSS/E RAW file in code"
│  → raw_import_api (C) or raw_import_cpp (C++)
├─ "I want to check causality / find the right nfreq"
│  → tail_scan
├─ "I want to resolve a circuit region into ports"
│  → region_prepare
├─ "I want non-throwing error handling in C++"
│  → try_api
├─ "I want to run with variable time steps"
│  → variable_dt
├─ "I need multi-threaded adapter usage"
│  → adapter_cpp_threaded_lanes
├─ "I need step-level telemetry in production"
│  → telemetry_basic
├─ "I need to package TDSE for my build system"
│  → package_consumer_targets (CMake) or package_consumer_pkgconfig (pkg-config)

After The Tutorial

If you came here directly from Hands-On Tutorial, the cleanest next moves are:

  • stay in Core Runtime if you are proving host loop ownership and shutdown behavior
  • move to Builder if your real input is already validated FRF or impulse-response data
  • move to Adapter Circuit if your real input starts as a netlist, RAW case, or NPORT workflow
  • move to Telemetry or Deployment only after a normal create-step-destroy path is already stable

From Example To Real Integration

Use the example only long enough to prove the path. Then switch to the chapter that owns the real contract for production code.

If the example proved...Durable chapter to keep openAvoid jumping to this too early
pack create / destroy and one host step loopRuntime Lifecycle and Step ExecutionVariable dt or multi-model topics before the fixed-step path is stable
Builder packaging from FRF or H / IR dataBuilder and Data Contractslow-level Adapter flows you do not actually need
netlist or RAW input can become a qualified .packAdapter Circuitdirect low-level Builder tuning before the input path is trusted
package consumption works in a downstream buildInstallation and Platform Notesperformance or plugin tuning before the install surface is stable

Building the Examples

If your evaluation package includes example projects, build them from the delivered example root:

cmake -S <example-root> -B <example-root>/build -DCMAKE_BUILD_TYPE=Release
cmake --build <example-root>/build -j"$(nproc)"

To build a specific example, use its documented CMake target name. For example:

cmake --build <example-root>/build --target tdse_example_builder_frf_1p

For package consumption examples, install the SDK first:

cmake -S <package-consumer-example-root> -B build -DCMAKE_PREFIX_PATH=/opt/tdse-sdk
cmake --build build