Describe the feature you'd like!
Users should be able to input a DAG and deliberation proceeds from DAG.
Desired implementation:
The Network structure takes in a list of Agents and a structure-specific feature called Edges, where Edges is a list of tuples of the form (src_idx, end_idx). So for example edges = [(0,1), (0,2)] would mean two directed edges---- (0-->1) and (0-->2) --- where these correspond to index of agents in Agents
However, the actual order of processing matters so apply an algorithm for topological sorting. Ensure that given the same edge list, the algorithm will produce the same topological sort of Agents.
Unit tests need to verify everything is working as expected.
Nodes are topologically sorted
The topological sort is actually how the data is being processed
Describe the feature you'd like! Users should be able to input a DAG and deliberation proceeds from DAG.
Desired implementation:
The
Network
structure takes in a list ofAgents
and a structure-specific feature calledEdges
, whereEdges
is a list of tuples of the form(src_idx, end_idx)
. So for example edges = [(0,1), (0,2)] would mean two directed edges---- (0-->1) and (0-->2) --- where these correspond to index of agents inAgents
However, the actual order of processing matters so apply an algorithm for topological sorting. Ensure that given the same edge list, the algorithm will produce the same topological sort of Agents.
Unit tests need to verify everything is working as expected.