{"action":"created","issue":{"url":"https://api.github.com/repos/lthurner/pandapower/issues/85","repository_url":"https://api.github.com/repos/lthurner/pandapower","labels_url":"https://api.github.com/repos/lthurner/pandapower/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/lthurner/pandapower/issues/85/comments","events_url":"https://api.github.com/repos/lthurner/pandapower/issues/85/events","html_url":"https://github.com/lthurner/pandapower/issues/85","id":282812163,"node_id":"MDU6SXNzdWUyODI4MTIxNjM=","number":85,"title":"parallel lines in multigraph","user":{"login":"lthurner","id":23637821,"node_id":"MDQ6VXNlcjIzNjM3ODIx","avatar_url":"https://avatars1.githubusercontent.com/u/23637821?v=4","gravatar_id":"","url":"https://api.github.com/users/lthurner","html_url":"https://github.com/lthurner","followers_url":"https://api.github.com/users/lthurner/followers","following_url":"https://api.github.com/users/lthurner/following{/other_user}","gists_url":"https://api.github.com/users/lthurner/gists{/gist_id}","starred_url":"https://api.github.com/users/lthurner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lthurner/subscriptions","organizations_url":"https://api.github.com/users/lthurner/orgs","repos_url":"https://api.github.com/users/lthurner/repos","events_url":"https://api.github.com/users/lthurner/events{/privacy}","received_events_url":"https://api.github.com/users/lthurner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-18T09:24:37Z","updated_at":"2018-07-12T07:35:39Z","closed_at":null,"author_association":"OWNER","body":"edges in multigraph for parallel lines currently are translated like this:\r\n{\r\n0: {\"weight\": 1, \"key\": 2, \"element\": \"l\"},\r\n1: {\"weight\": 1, \"key\": 3, \"element\": \"l\"}\r\n}\r\n\r\nfor two pandapower lines with indices 2/3 and length 1.\r\n\r\nWouldn't it be cleaner to implement it like this:\r\n\r\n{\r\n2: {\"weight\": 1, \"element\": \"l\", \"idx\": 2},\r\n3: {\"weight\": 1, \"element\": \"l\", \"idx\": 3}\r\n}\r\n\r\nCalling the parameter \"key\" is also a bit unfortunate, because \"key\" is also the name of the networkx edge attribute, which is confusing and also leads to problems with networkx 2.0\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lthurner/pandapower/issues/comments/404418313","html_url":"https://github.com/lthurner/pandapower/issues/85#issuecomment-404418313","issue_url":"https://api.github.com/repos/lthurner/pandapower/issues/85","id":404418313,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDQxODMxMw==","user":{"login":"WinfriedL","id":37797648,"node_id":"MDQ6VXNlcjM3Nzk3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/37797648?v=4","gravatar_id":"","url":"https://api.github.com/users/WinfriedL","html_url":"https://github.com/WinfriedL","followers_url":"https://api.github.com/users/WinfriedL/followers","following_url":"https://api.github.com/users/WinfriedL/following{/other_user}","gists_url":"https://api.github.com/users/WinfriedL/gists{/gist_id}","starred_url":"https://api.github.com/users/WinfriedL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WinfriedL/subscriptions","organizations_url":"https://api.github.com/users/WinfriedL/orgs","repos_url":"https://api.github.com/users/WinfriedL/repos","events_url":"https://api.github.com/users/WinfriedL/events{/privacy}","received_events_url":"https://api.github.com/users/WinfriedL/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T07:35:39Z","updated_at":"2018-07-12T07:35:39Z","author_association":"CONTRIBUTOR","body":"> Wouldn't it be cleaner to implement it like this:\r\n> \r\n> {\r\n> 2: {\"weight\": 1, \"element\": \"l\", \"idx\": 2},\r\n> 3: {\"weight\": 1, \"element\": \"l\", \"idx\": 3}\r\n> }\r\n\r\nCleaner, yes, but dangerous. While not common, it is possible that two branches of different type (e.g. line and impedance) connect the same two buses. Those can have the same index. So one of the networkx edge dictionary entries, where the key is a tuple (from_bus, to_bus, index), gets overwritten.\r\nThe chances might be slim, but not impossible.\r\n\r\n> i wouldn't call it \"idx\" though. \"line_index\" is cleaner.\r\n\r\nNot all edges are lines, and having different attribute names for different edge types seems like a bad idea to me.\r\n\r\nMaybe just \"index\"?"}}
{"actor":{"display_login":"WinfriedL"}}