recorder fixed

This commit is contained in:
Steffen Illium
2022-08-18 16:15:17 +02:00
parent 6a24e7b518
commit 4f3924d3ab
19 changed files with 104 additions and 104 deletions

View File

@@ -25,9 +25,6 @@ class Destinations(EntityCollection):
def __repr__(self):
return super(Destinations, self).__repr__()
def summarize_states(self, n_steps=None):
return {}
class ReachedDestinations(Destinations):
_accepted_objects = Destination
@@ -37,8 +34,5 @@ class ReachedDestinations(Destinations):
self.can_be_shadowed = False
self.is_blocking_light = False
def summarize_states(self, n_steps=None):
return {}
def __repr__(self):
return super(ReachedDestinations, self).__repr__()

View File

@@ -38,7 +38,8 @@ class Destination(Entity):
def agent_is_dwelling(self, agent: Agent):
return self._per_agent_times[agent.name] < self.dwell_time
def summarize_state(self, n_steps=None) -> dict:
state_summary = super().summarize_state(n_steps=n_steps)
state_summary.update(per_agent_times=self._per_agent_times)
def summarize_state(self) -> dict:
state_summary = super().summarize_state()
state_summary.update(per_agent_times=[
dict(belongs_to=key, time=val) for key, val in self._per_agent_times.keys()], dwell_time=self.dwell_time)
return state_summary