Skip to content

Weighted Temporal Edges #46

Open
Open

Description

@wolfiex

There isn't an option to assign edge weights when adding new links to a temporal network.

Activity

  1. self-assigned this
    on Mar 26, 2019
  2. IngoScholtes commented on Mar 26, 2019

    @IngoScholtes
    Contributor

    Indeed, time-stamped edges currently don't have weights as it is not clear how the weight semantics should be included in the temporal path calculation.

    But we'll add an option for weighted edges, while ignoring them in the path calculation.

  3. wolfiex commented on Mar 26, 2019

    @wolfiex
    Author

    How does the code currently deal with multiple identical edges of the same timestamp?

  4. IngoScholtes commented on Mar 26, 2019

    @IngoScholtes
    Contributor

    Right now, multiple identical edges with the same time stamp will be stored as separate objects. If you create an aggregate static network from it, those multiple edges will be reflected in the edge weights.

    See e.g. in this example:

    import pathpy as pp
    t = pp.TemporalNetwork()
    t.add_edge('a', 'b', 1)
    t.add_edge('a', 'b', 1)
    n = pp.Network.from_temporal_network(t)
    print(n.edges[('a', 'b')])
    

    This gives the output: {'weight': 2.0}

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions