Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tpt-rust4 — The Brain & Digital Twins

TPT Solutions — part of the TUP (Telemetry Unified Protocol) platform.

tpt-rust4 is the Brain: it provides the simulation engines, dispatch optimizers, forecasting baselines, and digital-twin observers that turn current and historical state (from the Memory layer) into the optimal Command Envelopes (setpoints) that the Reflexes layer executes.

            ┌──────────────── tpt-rust-4 (The Brain) ────────────────┐
 Read Path  │  tpt-state-snapshot / tpt-parquet-partitioner (tpt-rust-3) │
   ───────► │      │                                                    │
            │      ▼                                                    │
            │  tpt-forecast-bridge ─► tpt-forecast-naive                │
            │  tpt-twin-observer (KF) ◄─ tpt-twin-thermal / hydraulic    │
            │      │                                                    │
            │      ▼                                                    │
            │  tpt-dispatch-model ─► tpt-dispatch-solve                 │
            │      │                       │                           │
 Write Path │      │                       ▼                           │
   ◄─────── │      └──── Command Envelope ──► tpt-actuation-gate (tpt-rust-5)
            └────────────────────────────────────────────────────────────┘

Crates

Crate Role
tpt-sim-clock Deterministic, multi-rate simulation clock (decoupled from wall-clock).
tpt-sim-engine Discrete-event + fixed-step execution loop, dependency graph, snapshotting.
tpt-sim-scenario Seeded scenario generation, Monte Carlo wrapper, batch harness.
tpt-dispatch-model Physics → math bridge: battery/pump/tank constraints → LP/conic problem.
tpt-dispatch-solve Orchestration, solution mapping, TUP Command Envelope, CommandSink.
tpt-forecast-bridge TUP telemetry → matrix adapter (windowing, resampling, gap-fill).
tpt-forecast-naive Baseline forecasters: persistence, diurnal, degree-day.
tpt-twin-observer State estimation framework + Kalman filter + sensor-failure inference.
tpt-twin-thermal Lumped-capacitance thermal models (zones, tanks, heat exchangers).
tpt-twin-hydraulic Steady-state pipe network model (Hazen-Williams).

tpt-dispatch-model / tpt-dispatch-solve support both good_lp and clarabel solver backends behind Cargo feature flags, sharing a backend-independent DispatchProblem type.

Upstream dependencies (mocked locally today)

tpt-rust-2 (Physics), tpt-rust-3 (Memory), and tpt-rust-5 (Reflexes) are spec-only today. This workspace defines small local trait abstractions to stand in for them — PhysicsConstantsSource, StateSnapshotSource, HistoricalTelemetrySource, and CommandSink — each with an in-memory implementation. These are swapped for the real upstream crates once those repos are scaffolded (see todo.md Phase 7).

tpt-protocol (tpt-protocol-tup / tpt-protocol-core) is a real, implemented dependency providing the DataPoint telemetry envelope and core traits.

Conventions

  • std-only throughout (LP/conic solvers, Kalman filtering, Monte Carlo harnesses).
  • Dual-licensed under MIT or Apache-2.0.

See spec.txt for the full design document and todo.md for the build checklist.

License

Licensed under either of

at your option.

About

Simulation engines, dispatch optimizers, and digital twin observers for the TPT platform — turns historical and live telemetry into optimal physical setpoints.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages