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

Weighted Temporal Edges #46

Open
wolfiex opened this issue Mar 25, 2019 · 3 comments
Open

Weighted Temporal Edges #46

wolfiex opened this issue Mar 25, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@wolfiex
Copy link

wolfiex commented Mar 25, 2019

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

@IngoScholtes IngoScholtes self-assigned this Mar 26, 2019
@IngoScholtes IngoScholtes added the enhancement New feature or request label Mar 26, 2019
@IngoScholtes
Copy link
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.

@wolfiex
Copy link
Author

wolfiex commented Mar 26, 2019

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

@IngoScholtes
Copy link
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
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants