-
Notifications
You must be signed in to change notification settings - Fork 1
Neighbour representation needs to be changed #6
Copy link
Copy link
Open
Description
Currently, there are multiple for loops required in order to identify neighbours of any given agent. This is because the network ids and the agent unique_ids do not correlate with each other and thus requires an extensive search through the whole list to identify the correct agent associated with a neighbour node.
This could be fixed using (we need to try!):
- Networkx: set_node_attributes function which might present a 1-1 relation between agent and network nodes
- Use dgl to redefine the network so that this is no longer necessary.
Currently we saw a 10% speedup by adding a break statement in the for loops to remove unnecessary iterations. We foresee another 10% speedup by changing the above.*
-
- The change was noted for 500 agents simulated for 125 time-steps. Time went from 615s down to 540s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels