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

data_manipulation_sh(network) fails to find biggest indices #133

Closed
jankaeh opened this issue Feb 22, 2018 · 3 comments
Closed

data_manipulation_sh(network) fails to find biggest indices #133

jankaeh opened this issue Feb 22, 2018 · 3 comments

Comments

@jankaeh
Copy link
Contributor

jankaeh commented Feb 22, 2018

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.

@ulfmueller
Copy link
Member

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?

btw: do I know you personally?

@jankaeh
Copy link
Contributor Author

jankaeh commented Mar 1, 2018

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

No, we don't know each other :)

@wolfbunke
Copy link
Member

@ulfmueller, is this relevant for the 0.7 Release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants