IntelligentSwitch
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
- fail_rate_per_year#
The failure rate per year for the intelligent switch
- Type
float
- state#
Which state the intelligent switch is in
- 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
- 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
- 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
- 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
- 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.colorIntelligentSwitch.handleIntelligentSwitch.markerIntelligentSwitch.ps_randomIntelligentSwitch.size