Skip to content

Commit

Permalink
Optimizing agent_id list generation
Browse files Browse the repository at this point in the history
  • Loading branch information
poliwop committed Jun 29, 2023
1 parent 535df3c commit 96ead12
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hydradx/model/run.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import time
from copy import deepcopy

from .amm.global_state import GlobalState

Expand All @@ -22,7 +21,7 @@ def run(initial_state: GlobalState, time_steps: int, silent: bool = False) -> li
# market evolutions
new_global_state.evolve()

agent_ids = deepcopy(list(new_global_state.agents.keys()))
agent_ids = [k for k in new_global_state.agents.keys()]
for agent_id in agent_ids:
agent = new_global_state.agents[agent_id]
if agent.trade_strategy:
Expand Down

0 comments on commit 96ead12

Please sign in to comment.