set_junction_demand
Change a junction's base water demand in an EPANET model, with validation for node existence, value bounds, and model re-parse. Re-run simulation to update results.
Instructions
Change the base demand of a junction in a loaded network. The edit is validated against the EPANET engine before it is applied: the node must exist and be a junction, the value must be within realistic bounds, and the edited model must re-parse with the requested demand. Junctions whose demand is overridden by the [DEMANDS] section are rejected. Previous simulation results for the network are invalidated (they describe the old model) — re-run run_simulation afterwards.
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": {
"networkId": "<networkId>",
"nodeId": "<nodeId>",
"demand": "<demand>"
},
"name": "set_junction_demand"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| demand | Yes | New base demand in the model's flow units (e.g. LPS or GPM). A negative value represents flow into the network. Range: -1,000,000 to 1,000,000. | |
| nodeId | Yes | Id of the junction to change (use get_nodes to list junction ids). | |
| networkId | Yes | The network id returned by load_network. |