const baseTerminal = flux.getNodeById("22f4b90f-81bc-73ec-bf5f-6b0cae396810");
const emitterTerminal = flux.getNodeById("269b453b-3ecd-8ef2-43f5-9b6e3e627e3b");
const collectorTerminal = flux.getNodeById("716f6048-aa68-d528-a83c-555235e212fa");
const baseVoltage = flux.createOutputNode("base-voltage");
const emitterVoltage = flux.createOutputNode("emitter-voltage");
const collectorVoltage = flux.createOutputNode("collector-voltage");
const baseCurrent = flux.createOutputNode("base-current");
const emitterCurrent = flux.createOutputNode("emitter-current");
const collectorCurrent = flux.createOutputNode("collector-current");
// Setup Event
flux.on("setup", (event) => {
const beta = flux.properties.find((prop) => prop.name === "Beta / hFe")?.value || 315;
const leakage = flux.properties.find((prop) => prop.name === "Leakage Current")?.value || 1e-13;
flux.simulationModel = {
type: "transistor",
pnp: true,
map_base_to_terminal_uid: baseTerminal?.uid,
map_emitter_to_terminal_uid: emitterTerminal?.uid,
map_collector_to_terminal_uid: collectorTerminal?.uid,