-
Notifications
You must be signed in to change notification settings - Fork 204
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
Improve computational performance of build_osm_network #845
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@mnm-matin Performances of this PR on US leads to a x100 speed increase and to halve the RAM requirements. Results are not exactly matching, mainly because the DBSCAN algorithm clusters together more nodes with the same tolerance hence leading to more lines to be dropped because starting and ending in the same node. I think it is worth testing for a smaller country than US for the performances, then this PR would be ready I think. Update:
|
@davide-f would you not recommend using the changes in this PR? Not sure why it was closed. |
Hi all, I am currently using this PR to work on the US model run. - start [Fri Aug 2 16:13:17 2024]
- stop [Fri Aug 2 16:16:49 2024] My laptop runs MBP M1 32gb ram. It completed the build_osm_network process in about 5mins which is super fast. I have been running the US model now for days. |
Hi, @davide-f. This is a very great lifesaving PR. It would be fantastic if it can be merged. |
This PR, after all the recent changes, achieves an objective value of 2.51e+9 on the tutorial that compares well to 2.54e+9 in https://github.com/pypsa-meets-earth/pypsa-earth/actions/runs/12447612841/job/34751281672 Difference is acceptable for me |
Closes #806
and contributes to #445
Changes proposed in this Pull Request
This PR merges #807 #808 and #799
It completely revise the algorithm of set_lines_ids, set_substation_ids and fix_overpassing_nodes
Speedup increase is x100 for US with half the RAM consumption of the previous implementation.
PR coauthored with @mnm-matin
Checklist
envs/environment.yaml
anddoc/requirements.txt
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.