You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if I'm the only one stumbling over this, but the code of the function data_manipulation_sh(network) at eTraGo/utilities.py does not find the biggest index correctly on my System.
This code does not find the maximum of the indices correctly if they are str, because '9' is bigger than '1', '9999' is bigger than '10000':
new_bus = str(int(network.buses.index.max())+1)
I changed the lines 296-298 to:
new_bus = str(network.buses.index.astype(np.int64).max()+1)
new_trafo = str(network.transformers.index.astype(np.int64).max()+1)
new_line = str(network.lines.index.astype(np.int64).max()+1)
Maybe it's more robust.
The text was updated successfully, but these errors were encountered:
Sounds good. Thanks for your debugging! Would you implement this in a feature branch (branching from dev) and create a pull request to merge your changes into dev?
I opened a pull requests.
I just realized that the new trafo from this function has x=1.29960, which is by far the biggest, if the foreign trafos are clipped. It's 6498 times bigger than the second biggest.
Do I miss a point where you change the electrical properties for all components, or do you calculate directly with the values in the tables from the database?
If so this might be relevant: openego/osmTGmod#14
I don't know if I'm the only one stumbling over this, but the code of the function data_manipulation_sh(network) at eTraGo/utilities.py does not find the biggest index correctly on my System.
This code does not find the maximum of the indices correctly if they are str, because '9' is bigger than '1', '9999' is bigger than '10000':
new_bus = str(int(network.buses.index.max())+1)
I changed the lines 296-298 to:
new_bus = str(network.buses.index.astype(np.int64).max()+1)
new_trafo = str(network.transformers.index.astype(np.int64).max()+1)
new_line = str(network.lines.index.astype(np.int64).max()+1)
Maybe it's more robust.
The text was updated successfully, but these errors were encountered: