// see https://docs.flux.ai/simulator/mbbswitch
const terminals = [];
terminals[0] = flux.getNodeById("6fcc126b-1f83-92df-9365-70d9f1e7a8c1");
terminals[1] = flux.getNodeById("1b4b7748-99ce-6144-a45e-02872668815d");
terminals[2] = flux.getNodeById("8515841c-d1e4-1c30-7a7e-f0862b696e61");
flux.on("setup", () => {
flux.simulationModel = {
type: "MBBSwitch",
map_input_one_to_terminal_uid: terminals[0]?.uid,
map_input_two_to_terminal_uid: terminals[1]?.uid,
map_output_to_terminal_uid: terminals[2]?.uid
}
})
const v0 = flux.createOutputNode({ name: "VP0", value: 0, unit: "V" });
const v1 = flux.createOutputNode({ name: "VP1", value: 0, unit: "V" });
const v2 = flux.createOutputNode({ name: "VP2", value: 0, unit: "V" });
const current = flux.createOutputNode({ name: "Current", value: 0, unit: "A" });