Simulate a Rust circuit: power on every wire and which devices run
simulate_circuit[Calculators] Simulate a Rust circuit: power on every wire and which devices run. The circuit simulator's solver (https://rust.wiki/calculators/circuit-simulator), Rust's power rules since the
April 2024 rework: each part's inputs and outputs (rW), whether it's on, device and battery status
("Needs 10, gets 4", "Empty in 4 h 0 min"), the power on every wire, power_generated, devices_on of
devices_total, and a page link that opens the same circuit on the board. A device takes its full draw or
nothing; splitters share evenly between connected outputs; batteries give only what the parts after them draw,
up to their maximum. Wiring something back into itself is reported as short_circuit. Part and device names come from get_circuit_parts / get_electricity_data. Give the user the page link: it opens the circuit on the interactive board.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"parts": "<parts>"
},
"name": "simulate_circuit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parts | Yes | Comma-separated `label:Part` - a part from /calculators/circuit-simulator (Large Solar Panel, Wind Turbine, Large Battery, Splitter, Electrical Branch, Switch, AND Switch...) or a powered device by name (Auto Turret, Ceiling Light, SAM Site...). Settings in brackets: `b:Large Battery(charge=50)`, `br:Electrical Branch(b=10)`, `sw:Switch(state=0)`. | |
| wires | No | Comma-separated `from>to` wires between labels, each end optionally `.port` - a port name or 1-based number (`sp.Out 2>t`, `br.Branch Out>l`, `g>sw.Switch On`). Default: first output to first input. |