Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Graph/Network-based Communication #68

Closed
ptheywood opened this issue Oct 1, 2018 · 6 comments
Closed

Feature: Graph/Network-based Communication #68

ptheywood opened this issue Oct 1, 2018 · 6 comments

Comments

@ptheywood
Copy link
Member

ptheywood commented Oct 1, 2018

Implement network based communication for road network simulation style models.

This should account for multiple styles of network communication:

  • Communication as graph
    • Agents output messages to graph elements
    • Graph is independent of agents
    • I.e. FLAMEGPU1 road network comm
  • Agents as graph
    • Graph is the agents
    • I.e. infectious disease moddelling

Edit

This issues will be closed by #1089, as this will add the initial network support, and enable messages-on-network, networks with a fixed structure.

#1120 has been opened to cover messages-on-mutable-networks

#1121 has been opened to cover agent networks (i.e. social networks)

Ideally #1089 is going to be implemented in such a way that #1120 and #1121 will have a relatively common API, to simplify switching between them and prevent API breaks when implemented.

@ptheywood
Copy link
Member Author

Bucket messaging provides most of the support for this, just need an on-device graph data structure to achieve this. Will postpone for after the first release.

@ptheywood ptheywood removed this from the FGPU1 Parity milestone Oct 20, 2020
@ptheywood ptheywood added this to the v2.Y.Z milestone Aug 11, 2021
@Robadob
Copy link
Member

Robadob commented Jun 16, 2022

Communication as graph

  • Messages are attached to edges
  • Edges are linked to two vertex IDs
  • Write Messages Via
    • Specifying edge ID
    • Specifying two vertex IDs
  • Read Messages Via
    • All messages at edge ID
    • All messages at edge, specified by two vertex IDs
    • All messages on edges attached to vertex ID

This would require a bit of extra metadata to map between two vertexIDs/edge ID, and would make the graph implicit,

@ptheywood
Copy link
Member Author

That will exclude multigraphs (graphs with multiple edges between a pair of vertices), but we might want to ignore multigraphs for now anyway (and then if any use-cases come up implement them separately).

E.g. for road networks, multigraphs can be used to allow per-lane properties for a section of road (e.g. travel time for bus lanes vs regular lanes for routing). In practice you can just add some nodes and use a non-mulit-graph though.

Otherwise providing both sounds good for usability.

There will likely also be a distinction between the user-visible edge ID and the edge index used within the in-memory representation of the graph.

@Robadob
Copy link
Member

Robadob commented Jun 20, 2022

That will exclude multigraphs (graphs with multiple edges between a pair of vertices), but we might want to ignore multigraphs for now anyway (and then if any use-cases come up implement them separately).

Could add an extra argument "edge index" which defaults to 0. But definitely getting more complicated.

There will likely also be a distinction between the user-visible edge ID and the edge index used within the in-memory representation of the graph.

Fair point, definitely needs some thought/planning/discussion. Will probably try to mockup some psuedo code and consider how it would operate on the back-end.

@Robadob
Copy link
Member

Robadob commented Jun 20, 2022

There also seems to be the chicken/egg situation. We can provide a utility for users to convert between vertex pair IDs and edge ID. But where do the initial vertex or edge IDs (which the user knows) come from?

@Robadob Robadob linked a pull request Jul 8, 2022 that will close this issue
23 tasks
@ptheywood ptheywood removed this from the v2.Y.Z milestone Dec 13, 2022
@ptheywood
Copy link
Member Author

Closed by #1089, as this will add the initial network support, and enable messages-on-network, networks with a fixed structure.

#1120 has been opened to cover messages-on-mutable-networks

#1121 has been opened to cover agent networks (i.e. social networks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants