Line#

class relsad.network.components.Line(name: str, fbus: relsad.network.components.Bus.Bus, tbus: relsad.network.components.Bus.Bus, r: float, x: float, repair_time_dist: relsad.StatDist.StatDist.StatDist = <relsad.StatDist.StatDist.StatDist object>, s_ref: float = 1, v_ref: float = 12.66, rho: float = 1.72e-08, area: float = 6.452e-05, fail_rate_density_per_year: float = 0.0, capacity: float = 100, connected=True)[source]#

A class used to represent an electrical Line

name#

Name of the line

Type

str

is_backup#

Decides if the line is a backup line

Type

bool

fbus#

Sending bus

Type

Bus

tbus#

Receiving bus

Type

Bus

disconnectors#

List of disconnectors connected to the line

Type

list

circuitbreaker#

Circuit breaker connected to the line

Type

CircuitBreaker

parent_network#

The parent network of the line

Type

PowerNetwork

section#

The section the line belongs to

Type

Section

s_ref#

Reference apperet power [MVA]

Type

float

v_ref#

Reference voltage [kV]

Type

float

r_ref#

Reference resistance [Ohm]

Type

float

r#

Resistance [Ohm]

Type

float

x#

Reactance [Ohm]

Type

float

r_pu#

The pu value of the resistance

Type

float

x_pu#

The pu value of the reactance

Type

float

area#

The cross-sectional area [m^2]

Type

float

rho#

The resistivity of the line [Ohm*m]

Type

float

length#

Length of line [km]

Type

float

capacity#

The capacity of the line [MW]

Type

float

ploss#

The active power loss over the line [MW]

Type

float

qloss#

The reactive power loss over the line [MVar]

Type

float

fail_rate_per_year#

Failure rate per year [fault/year/km]

Type

float

repair_time_dist#

The repair time of the line [hours/fault]

Type

StatDist

connected#

Indicates if the line is connected or disconnected

Type

bool

failed#

Failure status of the line

Type

bool

remaining_outage_time#

The remaining outage time of the line

Type

Time

sensor#

The sensor(s) connected to the line

Type

Sensor

history#

Dictonary attribute that stores the historic variables

Type

dict

set_backup()[source]#

Sets the backup lines and opens the disconnectors connected to the backup line

disconnect()[source]#

Disconnects a line and removes the line for the list of lines

connect()[source]#

Connects a line and append the line to the list of lines

draw_repair_time(dt)[source]#

Decides and returns the repair time of the line based on a statistical distribution

fail(dt)[source]#

Sets the fail status of the line to True and opens the connected disconnectors and the connected circuit breaker

not_fail()[source]#

Sets the fail status of the line to False and closes the connected disconnectors and connected circuit breaker

change_direction()[source]#

Changes the direction of the line

update_fail_status(dt)[source]#

Updates the fail status of the line

get_line_load()[source]#

Returns the flow over the line in PU values

get_line_loading()[source]#

Returns the loading of the line in percentage

print_status()[source]#

Prints the line status

get_disconnetors()#

Returns the connected disconnectors

add_parent_network(network)[source]#

Adds the parent network to the line

initialize_history()[source]#

Initialize the history variables

update_history(prev_time, curr_time, save_flag)[source]#

Updates the history variables

get_history(attribute)[source]#

Returns the history variables of an attribute

add_random_instance(random_gen)[source]#

Adds global random seed

reset_status()[source]#

Resets and sets the status of the class parameters

reset_load_flow_data()[source]#

Resets the variables used in the load flow analysis

get_switches()[source]#

Returns the switches on the line

Line.add_parent_network(network)

Adds the parent network to the line

Line.add_random_instance(random_gen)

Adds global random seed

Line.change_direction()

Changes the direction of the line

Line.connect()

Connects a line and append the line to the list of lines

Line.disconnect()

Disconnects a line and removes the line from the list of lines

Line.draw_repair_time(dt)

Decides and returns the repair time of the line based on a statistical distribution

Line.fail(dt)

Sets the fail status of the line to False and opens the connected disconnectors and the connected circuit breaker

Line.get_disconnectors()

Returns the connected disconnectors

Line.get_history(attribute)

Returns the history variables of an attribute

Line.get_line_load()

Returns the flow over the line in PU values

Line.get_line_loading()

Returns the loading of the line in percentage

Line.get_switches()

Returns the switches on the line

Line.initialize_history()

Initializes the history variables

Line.not_fail()

Sets the fail status of the line to False and closes the connected disconnectors and connected circuit breaker

Line.print_status()

Prints the line status

Line.reset_load_flow_data()

Resets the variables used in the load flow analysis

Line.reset_status(save_flag)

Resets and sets the status of the class parameters

Line.set_backup()

Sets the backup lines and opens the disconnectors connected to the backup line

Line.update_fail_status(dt)

Updates the fail status of the line

Line.update_history(prev_time, curr_time, ...)

Updates the history variables

Line.handle

Line.lineCount

Line.linestyle

Line.ps_random