LineΒΆ
The Line components represent power transmission and distribution lines. They connect a bus0 to a bus1. They can connect to buses with carrier "AC" or "DC". Power flow through lines is not directly controllable, but is determined passively by their impedances and the nodal power imbalances according to Kirchhoff's voltage law. To see how the impedances are used in the power flow, see the line model.
When to use Link instead?
| attribute | type | unit | default | description | status |
|---|---|---|---|---|---|
| name | string | nan | nan | Unique name | Input (required) |
| bus0 | string | nan | nan | Name of origin bus to which branch is attached. | Input (required) |
| bus1 | string | nan | nan | Name of destination bus to which branch is attached. | Input (required) |
| type | string | nan | nan | Name of line standard type. If this is not an empty string "", the line standard type impedance parameters are multiplied with the length and divided/multiplied by num_parallel to compute x, r, etc. This will override any values set in r, x, andb. If the string is empty, values manually provided forr,x`, etc. are taken. |
Input (optional) |
| x | float | Ohm | 0 | Series reactance, must be non-zero for AC branch for linearised power flow equations. If the line has series inductance \(L\) in Henries then \(x = 2\pi f L\) where \(f\) is the frequency in Hertz. Series impedance \(z = r + jx\) must be non-zero for non-linear power flow calculations. Ignored if type defined. |
Input (required) |
| r | float | Ohm | 0 | Series resistance, must be non-zero for DC branch for linearised power flow equations. Series impedance \(z = r + jx\) must be non-zero for the non-linear power flow. Ignored if type defined. |
Input (required) |
| g | float | Siemens | 0 | Shunt conductivity. Shunt admittance is \(y = g + jb\). | Input (optional) |
| b | float | Siemens | 0 | Shunt susceptance. If the line has shunt capacitance \(C\) in Farads then \(b = 2\pi f C\) where \(f\) is the frequency in Hertz. Shunt admittance is \(y = g + jb\). Ignored if type defined. |
Input (optional) |
| s_nom | float | MVA | 0 | Limit of apparent power which can pass through branch in either direction. Ignored if s_nom_extendable=True. |
Input (optional) |
| s_nom_mod | float | MVA | 0 | Modular unit size of line expansion of s_nom (e.g. fixed rating of added circuit). Introduces integer variables. |
Input (optional) |
| s_nom_extendable | boolean | nan | False | Switch to allow capacity s_nom to be extended in optimisation. |
Input (optional) |
| s_nom_min | float | MVA | 0 | If s_nom_extendable=True, set the minimum value of s_nom_opt. |
Input (optional) |
| s_nom_max | float | MVA | inf | If s_nom_extendable=True, set the maximum value of s_nom_opt. |
Input (optional) |
| s_nom_set | float | MVA | nan | If s_nom is extendable in optimization, set the value of s_nom_opt. |
Input (optional) |
| s_max_pu | static or series | per unit | 1 | The maximum allowed absolute apparent power flow per unit of s_nom for the optimisation (e.g. can set s_max_pu<1 to approximate \(N-1\) contingency factor, or can be time-varying to represent weather-dependent dynamic line rating for overhead lines). |
Input (optional) |
| capital_cost | float | currency/MVA | 0 | Fixed period costs of extending s_nom by 1 MVA (e.g. annuitized investment costs). Used directly unless overnight_cost is specified. Any length factor must already be included. |
Input (optional) |
| overnight_cost | float | currency/MVA | nan | Overnight (upfront) investment cost per MVA. If specified, PyPSA calculates annuity using discount_rate and lifetime. Takes precedence over capital_cost. |
Input (optional) |
| discount_rate | float | per unit | nan | Discount rate for annuity calculation when using overnight_cost. Supports 0% rate (simple depreciation). |
Input (optional) |
| fom_cost | float | currency/MVA | 0 | Fixed period operation and maintenance cost per MVA, added to annuitized investment cost. | Input (optional) |
| active | boolean | nan | True | Whether to consider the component in optimisation or not | Input (optional) |
| build_year | int | year | 0 | Build year of line. | Input (optional) |
| lifetime | float | years | inf | Lifetime of line. | Input (optional) |
| length | float | km | 0 | Length of line used when type is set. Also useful for calculating capital_cost. |
Input (optional) |
| carrier | string | nan | nan | Type of current. "AC" is the only valid value for lines. | Input (optional) |
| terrain_factor | float | per unit | 1 | Terrain factor for increasing length for capital_cost calculation. |
Input (optional) |
| num_parallel | float | nan | 1 | When type is set, this is the number of parallel circuits. Can also be fractional. If type is empty "" this value is ignored. |
Input (optional) |
| v_ang_min | float | degrees | -inf | Minimum voltage angle difference across the line. Placeholder attribute not currently used. | Input (optional) |
| v_ang_max | float | degrees | inf | Maximum voltage angle difference across the line. Placeholder attribute not currently used. | Input (optional) |
| sub_network | string | nan | nan | Name of sub-network to which lines belongs, as calculated by n.determine_network_topology(). Do not set by hand. |
Output |
| p0 | series | MW | 0 | Active power at bus0 (positive if branch is withdrawing power from bus0). |
Output |
| q0 | series | MVar | 0 | Reactive power at bus0 (positive if branch is withdrawing power from bus0). |
Output |
| p1 | series | MW | 0 | Active power at bus1 (positive if branch is withdrawing power from bus1). |
Output |
| q1 | series | MVar | 0 | Reactive power at bus1 (positive if branch is withdrawing power from bus1). |
Output |
| x_pu | float | per unit | 0 | Per unit series reactance calculated by n.calculate_dependent_values() from x and n.buses.v_nom. |
Output |
| r_pu | float | per unit | 0 | Per unit series resistance calculated by n.calculate_dependent_values() from r and n.buses.v_nom. |
Output |
| g_pu | float | per unit | 0 | Per unit shunt conductivity calculated by n.calculate_dependent_values() from g and n.buses.v_nom. |
Output |
| b_pu | float | per unit | 0 | Per unit shunt susceptance calculated by n.calculate_dependent_values() from b and n.buses.v_nom. |
Output |
| x_pu_eff | float | per unit | 0 | Effective per unit series reactance for linear power flow, calculated by n.calculate_dependent_values() from x and n.buses.v_nom |
Output |
| r_pu_eff | float | per unit | 0 | Effective per unit series resistance for linear power flow, calculated by n.calculate_dependent_values() from r and n.buses.v_nom |
Output |
| s_nom_opt | float | MVA | 0 | Optimised nominal capacity for apparent power. | Output |
| mu_lower | series | currency/MVA | 0 | Shadow price of lower s_nom limit \(-F \leq f\). Always non-negative. |
Output |
| mu_upper | series | currency/MVA | 0 | Shadow price of upper s_nom limit \(f \leq F\). Always non-negative. |
Output |