DiscreteMicrogridEnv.sample_action#

DiscreteMicrogridEnv.sample_action(strict_bound=False, sample_flex_modules=False)[source]#

Get a random action within the microgrid’s action space.

Parameters#

strict_boundbool, default False

If True, choose actions that is guaranteed to satisfy self.max_consumption and self.max_production bounds. Otherwise selects action from min_act and min_act, which may not satisfy instantaneous bounds.

sample_flex_modulesbool, default false

Whether to sample the flex modules in the microgrid. run does not expect actions for flex modules.

Returns#

dict[str, list[float]]

Random action in the action space.