Skip to content

Commit

Permalink
replay looks like it works :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Feb 8, 2024
1 parent f9989b2 commit f44bdc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def main():
start_time = datetime.now()

#matrix.run()
matrix.boot()
matrix.run_singlethread()
end_time = datetime.now()
matrix.run_interviews()
Expand Down
4 changes: 3 additions & 1 deletion src/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ def from_timeline(cls,src,step=None):
matrix = Matrix(record['data'])
elif matrix:
if record['step_type'] == 'agent_init':
#data
config = record
config['matrix'] = matrix
# is this some kind of double linking
agent = Agent(config)
matrix.add_agent_to_simulation(agent)
elif record['step_type'] == "agent_set":
Expand Down Expand Up @@ -303,7 +305,7 @@ def log_agents_to_redis(self):
redis_connection.rpush(f"{self.id}:agents:{agent.name}", json.dumps(agent_data))

def run_singlethread(self):
self.boot()
#self.boot()
self.status = "running"
self.sim_start_time = datetime.now()
self.send_matrix_to_redis()
Expand Down

0 comments on commit f44bdc2

Please sign in to comment.