pymgrid.algos.RuleBasedControl#

class pymgrid.algos.RuleBasedControl(microgrid, priority_list=None, remove_redundant_gensets=True)[source]#

Run a rule-based (heuristic) control algorithm on a microgrid.

In rule-based control, modules are deployed in a preset order. You can either define this order by passing a priority list or the order will be defined automatically from the module with the lowest marginal cost to the highest.

Parameters#

microgridpymgrid.Microgrid

Microgrid on which to run rule-based control.

priority_listlist of PriorityListElement or None, default None.

Priority list to use. If None, the order will be defined automatically from the module with the lowest marginal cost to the highest.

Methods

get_action()

Given the priority list, define an action.

get_priority_lists(remove_redundant_gensets)

Get all of the priority lists for the microgrid.

reset()

Reset the underlying microgrid.

run([max_steps, verbose])

Get the priority list and then deploy on the microgrid for some number of steps.

Attributes

priority_list

Order in which to deploy controllable modules.

microgrid

Microgrid on which to run rule-based control.