-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate shortest path code (#176)
The code was identical except for comments and print statements. So now we move it all into a single function that is part of the package, so the individual scripts are just a few lines. Only AGV was an outlier since it had a lot of code after the shared code. Perhaps @rbruijnshkv can comment on if that is needed or not. Another difference I noticed is this, AGV has this set to 5: ``` distance_interval = 50 # The distance interval you want to segment the lines at ``` This only deduplicates, I didn't want to start modifying the code at the same time. So I cannot run it since it relies on local paths that I don't have.
- Loading branch information
Showing
14 changed files
with
479 additions
and
4,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
455 changes: 2 additions & 453 deletions
455
src/peilbeheerst_model/Shortest_path/01_shortest_path_Hollandse_Delta.py
Large diffs are not rendered by default.
Oops, something went wrong.
454 changes: 2 additions & 452 deletions
454
src/peilbeheerst_model/Shortest_path/02_shortest_path_HHSK.py
Large diffs are not rendered by default.
Oops, something went wrong.
454 changes: 2 additions & 452 deletions
454
src/peilbeheerst_model/Shortest_path/03_shortest_path_HHNK.py
Large diffs are not rendered by default.
Oops, something went wrong.
453 changes: 2 additions & 451 deletions
453
src/peilbeheerst_model/Shortest_path/04_shortest_path_Delfland.py
Large diffs are not rendered by default.
Oops, something went wrong.
453 changes: 2 additions & 451 deletions
453
src/peilbeheerst_model/Shortest_path/05_shortest_path_Scheldestromen.py
Large diffs are not rendered by default.
Oops, something went wrong.
458 changes: 2 additions & 456 deletions
458
src/peilbeheerst_model/Shortest_path/06_shortest_path_Zuiderzeeland.py
Large diffs are not rendered by default.
Oops, something went wrong.
453 changes: 2 additions & 451 deletions
453
src/peilbeheerst_model/Shortest_path/07_shortest_path_WSRL.py
Large diffs are not rendered by default.
Oops, something went wrong.
454 changes: 2 additions & 452 deletions
454
src/peilbeheerst_model/Shortest_path/08_shortest_path_Wetterskip.py
Large diffs are not rendered by default.
Oops, something went wrong.
457 changes: 2 additions & 455 deletions
457
src/peilbeheerst_model/Shortest_path/09_shortest_path_Rijnland.py
Large diffs are not rendered by default.
Oops, something went wrong.
700 changes: 3 additions & 697 deletions
700
src/peilbeheerst_model/Shortest_path/10_shortest_path_AGV.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
__version__ = "0.1.0" | ||
|
||
from peilbeheerst_model.parse_crossings import ParseCrossings | ||
from peilbeheerst_model.shortest_path import shortest_path_waterschap | ||
from peilbeheerst_model.waterschappen import waterschap_data | ||
|
||
__all__ = ["ParseCrossings", "waterschap_data"] | ||
__all__ = ["ParseCrossings", "shortest_path_waterschap", "waterschap_data"] |
443 changes: 443 additions & 0 deletions
443
src/peilbeheerst_model/peilbeheerst_model/shortest_path.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters