MicrogridController#

class relsad.network.components.MicrogridController(name: str, power_network, fail_rate: float = 0, state: relsad.network.components.Controller.ControllerState = ControllerState.OK)[source]#

Common class for microgrid controller

name#

Name of the microgird controller

Type

string

ict_node#

The ICT node connected to the controller

Type

ICTNode

fail_rate#

The failure rate of the microgrid controller

Type

float

state#

The state of the microgrid controller

Type

ControllerState

sectioning_time#

The sectioning time in the microgrid

Type

Time

parent_sectioning_time#

The sectioning time of the parent controller

Type

Time

check_components#
Type

bool

manual_sectioning_time#

The sectioning time of a passive microgrid without controller (or controller is failed)

Type

Time

power_network#

The power network the controller belongs to

Type

PowerNetwork

ict_network#

The ICT network the controller belongs to

Type

ICTNetwork

sensors#

List of sensors associated with the microgrid

Type

list

failed_sections#

List of failed sections in the microgrid

Type

list

history#

Dictonary attribute that stores the historic variables

Type

dict

monte_carlo_history#
Type

dict

check_circuitbreaker(curr_time, dt)[source]#

Checks if the circuitbreaker in the distribution system is open. If sectioning time is finished, disconnect failed sections and close the circuitbreaker.

check_circuitbreaker_manually(curr_time, dt)[source]#

Checks if the circuitbreaker in the distribution system is open manually. If sectioning time is finished, disconnect failed sections and close the circuitbreaker.

disconnect_failed_sections()[source]#

Disconnects the failed sections in the microgrid

check_sensors(curr_time, dt)[source]#

Loops through the sections connected to the controller determining which sensors have failed. Performs actions according to the sensor status in the respective section. If a section was disconnected and no longer includes any failed sensor, it is connected. If a section was connected and now includes a failed sensor, it is disconnected. The total sectioning time is summed from each section.

run_control_loop(curr_time, dt)[source]#

System control check, determines if components have failed and performes the required action

check_lines_manually(curr_time)[source]#

Loops manually through the sections connected to the controller determining which lines have failed. Performs actions according to the line status in the respective section.

If a section was disconnected and no longer includes any failed lines, it is connected.

If a section was connected and now includes a failed line, it is disconnected.

The total sectioning time is summed from each section.

run_manual_control_loop(curr_time, dt)[source]#

Manual system control check, determines if components have failed and performes the required action.

set_sectioning_time(sectioning_time)[source]#

Sets the sectiom time of the microgrid based on the max value of the microgrid sectioning time and the sectioning time set by the controller

set_parent_sectioning_time(sectioning_time)[source]#

Sets the sectioning time of the parent power network

update_fail_status(dt)[source]#

Updates the fail status

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

print_status()[source]#

Prints the status

reset_status(save_flag)[source]#

Resets and sets the status of the class parameters

initialize_history()[source]#

Initializes the history variables

MicrogridController.add_random_instance(...)

Adds global random seed

MicrogridController.check_circuitbreaker(...)

Checks if the circuitbreaker in the distribution system is open.

MicrogridController.check_circuitbreaker_manually(...)

Checks if the circuitbreaker in the distribution system is open manually.

MicrogridController.check_lines_manually(...)

Loops manually through the sections connected to the controller determining which lines have failed.

MicrogridController.check_sensors(curr_time, dt)

Loops through the sections connected to the controller determining which sensors have failed.

MicrogridController.disconnect_failed_sections()

Disconnects the failed sections in the microgrid

MicrogridController.get_history(attribute)

Returns the history variables of an attribute

MicrogridController.initialize_history()

Initializes the history variables

MicrogridController.print_status()

Prints the status

MicrogridController.reset_status(save_flag)

Resets and sets the status of the class parameters

MicrogridController.run_control_loop(...)

System control check, determines if components have failed and performes the required action

MicrogridController.run_manual_control_loop(...)

Manual system control check, determines if components have failed and performes the required action.

MicrogridController.set_parent_sectioning_time(...)

Sets the sectioning time of the parent power network

MicrogridController.set_sectioning_time(...)

Sets the sectiom time of the microgrid based on the max value of the microgrid sectioning time and the sectioning time set by the controller

MicrogridController.update_fail_status(dt)

Updates the fail status

MicrogridController.update_history(...)

Updates the history variables