IntelligentSwitch#

class relsad.network.components.IntelligentSwitch(name: str, disconnector: relsad.network.components.Disconnector.Disconnector, ict_node: Optional[relsad.network.components.ICTNode.ICTNode] = None, fail_rate_per_year: float = 0.03, manual_repair_time: relsad.Time.Time = HOUR_2, state: relsad.network.components.IntelligentSwitch.IntelligentSwitchState = IntelligentSwitchState.OK)[source]#

Common class for batteries …

name#

Name of the intelligent switch

Type

string

disconnector#

The disconnector the intelligent switch is connected to

Type

Disconnector

ict_node#

The ICT node connected to the intelligent switch

Type

ICTNode

fail_rate_per_year#

The failure rate per year for the intelligent switch

Type

float

manual_repair_time#

The time it takes to manually repair the intelligent switch

Type

Time

state#

Which state the intelligent switch is in

Type

IntelligentSwitchState

remaining_repair_time#

The remaining repair time of the intelligent switch

Type

Time

history#

Dictonary attribute that stores the historic variables

Type

dict

monte_carlo_history#

Dictonary attribute that stores the historic variables from the Monte Carlo simulation

Type

dict

fail()[source]#

Sets the intelligent switch state to FAILED

not_fail()[source]#

Sets the intelligent switch state to OK

draw_fail_status(dt)[source]#

Draws the state of the intelligent switch for a given time step

draw_status(prob)[source]#

Sets the state of the intelligent switch based on the probability of the state being FAILED

get_open_repair_time(dt)[source]#

Returns the time it takes to open the intelligent switch when it must be repaired

get_open_time(dt)[source]#

Returns the time it takes to open the intelligent switch based on the status

open()[source]#

Opens the disconnector

repair_close(dt)[source]#

Sets the remaining repair time of the intelligent switch Closes the disconnector Sets the state of the intelligent switch to repair

close(dt)[source]#

Closes the disconnector if the state of the intelligent switch is OK

update_fail_status(dt)[source]#

Updates the fail status of the intelligent switch If the state of the intelligent switch is REPAIR, the remaining repair time is calculated If the state of the intelligent switch is OK, the state of the intelligent switch is drawn

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 instance

print_status()[source]#

Prints the status

reset_status(save_flag)[source]#

Resets the status of the intelligent switch

initialize_history()[source]#

Initializes the history variables

IntelligentSwitch.add_random_instance(random_gen)

Adds global random instance

IntelligentSwitch.close(dt)

Closes the disconnector if the state of the intelligent switch is OK

IntelligentSwitch.draw_fail_status(dt)

Draws the state of the intelligent switch for a given time step

IntelligentSwitch.draw_status(prob)

Sets the state of the intelligent switch based on the probability of the state being FAILED

IntelligentSwitch.fail()

Sets the intelligent switch state to FAILED

IntelligentSwitch.get_history(attribute)

Returns the history variables of an attribute

IntelligentSwitch.get_open_repair_time(dt)

Returns the time it takes to open the intelligent switch when it must be repaired

IntelligentSwitch.get_open_time(dt)

Returns the time it takes to open the intelligent switch based on the status

IntelligentSwitch.initialize_history()

Initializes the history variables

IntelligentSwitch.not_fail()

Sets the intelligent switch state to OK

IntelligentSwitch.open()

Opens the disconnector

IntelligentSwitch.print_status()

Prints the status

IntelligentSwitch.repair_close(dt)

Sets the remaining repair time of the intelligent switch Closes the disconnector Sets the state of the intelligent switch to repair

IntelligentSwitch.reset_status(save_flag)

Resets the status of the intelligent switch

IntelligentSwitch.update_fail_status(dt)

Updates the fail status of the intelligent switch If the state of the intelligent switch is REPAIR, the remaining repair time is calculated If the state of the intelligent switch is OK, the state of the intelligent switch is drawn

IntelligentSwitch.update_history(prev_time, ...)

Updates the history variables

IntelligentSwitch.color

IntelligentSwitch.handle

IntelligentSwitch.marker

IntelligentSwitch.ps_random

IntelligentSwitch.size