-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathline.py
39 lines (33 loc) · 1.21 KB
/
line.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
class Line:
def __init__(self,
voltage: int,
from_bus: int,
to_bus: int,
resistance: float,
reactance: float,
capacitance: float,
angle_max: float,
line_flow_limit: float,
length: float,
max_i_ka: float):
self.voltage = voltage
self.from_bus = from_bus
self.to_bus = to_bus
self.resistance = resistance
self.reactance = reactance
self.capacitance = capacitance
self.angle_max = angle_max
self.line_flow_limit = line_flow_limit
self.max_i_ka = max_i_ka
self.length = length
self.dict = {"f_bus": self.from_bus,
"t_bus": self.to_bus,
"R": self.resistance,
"X": self.reactance,
"C": self.capacitance,
"angmax": self.angle_max,
"line_flow_limit": self.line_flow_limit,
"length": self.length,
"max_i_ka": self.max_i_ka}
def __str__(self) -> str:
return str(self.dict)