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

Method _serialization_data

src/pymgrid/microgrid/microgrid.py:954–961  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

952 return dump_data(self._serialization_data(), dumper_stream, self.yaml_tag)
953
954 def _serialization_data(self):
955 return {
956 "modules": self._modules.to_tuples(),
957 'trajectory_func': self.trajectory_func,
958 'initial_step': self.initial_step,
959 'final_step': self.final_step,
960 **self._balance_logger.serialize("balance_log")
961 }
962
963 def deserialize(self, mapping):
964 self._balance_logger = self._balance_logger.from_raw(mapping.get("balance_log"))

Callers 1

serializeMethod · 0.95

Calls 2

to_tuplesMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected