/** * The W1g synthetic records (core/README.md, "Rating record" and "Thermal * record"): code 90 `rating` and code 91 `thermal`, and the two declines * that keep the core's slow physics to what classic does. * * The records come after every component record and after W1f's code 26 * anchors, so `compileSlowRecords` takes the finished device list and runs * after the anchor pass. The declines are per component and run in the * component pass with the other reasons (`slowPhysicsDeclines`). * * Every value is classic's own: `specsForComponent` is what classic's failure * pass reads through `ctx.electricalSpecs`, and `thermalProfileForComponent` * is `_thermalProfile` without its cache. Nothing here re-derives a catalog * or a thermal identity. */ import type { SimCircuit } from "../../sim/engine/sim-engine.js"; import { type ThermalDeviceProfile } from "../../sim/thermal-physics.js"; import type { ProgramDeviceInput } from "../format.js"; type SimComponent = SimCircuit["components"][number]; /** The kinds the core heats in W1 (core/README.md, "Thermal record"). Every other profile is W3's. */ export declare const CORE_THERMAL_KINDS: ReadonlySet; /** * `rPower`: the resistance classic multiplies `I²` by, `Number(params.resistance * ?? 1000)` unfloored (PA:107, Q-O27), or 0 when it is not `> 0`, because * classic's power is `resistance > 0 ? I*I*resistance : 0` (R18). A `-Infinity` * resistance therefore rates 0 W rather than leave the record non-finite. */ export declare function ratingResistance(component: SimComponent): number; /** `pMax`: the resolved specs' `p_max` when it is a finite number, else 0, meaning no limit (PA:138). */ export declare function ratingPowerLimit(component: SimComponent): number; /** * The reasons `component` cannot run on the core's slow physics, in the * compiler's reason format: * - a thermal identity on a kind the core does not heat * (`unsupported-feature:thermal:`); * - an IC whose resolved specs lack `vcc_range` * (`unsupported-feature:no-vcc-range:`), which classic never scans for * `output_sag` while the core scans every IC record; * - a resistor whose `rPower` is not finite (`malformed::non-finite-resistance`), * the reason the resistor's own case gives for the same value: the rating * record must be finite whatever order the checks run in. */ export declare function slowPhysicsDeclines(component: SimComponent): string[]; /** One synthetic record, with the `devices` entry the compiler records for it. */ export interface CompiledSlowRecord { kind: "rating" | "thermal"; /** The rated or heated device's component id. */ componentId: string; /** The rated or heated device's record index (the record's `device` param). */ device: number; input: ProgramDeviceInput; /** A `thermal` record's profile: `getThermalState` composes the readout from it (core/README.md, Readouts). */ profile?: ThermalDeviceProfile; } /** * The code 90 and 91 records for `devices`, the compiler's record list so far * (components, then anchors), in the reader's order: ascending `device`, 90 * before 91 for one device. Checked with `checkSlowRecords` before it returns. */ export declare function compileSlowRecords(circuit: SimCircuit, devices: ReadonlyArray<{ componentId: string; kind: string; }>): CompiledSlowRecord[]; /** * The Rust reader's rules for codes 90 and 91 (core/README.md, "Reader rules * for codes 90 and 91"), as thrown errors: `deviceKinds` is the kind of every * record before them, `records` the synthetic records in program order. A * failure here is a compiler bug, never a fact about the user's circuit. */ export declare function checkSlowRecords(deviceKinds: readonly string[], records: readonly ProgramDeviceInput[]): void; export {};