Post · 3 min read· pp. 452–455

Bus

The Bus is the fundamental node of the network, to which all other components attach. It enforces energy conservation for all elements feeding in and out of it in any snapshot (e.g. Kirchhoff's current law for electric buses). A Bus can represent a grid connection point, but it can also be used for other, non-electric energy carriers (e.g. hydrogen, heat, oil) or even non-energy carriers (e.g. CO2 or steel) in different locations.

attributetypeunitdefaultdescriptionstatus
namestringnannanUnique nameInput (required)
v_nomfloatkV1Nominal voltageInput (optional)
typestringnannanPlaceholder for bus type. Not implemented.Input (optional)
xfloatnan0Longitude; the Spatial Reference System Identifier (SRID) is set in n.srid.Input (optional)
yfloatnan0Latitude; the Spatial Reference System Identifier (SRID) is set in n.srid.Input (optional)
carrierstringnanACCarrier, such as "AC", "DC", "heat" or "gas".Input (optional)
unitstringnannanUnit of the bus' carrier if the implicitly assumed unit ("MW") is inappropriate (e.g. "t/h"). Only descriptive. Does not influence any PyPSA functions.Input (optional)
scalingfloatnan1Column scaling factor of the bus in the optimisation, i.e. the solver unit of the bus relative to its model unit (e.g. 1e-3 turns MW into GW). Applies to the dispatch and capacity variables of attached one-ports and of branches starting at the bus (bus0) and to its nodal balance row. Solutions and duals are reported in original units.Input (optional)
locationstringnannanLocation of the bus. Does not influence the optimisation model but can be used for aggregation with n.statistics.Input (optional)
v_mag_pu_setstatic or seriesper unit1Voltage magnitude set point, per unit of v_nom.Input (optional)
v_mag_pu_minfloatper unit0Minimum desired voltage, per unit of v_nom. Placeholder attribute not currently used by any functions.Input (optional)
v_mag_pu_maxfloatper unitinfMaximum desired voltage, per unit of v_nom. Placeholder attribute not currently used by any functions.Input (optional)
controlstringnanPQP,Q,V control strategy for power flow, must be "PQ", "PV" or "Slack". Note that this attribute is an output inherited from the controls of the generators attached to the bus. Do not set by hand.Output
generatorstringnannanName of slack generator attached to slack bus.Output
sub_networkstringnannanName of connected sub-network to which bus belongs. This attribute is set by n.determine_network_topology(). Do not set by hand.Output
pseriesMW0.active power at bus (positive if net generation at bus)Output
qseriesMVar0.reactive power (positive if net generation at bus)Output
v_mag_puseriesper unit1.Voltage magnitude, per unit of v_nomOutput
v_angseriesradians0.Voltage angleOutput
marginal_priceseriescurrency/MWh0.Shadow price from energy balance constraintOutput
net_positionseriesMW0.Net position of a flow-based zone bus: generation minus load, i.e. its solved net position without the flows of its corridor links (the link columns of the domain). Only set for zone buses of a flow_based global constraint.Output

diagram 2025-10-22

diagram 2025-10-09