Skip to content

Inconsistencies in extracting graph object from model #1155

@prochlorothrix

Description

@prochlorothrix

Not sure whether this is an issue or a feature request, but I'm trying to extract the graph from the model to plot it with GraphPlot and it seems to be difficult or impossible to re-link the edge structure with the node (that is agent) properties. Ideally, I'd extract the space, defined for instance as GraphSpace(SimpleGraph(x, y)), and then attribute the correct agent properties to each node using the agent IDs as key.

The problem is that, extracting the graph structure with getfield(model, :space).graph returns a graph object with node IDs that are not consistent with the agent ones I get from allagents(model). This means that I'm no longer able to attribute the correct properties to each node.

There may be some workaround I did not find yet, but enforcing coherence between the different elements of the model would be really useful, especially for people working with ABMs on dynamic networks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions