MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / reset

Method reset

src/pymgrid/algos/rbc/rbc.py:51–64  ·  view source on GitHub ↗

Reset the underlying microgrid. If already reset (e.g. current step is initial step), do nothing. Returns ------- obs : dict[str, list[float]] Observations from resetting the modules as well as the flushed balance log.

(self)

Source from the content-addressed store, hash-verified

49 return priority_list
50
51 def reset(self):
52 """
53 Reset the underlying microgrid.
54
55 If already reset (e.g. current step is initial step), do nothing.
56
57 Returns
58 -------
59 obs : dict[str, list[float]]
60 Observations from resetting the modules as well as the flushed balance log.
61
62 """
63 if self.microgrid.current_step != self.microgrid.initial_step:
64 self.microgrid.reset()
65
66 def run(self, max_steps=None, verbose=False):
67 """

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected