/** * SOURCES device cohort (Wave A4 phase 2): voltage_source, battery_pack, * bench_psu, clock, clock_gen, pulse_source, pulse_gen, signal_gen; plus * current_source (Wave A7, registry-first — see its own comment). * * Every handler body below is the engine's old switch-case / if-block body * MOVED VERBATIM, with identifier access adapted through DeviceContext * (this.vsrcIdx.get -> ctx.vsrcRow, this._pinNode -> ctx.pinNode, * this._stampIndependentVoltageSource -> ctx.stampIndependentVoltageSource, * out[comp.id] = v -> ctx.setElementCurrent(comp.id, v), loop `continue` -> * handler `return` — every legacy _updateState block is kind-exclusive, so * the two are equivalent). Do not simplify, reorder mna.add calls, or * rewrite algebra here: float accumulation order in the matrix is * semantics, and the bitwise oracle suite pins these exact trajectories. * * Branch-row allocation moved from _buildMatrix into branchRows hooks. The * engine consults the hook at the component's exact position in the same * component iteration, so returning [comp.id] under the old chain's exact * condition preserves every vsrcIdx row index bit-for-bit. * * Kinds grouped into one model correspond exactly to switch cases that * shared a body in the engine (clock/clock_gen and pulse_source/pulse_gen * in the stamp switch; all non-signal_gen sources shared one element- * current case, kept as one shared helper here). * * Engine-owned machinery deliberately NOT moved: the static ideal-source * incidence (reached through ctx.stampIndependentVoltageSource), the * current-limit active sets (shared with the unmigrated regulator kinds), * the battery model cache (shared with the public telemetry readout), * load()-time state carry-forward, and the _updateDigitalState cases for * clock/pulse level readouts (the registry has no digital hook). */ import type { DeviceComponent, DeviceContext, DeviceModel } from "../device-registry.js"; export declare const voltageSourceModel: DeviceModel; export declare const batteryPackModel: DeviceModel; export declare const BENCH_PSU_BACKDRIVEN = 3; /** * The let-go / take-back regime a converged solution asks for, or null when * the committed one stands. Source-stepping rungs are not physical states * (every setpoint is scaled toward 0 V), so no switch is asked there. */ export declare function benchPsuSinkRegimeWanted(ctx: DeviceContext, comp: DeviceComponent, x: Float64Array): 0 | 3 | null; /** * Where in a step from x0 to x1 the supply crossed into the wanted regime, * as a fraction of the step: where its branch current crossed into sinking * (let-go), or where its output fell through the setpoint (take-back). 0 when * it was already past the crossing at the start. */ export declare function benchPsuCrossingFraction(ctx: DeviceContext, comp: DeviceComponent, want: 0 | 3, x0: Float64Array | null, x1: Float64Array): number; /** Commit a let-go / take-back switch decided by the engine. */ export declare function setBenchPsuSinkRegime(ctx: DeviceContext, comp: DeviceComponent, reg: 0 | 3): void; export declare const benchPsuModel: DeviceModel; export declare const clockModel: DeviceModel; export declare const pulseSourceModel: DeviceModel; export declare const currentSourceModel: DeviceModel; export declare const signalGenModel: DeviceModel;