/
_electrical_bus.py
69 lines (56 loc) · 1.77 KB
/
_electrical_bus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -*- coding: utf-8 -*-
"""
In-development electrical bus component.
SPDX-FileCopyrightText: Uwe Krien <krien@uni-bremen.de>
SPDX-FileCopyrightText: Simon Hilpert
SPDX-FileCopyrightText: Cord Kaldemeyer
SPDX-FileCopyrightText: Patrik Schönfeldt
SPDX-FileCopyrightText: Johannes Röder
SPDX-FileCopyrightText: jakob-wo
SPDX-FileCopyrightText: gplssm
SPDX-FileCopyrightText: jnnr
SPDX-FileCopyrightText: Johannes Kochems
SPDX-License-Identifier: MIT
"""
from oemof.solph.buses._bus import Bus
class ElectricalBus(Bus):
r"""An electrical bus object used for linear optimal power flow (LOPF)
Every (spatial) node has to be connected to a BusBlock.
This BusBlock is used in combination with ElectricalLine objects
for linear optimal power flow (lopf) calculations.
Parameters
----------
slack: boolean
If True BusBlock is slack bus for electrical network
v_max: numeric
Maximum value of voltage angle at electrical bus
v_min: numeric
Mininum value of voltage angle at electrical bus
Note: This component is experimental. Use it with care.
Notes
-----
The following sets, variables, constraints and objective parts are created
* :py:class:`~oemof.solph._bus.BusBlock`
The objects are also used inside:
* :py:class:`~oemof.solph.experimental._electrical_line.ElectricalLine`
"""
def __init__(
self,
label=None,
*,
v_max,
v_min,
inputs=None,
outputs=None,
custom_properties=None,
slack=False,
):
super().__init__(
label,
inputs=inputs,
outputs=outputs,
custom_properties=custom_properties,
)
self.slack = slack
self.v_max = v_max
self.v_min = v_min