pyorps 0.3.2__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyorps-0.3.2 → pyorps-0.5.0}/MANIFEST.in +2 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/PKG-INFO +152 -24
- pyorps-0.3.2/pyorps.egg-info/PKG-INFO → pyorps-0.5.0/README.md +103 -83
- pyorps-0.5.0/pyorps/__init__.py +200 -0
- pyorps-0.5.0/pyorps/certify/__init__.py +80 -0
- pyorps-0.5.0/pyorps/certify/feasible_incumbent.py +161 -0
- pyorps-0.5.0/pyorps/certify/line_integral.py +108 -0
- pyorps-0.5.0/pyorps/certify/prune.py +173 -0
- pyorps-0.5.0/pyorps/certify/rv.py +304 -0
- pyorps-0.5.0/pyorps/certify/voltage.py +163 -0
- pyorps-0.5.0/pyorps/certify/windows.py +353 -0
- pyorps-0.5.0/pyorps/collector/__init__.py +207 -0
- pyorps-0.5.0/pyorps/collector/_voltage_numba.py +172 -0
- pyorps-0.5.0/pyorps/collector/bounds.py +394 -0
- pyorps-0.5.0/pyorps/collector/bounds_window.py +206 -0
- pyorps-0.5.0/pyorps/collector/condition_c.py +160 -0
- pyorps-0.5.0/pyorps/collector/design.py +341 -0
- pyorps-0.5.0/pyorps/collector/exact.py +128 -0
- pyorps-0.5.0/pyorps/collector/model.py +392 -0
- pyorps-0.5.0/pyorps/collector/raster.py +737 -0
- pyorps-0.5.0/pyorps/collector/raster_pricer.py +90 -0
- pyorps-0.5.0/pyorps/collector/reference.py +1068 -0
- pyorps-0.5.0/pyorps/collector/voltage.py +928 -0
- pyorps-0.5.0/pyorps/collector/voltage_batch.py +685 -0
- pyorps-0.5.0/pyorps/collector/voltage_pgm.py +340 -0
- pyorps-0.5.0/pyorps/collector/voltage_plant.py +804 -0
- pyorps-0.5.0/pyorps/collector/voltage_rv.py +224 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/core/__init__.py +46 -2
- pyorps-0.5.0/pyorps/core/constrained_path.py +209 -0
- pyorps-0.5.0/pyorps/core/corridor.py +510 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/core/cost_assumptions.py +556 -43
- pyorps-0.5.0/pyorps/core/ensemble.py +150 -0
- pyorps-0.5.0/pyorps/core/exceptions.py +367 -0
- pyorps-0.5.0/pyorps/core/infrastructure_profile.py +359 -0
- pyorps-0.5.0/pyorps/core/metric_stack.py +726 -0
- pyorps-0.5.0/pyorps/core/objective.py +602 -0
- pyorps-0.5.0/pyorps/core/optional_deps.py +33 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/core/path.py +131 -2
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/core/types.py +6 -4
- pyorps-0.5.0/pyorps/core/warning_types.py +62 -0
- pyorps-0.5.0/pyorps/costmodel/__init__.py +79 -0
- pyorps-0.5.0/pyorps/costmodel/access_road.py +266 -0
- pyorps-0.5.0/pyorps/costmodel/branch_constants.py +92 -0
- pyorps-0.5.0/pyorps/costmodel/catalogue.py +227 -0
- pyorps-0.5.0/pyorps/costmodel/collector_inputs.py +314 -0
- pyorps-0.5.0/pyorps/costmodel/consent.py +179 -0
- pyorps-0.5.0/pyorps/costmodel/hv_leg.py +165 -0
- pyorps-0.5.0/pyorps/costmodel/losses.py +218 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/__init__.py +43 -0
- pyorps-0.5.0/pyorps/graph/api/cython_api.py +343 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/graph_api.py +2 -2
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/graph_library_api.py +254 -37
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/igraph_api.py +10 -6
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/networkit_api.py +9 -7
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/networkx_api.py +10 -7
- pyorps-0.5.0/pyorps/graph/api/raster_fim_api.py +1698 -0
- pyorps-0.5.0/pyorps/graph/api/raster_gpu_api.py +593 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/rustworkx_api.py +24 -11
- pyorps-0.5.0/pyorps/graph/constrained_path_finder.py +2822 -0
- pyorps-0.5.0/pyorps/graph/corridor.py +633 -0
- pyorps-0.5.0/pyorps/graph/drain.py +171 -0
- pyorps-0.5.0/pyorps/graph/mixed_legs.py +157 -0
- pyorps-0.5.0/pyorps/graph/path_finder.py +4541 -0
- pyorps-0.5.0/pyorps/graph/search_session.py +2982 -0
- pyorps-0.5.0/pyorps/graph/span_clearance.py +221 -0
- pyorps-0.5.0/pyorps/graph/tower_field.py +2132 -0
- pyorps-0.5.0/pyorps/graph/tower_field_oracle.py +491 -0
- pyorps-0.5.0/pyorps/gui/__init__.py +24 -0
- pyorps-0.5.0/pyorps/gui/__main__.py +195 -0
- pyorps-0.5.0/pyorps/gui/app.py +550 -0
- pyorps-0.5.0/pyorps/gui/assets/00-bootstrap.min.css +6 -0
- pyorps-0.5.0/pyorps/gui/assets/basemap-control.js +12 -0
- pyorps-0.5.0/pyorps/gui/assets/draw-preview.js +49 -0
- pyorps-0.5.0/pyorps/gui/assets/dropdown-close.js +50 -0
- pyorps-0.5.0/pyorps/gui/assets/grid-fit.js +98 -0
- pyorps-0.5.0/pyorps/gui/assets/gui.css +1306 -0
- pyorps-0.5.0/pyorps/gui/assets/leaflet-global-shim.js +78 -0
- pyorps-0.5.0/pyorps/gui/assets/sidebar-resize.js +60 -0
- pyorps-0.5.0/pyorps/gui/assets/table-resize.js +72 -0
- pyorps-0.5.0/pyorps/gui/assets/unsaved-guard.js +20 -0
- pyorps-0.5.0/pyorps/gui/callbacks/__init__.py +53 -0
- pyorps-0.5.0/pyorps/gui/callbacks/attrs.py +102 -0
- pyorps-0.5.0/pyorps/gui/callbacks/browse.py +82 -0
- pyorps-0.5.0/pyorps/gui/callbacks/confirm.py +310 -0
- pyorps-0.5.0/pyorps/gui/callbacks/constrained.py +703 -0
- pyorps-0.5.0/pyorps/gui/callbacks/corridor.py +262 -0
- pyorps-0.5.0/pyorps/gui/callbacks/cost_field.py +406 -0
- pyorps-0.5.0/pyorps/gui/callbacks/costmodel.py +691 -0
- pyorps-0.5.0/pyorps/gui/callbacks/data.py +984 -0
- pyorps-0.5.0/pyorps/gui/callbacks/edit.py +858 -0
- pyorps-0.5.0/pyorps/gui/callbacks/groups.py +371 -0
- pyorps-0.5.0/pyorps/gui/callbacks/guide.py +80 -0
- pyorps-0.5.0/pyorps/gui/callbacks/interaction.py +179 -0
- pyorps-0.5.0/pyorps/gui/callbacks/io.py +438 -0
- pyorps-0.5.0/pyorps/gui/callbacks/job_poll.py +130 -0
- pyorps-0.5.0/pyorps/gui/callbacks/layers.py +837 -0
- pyorps-0.5.0/pyorps/gui/callbacks/notifications.py +196 -0
- pyorps-0.5.0/pyorps/gui/callbacks/objective.py +613 -0
- pyorps-0.5.0/pyorps/gui/callbacks/profile_form.py +523 -0
- pyorps-0.5.0/pyorps/gui/callbacks/raster.py +1094 -0
- pyorps-0.5.0/pyorps/gui/callbacks/raster_job.py +42 -0
- pyorps-0.5.0/pyorps/gui/callbacks/routes.py +882 -0
- pyorps-0.5.0/pyorps/gui/callbacks/theme.py +57 -0
- pyorps-0.5.0/pyorps/gui/ids.py +491 -0
- pyorps-0.5.0/pyorps/gui/layout.py +2256 -0
- pyorps-0.5.0/pyorps/gui/presets.py +551 -0
- pyorps-0.5.0/pyorps/gui/sections/__init__.py +21 -0
- pyorps-0.5.0/pyorps/gui/sections/corridor.py +204 -0
- pyorps-0.5.0/pyorps/gui/sections/cost_field.py +192 -0
- pyorps-0.5.0/pyorps/gui/sections/objective.py +434 -0
- pyorps-0.5.0/pyorps/gui/sections/profile_form.py +643 -0
- pyorps-0.5.0/pyorps/gui/services/__init__.py +1 -0
- pyorps-0.5.0/pyorps/gui/services/catalog.py +183 -0
- pyorps-0.5.0/pyorps/gui/services/combinations.py +365 -0
- pyorps-0.5.0/pyorps/gui/services/constrained.py +689 -0
- pyorps-0.5.0/pyorps/gui/services/constrained_ends.py +695 -0
- pyorps-0.5.0/pyorps/gui/services/constrained_ends_checks.py +266 -0
- pyorps-0.5.0/pyorps/gui/services/constrained_objective.py +380 -0
- pyorps-0.5.0/pyorps/gui/services/corridor.py +670 -0
- pyorps-0.5.0/pyorps/gui/services/corridor_checks.py +458 -0
- pyorps-0.5.0/pyorps/gui/services/cost.py +159 -0
- pyorps-0.5.0/pyorps/gui/services/cost_field.py +717 -0
- pyorps-0.5.0/pyorps/gui/services/cost_field_run.py +564 -0
- pyorps-0.5.0/pyorps/gui/services/cost_model.py +482 -0
- pyorps-0.5.0/pyorps/gui/services/data_io.py +171 -0
- pyorps-0.5.0/pyorps/gui/services/dialog_worker.py +89 -0
- pyorps-0.5.0/pyorps/gui/services/dialogs.py +169 -0
- pyorps-0.5.0/pyorps/gui/services/errors.py +647 -0
- pyorps-0.5.0/pyorps/gui/services/geo.py +199 -0
- pyorps-0.5.0/pyorps/gui/services/graduated.py +226 -0
- pyorps-0.5.0/pyorps/gui/services/jobs.py +494 -0
- pyorps-0.5.0/pyorps/gui/services/logbook.py +103 -0
- pyorps-0.5.0/pyorps/gui/services/manual_cost.py +194 -0
- pyorps-0.5.0/pyorps/gui/services/objective.py +630 -0
- pyorps-0.5.0/pyorps/gui/services/objective_model.py +456 -0
- pyorps-0.5.0/pyorps/gui/services/osm.py +301 -0
- pyorps-0.5.0/pyorps/gui/services/profile_form.py +588 -0
- pyorps-0.5.0/pyorps/gui/services/profile_form_checks.py +559 -0
- pyorps-0.5.0/pyorps/gui/services/project_io.py +481 -0
- pyorps-0.5.0/pyorps/gui/services/raster_algebra.py +143 -0
- pyorps-0.5.0/pyorps/gui/services/rasterize.py +537 -0
- pyorps-0.5.0/pyorps/gui/services/routing.py +739 -0
- pyorps-0.5.0/pyorps/gui/services/routing_backends.py +233 -0
- pyorps-0.5.0/pyorps/gui/services/routing_job.py +94 -0
- pyorps-0.5.0/pyorps/gui/services/tiles.py +413 -0
- pyorps-0.5.0/pyorps/gui/services/validate.py +221 -0
- pyorps-0.5.0/pyorps/gui/state.py +568 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/io/__init__.py +15 -1
- pyorps-0.5.0/pyorps/io/field_codec.py +426 -0
- pyorps-0.5.0/pyorps/io/geo_dataset.py +594 -0
- pyorps-0.5.0/pyorps/io/gpu_raster.py +149 -0
- pyorps-0.5.0/pyorps/io/provenance.py +375 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/io/raster_loader.py +125 -78
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/io/vector_loader.py +472 -164
- pyorps-0.5.0/pyorps/raster/__init__.py +59 -0
- pyorps-0.5.0/pyorps/raster/_geojson.py +159 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/raster/handler.py +345 -75
- pyorps-0.5.0/pyorps/raster/handler_helpers.py +192 -0
- pyorps-0.5.0/pyorps/raster/rasterizer.py +2164 -0
- pyorps-0.5.0/pyorps/raster/thinness.py +1598 -0
- pyorps-0.5.0/pyorps/siting/__init__.py +115 -0
- pyorps-0.5.0/pyorps/siting/bounds.py +322 -0
- pyorps-0.5.0/pyorps/siting/candidates.py +200 -0
- pyorps-0.5.0/pyorps/siting/data_manifest.py +425 -0
- pyorps-0.5.0/pyorps/siting/export.py +282 -0
- pyorps-0.5.0/pyorps/siting/footprint.py +304 -0
- pyorps-0.5.0/pyorps/siting/hv_towers.py +89 -0
- pyorps-0.5.0/pyorps/siting/lattice_bounds.py +83 -0
- pyorps-0.5.0/pyorps/siting/site_field.py +318 -0
- pyorps-0.5.0/pyorps/siting/terminals.py +118 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/__init__.py +4 -3
- pyorps-0.5.0/pyorps/utils/_constrained_context.cpp +45729 -0
- pyorps-0.5.0/pyorps/utils/_constrained_context.pxd +227 -0
- pyorps-0.5.0/pyorps/utils/_constrained_context.pyx +1073 -0
- pyorps-0.5.0/pyorps/utils/_constrained_delta.cpp +70095 -0
- pyorps-0.5.0/pyorps/utils/_constrained_delta.pyx +3000 -0
- pyorps-0.5.0/pyorps/utils/_constrained_dijkstra.cpp +45510 -0
- pyorps-0.5.0/pyorps/utils/_constrained_dijkstra.pyx +1022 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_delta_stepping.cpp +50863 -37003
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_delta_stepping.pyx +1096 -597
- pyorps-0.5.0/pyorps/utils/_delta_stepping_fused.cpp +42920 -0
- pyorps-0.5.0/pyorps/utils/_delta_stepping_fused.pyx +760 -0
- pyorps-0.5.0/pyorps/utils/_dijkstra.cpp +74654 -0
- pyorps-0.5.0/pyorps/utils/_dijkstra.pyx +2322 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_heap.cpp +6540 -4140
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_raster_context.cpp +23209 -18934
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_raster_context.pxd +1 -1
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_raster_context.pyx +26 -8
- pyorps-0.5.0/pyorps/utils/_traversal.cpp +49188 -0
- pyorps-0.5.0/pyorps/utils/_traversal.pxd +33 -0
- pyorps-0.5.0/pyorps/utils/_traversal.pyx +927 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_traversal_numba.py +227 -27
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/atomic_cas.h +101 -3
- pyorps-0.5.0/pyorps/utils/constrained_path_algorithms.py +16 -0
- pyorps-0.5.0/pyorps/utils/constrained_path_algorithms.pyx +754 -0
- pyorps-0.5.0/pyorps/utils/constrained_sssp_gpu.py +926 -0
- pyorps-0.5.0/pyorps/utils/constrained_sssp_gpu_v2.py +1679 -0
- pyorps-0.5.0/pyorps/utils/constrained_sssp_gpu_v4.py +1277 -0
- pyorps-0.5.0/pyorps/utils/directional.py +396 -0
- pyorps-0.5.0/pyorps/utils/eikonal_gpu.py +3805 -0
- pyorps-0.5.0/pyorps/utils/kernels/__init__.py +0 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_bucket_queue.cuh +199 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_common.cuh +83 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_init.cu +84 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_mtb.cuh +324 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_tower.cuh +176 -0
- pyorps-0.5.0/pyorps/utils/kernels/adds_wtb.cuh +279 -0
- pyorps-0.5.0/pyorps/utils/kernels/block_sparse.cuh +176 -0
- pyorps-0.5.0/pyorps/utils/kernels/classify_bucket.cu +46 -0
- pyorps-0.5.0/pyorps/utils/kernels/clearance.cuh +133 -0
- pyorps-0.5.0/pyorps/utils/kernels/common.cuh +31 -0
- pyorps-0.5.0/pyorps/utils/kernels/constrained_adds.cu +201 -0
- pyorps-0.5.0/pyorps/utils/kernels/constrained_persistent.cu +1086 -0
- pyorps-0.5.0/pyorps/utils/kernels/dynamic_blocks.cuh +166 -0
- pyorps-0.5.0/pyorps/utils/kernels/grid_barrier.cuh +21 -0
- pyorps-0.5.0/pyorps/utils/kernels/hash_table.cuh +68 -0
- pyorps-0.5.0/pyorps/utils/kernels/init_dynamic.cu +46 -0
- pyorps-0.5.0/pyorps/utils/kernels/init_source.cu +56 -0
- pyorps-0.5.0/pyorps/utils/kernels/scan_min.cu +61 -0
- pyorps-0.5.0/pyorps/utils/kernels/state_access.cuh +91 -0
- pyorps-0.5.0/pyorps/utils/linestring_simplify.py +121 -0
- pyorps-0.5.0/pyorps/utils/metric_edges.py +217 -0
- pyorps-0.5.0/pyorps/utils/metric_eval.py +341 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/neighborhood.py +65 -20
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/path_algorithms.py +14 -12
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/path_core.py +2 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/plotting.py +10 -9
- pyorps-0.5.0/pyorps/utils/resources.py +86 -0
- pyorps-0.5.0/pyorps/utils/sssp_async_v5.cu +548 -0
- pyorps-0.5.0/pyorps/utils/sssp_gpu.py +3179 -0
- pyorps-0.5.0/pyorps/utils/traversal.py +97 -0
- pyorps-0.5.0/pyorps/utils/traversal_gpu.py +169 -0
- pyorps-0.5.0/pyorps/webviz/__init__.py +30 -0
- pyorps-0.5.0/pyorps/webviz/__main__.py +71 -0
- pyorps-0.5.0/pyorps/webviz/app.py +413 -0
- pyorps-0.5.0/pyorps/webviz/builder.py +35 -0
- pyorps-0.5.0/pyorps/webviz/cost.py +7 -0
- pyorps-0.5.0/pyorps/webviz/geo.py +15 -0
- pyorps-0.5.0/pyorps/webviz/layout.py +289 -0
- pyorps-0.5.0/pyorps/webviz/reroute.py +15 -0
- pyorps-0.5.0/pyorps/webviz/tiles.py +9 -0
- pyorps-0.5.0/pyorps/webviz/viewer.py +304 -0
- pyorps-0.3.2/README.md → pyorps-0.5.0/pyorps.egg-info/PKG-INFO +211 -15
- pyorps-0.5.0/pyorps.egg-info/SOURCES.txt +260 -0
- pyorps-0.5.0/pyorps.egg-info/requires.txt +112 -0
- pyorps-0.5.0/pyproject.toml +269 -0
- pyorps-0.5.0/setup.py +363 -0
- pyorps-0.5.0/tests/test_build_provenance.py +812 -0
- pyorps-0.5.0/tests/test_ci_hygiene.py +208 -0
- pyorps-0.5.0/tests/test_exactness_referee.py +611 -0
- pyorps-0.5.0/tests/test_examples_smoke.py +515 -0
- pyorps-0.5.0/tests/test_notebooks.py +42 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/tests/test_security_hardening.py +14 -14
- pyorps-0.5.0/tests/test_tutorial_generator.py +248 -0
- pyorps-0.3.2/pyorps/__init__.py +0 -70
- pyorps-0.3.2/pyorps/core/exceptions.py +0 -131
- pyorps-0.3.2/pyorps/graph/api/cython_api.py +0 -179
- pyorps-0.3.2/pyorps/graph/path_finder.py +0 -1127
- pyorps-0.3.2/pyorps/io/geo_dataset.py +0 -339
- pyorps-0.3.2/pyorps/raster/__init__.py +0 -23
- pyorps-0.3.2/pyorps/raster/rasterizer.py +0 -737
- pyorps-0.3.2/pyorps/utils/_dijkstra.cpp +0 -40678
- pyorps-0.3.2/pyorps/utils/_dijkstra.pyx +0 -726
- pyorps-0.3.2/pyorps/utils/traversal.py +0 -68
- pyorps-0.3.2/pyorps.egg-info/SOURCES.txt +0 -53
- pyorps-0.3.2/pyorps.egg-info/requires.txt +0 -55
- pyorps-0.3.2/pyproject.toml +0 -144
- pyorps-0.3.2/setup.py +0 -156
- {pyorps-0.3.2 → pyorps-0.5.0}/LICENSE +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/graph/api/__init__.py +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_heap.pxd +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps/utils/_heap.pyx +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps.egg-info/dependency_links.txt +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps.egg-info/not-zip-safe +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/pyorps.egg-info/top_level.txt +0 -0
- {pyorps-0.3.2 → pyorps-0.5.0}/setup.cfg +0 -0
|
@@ -7,6 +7,8 @@ recursive-include pyorps *.py
|
|
|
7
7
|
recursive-include pyorps *.pyx
|
|
8
8
|
recursive-include pyorps *.pxd
|
|
9
9
|
recursive-include pyorps *.cpp
|
|
10
|
+
recursive-include pyorps *.cu
|
|
11
|
+
recursive-include pyorps *.cuh
|
|
10
12
|
|
|
11
13
|
recursive-exclude pyorps *.pyc
|
|
12
14
|
recursive-exclude pyorps __pycache__
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyorps
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: PYORPS - (Python for Optimal Routes in Power Systems)
|
|
5
5
|
Author-email: Martin Hofmann <martin.hofmann-3@ei.thm.de>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,19 +9,22 @@ Project-URL: Bug Tracker, https://github.com/marhofmann/pyorps/issues
|
|
|
9
9
|
Keywords: power line routing,distribution grid,power systems planning,path finding,rasterized GIS data
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
15
16
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
16
17
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
17
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.12
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
License-File: LICENSE
|
|
20
21
|
Requires-Dist: numpy>=2.0.0
|
|
21
22
|
Requires-Dist: pandas>=2.2.0
|
|
22
23
|
Requires-Dist: geopandas>=1.0.0
|
|
24
|
+
Requires-Dist: shapely>=2.0.0
|
|
23
25
|
Requires-Dist: numba>=0.61.0
|
|
24
26
|
Requires-Dist: rasterio>=1.4.0
|
|
27
|
+
Requires-Dist: scipy>=1.11
|
|
25
28
|
Requires-Dist: matplotlib>=3.10.0
|
|
26
29
|
Requires-Dist: requests>=2.32.0
|
|
27
30
|
Requires-Dist: defusedxml>=0.7.0
|
|
@@ -30,21 +33,55 @@ Provides-Extra: graph
|
|
|
30
33
|
Requires-Dist: rustworkx>=0.16.0; extra == "graph"
|
|
31
34
|
Requires-Dist: python-igraph>=0.11.0; extra == "graph"
|
|
32
35
|
Requires-Dist: networkx>=3.4.0; extra == "graph"
|
|
33
|
-
Requires-Dist: networkit>=11.1; extra == "graph"
|
|
36
|
+
Requires-Dist: networkit>=11.1; sys_platform != "darwin" and extra == "graph"
|
|
34
37
|
Provides-Extra: dev
|
|
35
38
|
Requires-Dist: coverage[toml]>=7.8.0; extra == "dev"
|
|
36
39
|
Requires-Dist: pytest>=8.3.0; extra == "dev"
|
|
37
40
|
Requires-Dist: cython>=3.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff<0.16,>=0.15; extra == "dev"
|
|
38
42
|
Provides-Extra: examples
|
|
39
43
|
Requires-Dist: notebook>=7.4.0; extra == "examples"
|
|
40
|
-
Requires-Dist: fiona>=1.10.0; extra == "examples"
|
|
44
|
+
Requires-Dist: fiona>=1.10.0; python_version < "3.14" and extra == "examples"
|
|
41
45
|
Provides-Extra: case-studies
|
|
42
46
|
Requires-Dist: notebook>=7.4.0; extra == "case-studies"
|
|
43
|
-
Requires-Dist: fiona>=1.10.0; extra == "case-studies"
|
|
44
|
-
Requires-Dist: pandapower>=3.0.0; extra == "case-studies"
|
|
47
|
+
Requires-Dist: fiona>=1.10.0; python_version < "3.14" and extra == "case-studies"
|
|
48
|
+
Requires-Dist: pandapower>=3.0.0; python_version < "3.15" and extra == "case-studies"
|
|
45
49
|
Requires-Dist: contextily>=1.6.0; extra == "case-studies"
|
|
50
|
+
Requires-Dist: pyyaml>=6.0; extra == "case-studies"
|
|
46
51
|
Provides-Extra: additionals
|
|
47
52
|
Requires-Dist: openpyxl>=3.1.0; extra == "additionals"
|
|
53
|
+
Provides-Extra: yaml
|
|
54
|
+
Requires-Dist: pyyaml>=6.0; extra == "yaml"
|
|
55
|
+
Provides-Extra: gui
|
|
56
|
+
Requires-Dist: dash>=3.0.0; extra == "gui"
|
|
57
|
+
Requires-Dist: dash-leaflet>=1.1.0; extra == "gui"
|
|
58
|
+
Requires-Dist: dash-ag-grid>=31.0.0; extra == "gui"
|
|
59
|
+
Requires-Dist: dash-extensions>=1.0.0; extra == "gui"
|
|
60
|
+
Requires-Dist: dash-bootstrap-components>=1.6.0; extra == "gui"
|
|
61
|
+
Requires-Dist: localtileserver>=0.10.0; extra == "gui"
|
|
62
|
+
Requires-Dist: pywebview>=5.0; extra == "gui"
|
|
63
|
+
Requires-Dist: pyyaml>=6.0; extra == "gui"
|
|
64
|
+
Requires-Dist: orjson>=3.10; extra == "gui"
|
|
65
|
+
Requires-Dist: flask-compress>=1.15; extra == "gui"
|
|
66
|
+
Requires-Dist: pyarrow>=17.0; extra == "gui"
|
|
67
|
+
Requires-Dist: waitress>=3.0; extra == "gui"
|
|
68
|
+
Requires-Dist: geobuf>=1.1; extra == "gui"
|
|
69
|
+
Provides-Extra: viz
|
|
70
|
+
Requires-Dist: dash>=3.0.0; extra == "viz"
|
|
71
|
+
Requires-Dist: dash-leaflet>=1.1.0; extra == "viz"
|
|
72
|
+
Requires-Dist: dash-ag-grid>=31.0.0; extra == "viz"
|
|
73
|
+
Requires-Dist: dash-extensions>=1.0.0; extra == "viz"
|
|
74
|
+
Requires-Dist: dash-bootstrap-components>=1.6.0; extra == "viz"
|
|
75
|
+
Requires-Dist: localtileserver>=0.10.0; extra == "viz"
|
|
76
|
+
Requires-Dist: pywebview>=5.0; extra == "viz"
|
|
77
|
+
Requires-Dist: pyyaml>=6.0; extra == "viz"
|
|
78
|
+
Requires-Dist: orjson>=3.10; extra == "viz"
|
|
79
|
+
Requires-Dist: flask-compress>=1.15; extra == "viz"
|
|
80
|
+
Requires-Dist: pyarrow>=17.0; extra == "viz"
|
|
81
|
+
Requires-Dist: waitress>=3.0; extra == "viz"
|
|
82
|
+
Requires-Dist: geobuf>=1.1; extra == "viz"
|
|
83
|
+
Provides-Extra: simplify
|
|
84
|
+
Requires-Dist: simplification<3.0,>=0.7; extra == "simplify"
|
|
48
85
|
Provides-Extra: gpu
|
|
49
86
|
Requires-Dist: cupy-cuda12x>=13.0.0; extra == "gpu"
|
|
50
87
|
Provides-Extra: gpu-full
|
|
@@ -55,15 +92,18 @@ Provides-Extra: full
|
|
|
55
92
|
Requires-Dist: rustworkx>=0.16.0; extra == "full"
|
|
56
93
|
Requires-Dist: python-igraph>=0.11.0; extra == "full"
|
|
57
94
|
Requires-Dist: networkx>=3.4.0; extra == "full"
|
|
58
|
-
Requires-Dist: networkit>=11.1; extra == "full"
|
|
95
|
+
Requires-Dist: networkit>=11.1; sys_platform != "darwin" and extra == "full"
|
|
59
96
|
Requires-Dist: coverage[toml]>=7.8.0; extra == "full"
|
|
60
97
|
Requires-Dist: pytest>=8.3.0; extra == "full"
|
|
61
98
|
Requires-Dist: cython>=3.0.0; extra == "full"
|
|
99
|
+
Requires-Dist: ruff<0.16,>=0.15; extra == "full"
|
|
62
100
|
Requires-Dist: notebook>=7.4.0; extra == "full"
|
|
63
|
-
Requires-Dist: fiona>=1.10.0; extra == "full"
|
|
64
|
-
Requires-Dist: pandapower>=3.0.0; extra == "full"
|
|
101
|
+
Requires-Dist: fiona>=1.10.0; python_version < "3.14" and extra == "full"
|
|
102
|
+
Requires-Dist: pandapower>=3.0.0; python_version < "3.15" and extra == "full"
|
|
65
103
|
Requires-Dist: contextily>=1.6.0; extra == "full"
|
|
104
|
+
Requires-Dist: pyyaml>=6.0; extra == "full"
|
|
66
105
|
Requires-Dist: openpyxl>=3.1.0; extra == "full"
|
|
106
|
+
Requires-Dist: simplification<3.0,>=0.7; extra == "full"
|
|
67
107
|
Dynamic: license-file
|
|
68
108
|
|
|
69
109
|
# **PYORPS** - Python for Optimal Routes in Power Systems
|
|
@@ -94,7 +134,7 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
94
134
|
<table>
|
|
95
135
|
<tr>
|
|
96
136
|
<td align="center" width="100%">
|
|
97
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/pyorps_planning_results_21_targets_22_5deg_1mxm.png" alt="ex." width="100%"/><br>
|
|
137
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/pyorps_planning_results_21_targets_22_5deg_1mxm.png" alt="ex." width="100%"/><br>
|
|
98
138
|
<sub>
|
|
99
139
|
<b>Figure 1:</b> Parallel computation of 21 paths from single source to multiple targets.<br>
|
|
100
140
|
332 s total runtime on laptop with Intel(R) Core(TM) i7-8850H CPU @ 2.6 GHz and 32 GB memory
|
|
@@ -104,6 +144,64 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
104
144
|
</table>
|
|
105
145
|
|
|
106
146
|
|
|
147
|
+
## What's new in 0.5.0
|
|
148
|
+
|
|
149
|
+
- **Python 3.12 to 3.15.** Wheels for Windows, Linux and macOS (macOS 15 or newer); Python 3.11 is no longer supported.
|
|
150
|
+
- **GUI cards.** Objective & terrain (weights, extra metric layers, DEM), cost field, corridor graph, a form for the
|
|
151
|
+
constrained-routing profile, background runs with a Stop button, and settings saved in the project file.
|
|
152
|
+
- **Overhead-line line ends.** `terminal_span_rule` and the connection heights of `ConstrainedPathFinder`.
|
|
153
|
+
- **Geographic data.** Data in degrees (for example EPSG:4326) is reprojected to the local UTM zone automatically.
|
|
154
|
+
- **Research packages** `pyorps.collector`, `pyorps.certify`, `pyorps.costmodel` and `pyorps.siting` with exports and API
|
|
155
|
+
pages (experimental).
|
|
156
|
+
|
|
157
|
+
The full list, including the changes that can alter results, is in the
|
|
158
|
+
[changelog](https://pyorps.readthedocs.io/en/latest/reference/changelog.html).
|
|
159
|
+
|
|
160
|
+
## What's new in 0.4.0
|
|
161
|
+
|
|
162
|
+
- **Route length in CRS units.** Lengths and costs no longer change with the raster resolution (breaking change for
|
|
163
|
+
results that were reported in cell units).
|
|
164
|
+
- **Several metrics at once.** `CostAssumptions(metrics=...)`, `MetricStack`, `Objective` and DEM-based slope for
|
|
165
|
+
multi-objective routing.
|
|
166
|
+
- **GPU backends.** `raster_gpu` (persistent delta-stepping kernels) and `raster_fim` (eikonal fast-iterative-method
|
|
167
|
+
solver, raw `.gpur` rasters); install with `pip install pyorps[gpu]`.
|
|
168
|
+
- **Cost fields and search sessions.** Solve one field once and price many endpoint pairs.
|
|
169
|
+
- **Corridor graphs and tower fields.** Shared trenches for many routes; precomputed fields for overhead lines.
|
|
170
|
+
- **Interactive GUI.** `pip install pyorps[gui]`, then `python -m pyorps.gui`.
|
|
171
|
+
- **Route simplification.** `simplify` option of `PathFinder.find_route`.
|
|
172
|
+
|
|
173
|
+
Everything is listed with its status (`stable` or `experimental`) in the
|
|
174
|
+
[release status](https://pyorps.readthedocs.io/en/latest/getting_started/release_status.html) and the
|
|
175
|
+
[changelog](https://pyorps.readthedocs.io/en/latest/reference/changelog.html).
|
|
176
|
+
|
|
177
|
+
### Planning substation sites with cost fields
|
|
178
|
+
|
|
179
|
+
Instead of routing from every candidate site to every terminal, the siting research code solves one cost field per
|
|
180
|
+
fixed terminal (grid connection points and turbines) and then prices each candidate substation site by lookup.
|
|
181
|
+
|
|
182
|
+
<table>
|
|
183
|
+
<tr>
|
|
184
|
+
<td align="center" width="100%">
|
|
185
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/substation_siting_method.gif" alt="Animation: ten cost fields are settled on a cost raster and candidate substation sites are priced by lookup" width="100%"/><br>
|
|
186
|
+
<sub>
|
|
187
|
+
<b>Figure 2:</b> Method illustration on public geodata: ten cost fields rooted at the fixed terminals
|
|
188
|
+
(<b>+</b> turbines, <b>■</b> grid connection points), then four illustrative candidate sites (<b>○</b>),
|
|
189
|
+
one west, north, east and south of the wind farm, are read off the fields.<br>
|
|
190
|
+
The siting packages (<code>pyorps.siting</code>, <code>pyorps.collector</code>, <code>pyorps.costmodel</code>,
|
|
191
|
+
<code>pyorps.certify</code>) are research code: shipped, but not part of the stable API.
|
|
192
|
+
</sub>
|
|
193
|
+
</td>
|
|
194
|
+
</tr>
|
|
195
|
+
</table>
|
|
196
|
+
|
|
197
|
+
How the workflow in Figure 2 runs:
|
|
198
|
+
|
|
199
|
+
- Start from a cost raster in which every cell has a price per metre of trench and forbidden cells are black.
|
|
200
|
+
- Solve one cost field per fixed terminal (seven turbines and three grid connection points). Each field is kept in memory, and the raster is not searched again.
|
|
201
|
+
- Read a route out of a field by following the predecessor chain from a candidate site back to its root. No new search runs.
|
|
202
|
+
- Move the candidate site and read all ten routes again (seven medium-voltage feeders and three high-voltage connections). The cheapest of each kind is the one that counts.
|
|
203
|
+
- Ten searches therefore answer any number of candidate sites, because the search is rooted at what is fixed and what moves is looked up.
|
|
204
|
+
|
|
107
205
|
## Features
|
|
108
206
|
|
|
109
207
|
- **Flexible Input Data**: Use local raster files directly or create custom rasterized geodata from WFS services or
|
|
@@ -114,6 +212,9 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
114
212
|
- **Environmental Consideration**: Add cost modifiers for nature reserves, water protection zones, and other sensitive
|
|
115
213
|
regions
|
|
116
214
|
- **GIS Integration**: Export results as GeoJSON for further analysis in GIS applications
|
|
215
|
+
- **Multiple Metrics**: Route on cost, slope or other metrics at once with `metrics=` and `Objective`
|
|
216
|
+
- **GPU Backends**: `raster_gpu` and `raster_fim` for very large rasters (extra `gpu`)
|
|
217
|
+
- **Interactive GUI**: Draw an area, load data from WFS services, edit costs and compare routes (extra `gui`)
|
|
117
218
|
|
|
118
219
|
|
|
119
220
|
## Quick Start
|
|
@@ -147,7 +248,7 @@ path_finder.plot_paths()
|
|
|
147
248
|
path_finder.save_paths(r"<PATH>\<TO>\<YOUR>\<RESULTS>.geojson" )
|
|
148
249
|
```
|
|
149
250
|
|
|
150
|
-
Please check out the [example](https://github.com/marhofmann/pyorps/blob/
|
|
251
|
+
Please check out the [example](https://github.com/marhofmann/pyorps/blob/main/examples/create_rasterized_geodata.ipynb)
|
|
151
252
|
for creating and setting up a dedicated raster dataset for your planning task.
|
|
152
253
|
|
|
153
254
|
## Binder - Run Examples
|
|
@@ -184,6 +285,10 @@ This command will install the core functionality of **PYORPS** along with its es
|
|
|
184
285
|
- [Numba](https://github.com/numba/numba)
|
|
185
286
|
- [Rasterio](https://github.com/rasterio/rasterio)
|
|
186
287
|
|
|
288
|
+
> **macOS 14 or older with Python 3.12 or newer:** the newest rasterio release (1.5.2) ships macOS wheels for macOS 15 only, so pip would
|
|
289
|
+
> try to build it from source (this needs GDAL). Install `pip install --only-binary rasterio rasterio` first: pip then takes the
|
|
290
|
+
> newest release that has a wheel for your macOS (1.5.1 has wheels for macOS 14 and Python 3.12 to 3.15).
|
|
291
|
+
|
|
187
292
|
#### Optional Dependencies
|
|
188
293
|
|
|
189
294
|
**PYORPS** offers several optional dependencies that enhance its functionality. You can install these extras by specifying them in square brackets:
|
|
@@ -203,6 +308,25 @@ This command will install the core functionality of **PYORPS** along with its es
|
|
|
203
308
|
pip install pyorps[dev]
|
|
204
309
|
```
|
|
205
310
|
|
|
311
|
+
- **Interactive GUI**: Dash-based route-planning workbench (`python -m pyorps.gui`):
|
|
312
|
+
```bash
|
|
313
|
+
pip install pyorps[gui]
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
- **GPU backends**: CuPy for `raster_gpu` and `raster_fim` (CUDA 12; `gpu-full` adds cuGraph and cuDF):
|
|
317
|
+
```bash
|
|
318
|
+
pip install pyorps[gpu]
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
- **Other graph libraries**: Rustworkx, iGraph, NetworkX and NetworKit backends:
|
|
322
|
+
```bash
|
|
323
|
+
pip install pyorps[graph]
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
- **Route simplification**: `pip install pyorps[simplify]`
|
|
327
|
+
|
|
328
|
+
- **YAML files** (infrastructure profiles, cost catalogue, data manifests): `pip install pyorps[yaml]`
|
|
329
|
+
|
|
206
330
|
- **Full Installation**: To install all optional dependencies at once:
|
|
207
331
|
```bash
|
|
208
332
|
pip install pyorps[full]
|
|
@@ -247,9 +371,9 @@ This dramatically reduces memory and computation time, especially for high-resol
|
|
|
247
371
|
<table>
|
|
248
372
|
<tr>
|
|
249
373
|
<td align="center" width="100%">
|
|
250
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/buffer_600.png" alt="search spaces"
|
|
374
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/buffer_600.png" alt="search spaces"
|
|
251
375
|
width="100%"/><br>
|
|
252
|
-
<sub><b>Figure
|
|
376
|
+
<sub><b>Figure 3:</b> Various optimal paths for different search spaces on rasterised geodata with 1 m² resolution</sub>
|
|
253
377
|
</td>
|
|
254
378
|
</tr>
|
|
255
379
|
</table>
|
|
@@ -271,14 +395,14 @@ This allows you to balance accuracy (following real-world paths) and performance
|
|
|
271
395
|
<table>
|
|
272
396
|
<tr>
|
|
273
397
|
<td align="center" width="50%">
|
|
274
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/R3-complete.PNG"
|
|
398
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/R3-complete.PNG"
|
|
275
399
|
alt="R3 complete" width="79%"/><br>
|
|
276
|
-
<sub><b>Figure
|
|
400
|
+
<sub><b>Figure 4a:</b> Steps for neighbourhoods R0 (blue), R1 (green), R2 (yellow), and R3 (red)</sub>
|
|
277
401
|
</td>
|
|
278
402
|
<td align="center" width="50%">
|
|
279
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/intermediate_steps.PNG"
|
|
403
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/intermediate_steps.PNG"
|
|
280
404
|
alt="intermediates" width="90%"/><br>
|
|
281
|
-
<sub><b>Figure
|
|
405
|
+
<sub><b>Figure 4b:</b> Intermediate elements Ik for selected edges of vertex v<sub>5,5</sub>.</sub>
|
|
282
406
|
</td>
|
|
283
407
|
</tr>
|
|
284
408
|
</table>
|
|
@@ -370,9 +494,9 @@ Routing is driven by a **cost raster**. **PYORPS** supports:
|
|
|
370
494
|
- **[Rustworkx](https://qiskit.org/documentation/rustworkx/)**: Pythonic, Rust-powered graph algorithms.
|
|
371
495
|
- **[NetworkX](https://networkx.org/)**: Widely-used, pure Python graph library.
|
|
372
496
|
- **[iGraph](https://igraph.org/python/)**: Efficient C-based graph library.
|
|
373
|
-
- **(
|
|
497
|
+
- **GPU** (experimental, extra `gpu`): `raster_gpu` (delta-stepping on the GPU) and `raster_fim` (eikonal fast-iterative-method solver).
|
|
374
498
|
|
|
375
|
-
You can select the backend via the `graph_api` parameter in `PathFinder
|
|
499
|
+
You can select the backend by name via the `graph_api` parameter in `PathFinder` (default `"cython"`; there is no automatic choice by problem size). Each backend exposes a unified interface for shortest path computation, supporting:
|
|
376
500
|
|
|
377
501
|
- **Δ-stepping**: Parallel path-finding algorithm - highest performance on multicore
|
|
378
502
|
CPUs
|
|
@@ -384,17 +508,21 @@ You can select the backend via the `graph_api` parameter in `PathFinder`. Each b
|
|
|
384
508
|
## Documentation
|
|
385
509
|
|
|
386
510
|
The documentation for **PYORPS**, including detailed explanations and usage instructions, can be found on
|
|
387
|
-
https://pyorps.readthedocs.io.
|
|
511
|
+
https://pyorps.readthedocs.io. It is organised into concepts (cost semantics, neighborhoods, search space, path
|
|
512
|
+
lengths and units, known limitations), one API page per feature and a
|
|
513
|
+
[release status](https://pyorps.readthedocs.io/en/latest/getting_started/release_status.html) page. Every page
|
|
514
|
+
states whether it is `stable` or `experimental`. For AI assistants and tools, the built site also ships
|
|
515
|
+
`llms.txt`, `llms-full.txt` and `api-index.json` at its root.
|
|
388
516
|
Examples demonstrating the functionality of **PYORPS**, along with practical use cases, are included as jupyter notebooks
|
|
389
|
-
in the [examples directory](https://github.com/marhofmann/pyorps/blob/
|
|
517
|
+
in the [examples directory](https://github.com/marhofmann/pyorps/blob/main/examples).
|
|
390
518
|
|
|
391
519
|
## Contributing
|
|
392
520
|
|
|
393
|
-
Contributions are welcome! If you want to contribute, please check out the [**PYORPS** contribution guidelines](https://github.com/marhofmann/pyorps/blob/
|
|
521
|
+
Contributions are welcome! If you want to contribute, please check out the [**PYORPS** contribution guidelines](https://github.com/marhofmann/pyorps/blob/main/CONTRIBUTING.md).
|
|
394
522
|
|
|
395
523
|
## License
|
|
396
524
|
|
|
397
|
-
This project is licensed under the [MIT License](https://github.com/marhofmann/pyorps/blob/
|
|
525
|
+
This project is licensed under the [MIT License](https://github.com/marhofmann/pyorps/blob/main/LICENSE).
|
|
398
526
|
|
|
399
527
|
## Citation
|
|
400
528
|
|
|
@@ -1,71 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pyorps
|
|
3
|
-
Version: 0.3.2
|
|
4
|
-
Summary: PYORPS - (Python for Optimal Routes in Power Systems)
|
|
5
|
-
Author-email: Martin Hofmann <martin.hofmann-3@ei.thm.de>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/marhofmann/pyorps
|
|
8
|
-
Project-URL: Bug Tracker, https://github.com/marhofmann/pyorps/issues
|
|
9
|
-
Keywords: power line routing,distribution grid,power systems planning,path finding,rasterized GIS data
|
|
10
|
-
Classifier: Development Status :: 3 - Alpha
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
16
|
-
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
17
|
-
Requires-Python: >=3.11
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
License-File: LICENSE
|
|
20
|
-
Requires-Dist: numpy>=2.0.0
|
|
21
|
-
Requires-Dist: pandas>=2.2.0
|
|
22
|
-
Requires-Dist: geopandas>=1.0.0
|
|
23
|
-
Requires-Dist: numba>=0.61.0
|
|
24
|
-
Requires-Dist: rasterio>=1.4.0
|
|
25
|
-
Requires-Dist: matplotlib>=3.10.0
|
|
26
|
-
Requires-Dist: requests>=2.32.0
|
|
27
|
-
Requires-Dist: defusedxml>=0.7.0
|
|
28
|
-
Requires-Dist: psutil>=5.9.0
|
|
29
|
-
Provides-Extra: graph
|
|
30
|
-
Requires-Dist: rustworkx>=0.16.0; extra == "graph"
|
|
31
|
-
Requires-Dist: python-igraph>=0.11.0; extra == "graph"
|
|
32
|
-
Requires-Dist: networkx>=3.4.0; extra == "graph"
|
|
33
|
-
Requires-Dist: networkit>=11.1; extra == "graph"
|
|
34
|
-
Provides-Extra: dev
|
|
35
|
-
Requires-Dist: coverage[toml]>=7.8.0; extra == "dev"
|
|
36
|
-
Requires-Dist: pytest>=8.3.0; extra == "dev"
|
|
37
|
-
Requires-Dist: cython>=3.0.0; extra == "dev"
|
|
38
|
-
Provides-Extra: examples
|
|
39
|
-
Requires-Dist: notebook>=7.4.0; extra == "examples"
|
|
40
|
-
Requires-Dist: fiona>=1.10.0; extra == "examples"
|
|
41
|
-
Provides-Extra: case-studies
|
|
42
|
-
Requires-Dist: notebook>=7.4.0; extra == "case-studies"
|
|
43
|
-
Requires-Dist: fiona>=1.10.0; extra == "case-studies"
|
|
44
|
-
Requires-Dist: pandapower>=3.0.0; extra == "case-studies"
|
|
45
|
-
Requires-Dist: contextily>=1.6.0; extra == "case-studies"
|
|
46
|
-
Provides-Extra: additionals
|
|
47
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "additionals"
|
|
48
|
-
Provides-Extra: gpu
|
|
49
|
-
Requires-Dist: cupy-cuda12x>=13.0.0; extra == "gpu"
|
|
50
|
-
Provides-Extra: gpu-full
|
|
51
|
-
Requires-Dist: cupy-cuda12x>=13.0.0; extra == "gpu-full"
|
|
52
|
-
Requires-Dist: cugraph-cu12>=25.02; extra == "gpu-full"
|
|
53
|
-
Requires-Dist: cudf-cu12>=25.02; extra == "gpu-full"
|
|
54
|
-
Provides-Extra: full
|
|
55
|
-
Requires-Dist: rustworkx>=0.16.0; extra == "full"
|
|
56
|
-
Requires-Dist: python-igraph>=0.11.0; extra == "full"
|
|
57
|
-
Requires-Dist: networkx>=3.4.0; extra == "full"
|
|
58
|
-
Requires-Dist: networkit>=11.1; extra == "full"
|
|
59
|
-
Requires-Dist: coverage[toml]>=7.8.0; extra == "full"
|
|
60
|
-
Requires-Dist: pytest>=8.3.0; extra == "full"
|
|
61
|
-
Requires-Dist: cython>=3.0.0; extra == "full"
|
|
62
|
-
Requires-Dist: notebook>=7.4.0; extra == "full"
|
|
63
|
-
Requires-Dist: fiona>=1.10.0; extra == "full"
|
|
64
|
-
Requires-Dist: pandapower>=3.0.0; extra == "full"
|
|
65
|
-
Requires-Dist: contextily>=1.6.0; extra == "full"
|
|
66
|
-
Requires-Dist: openpyxl>=3.1.0; extra == "full"
|
|
67
|
-
Dynamic: license-file
|
|
68
|
-
|
|
69
1
|
# **PYORPS** - Python for Optimal Routes in Power Systems
|
|
70
2
|
|
|
71
3
|
[](https://pypi.org/project/pyorps/)
|
|
@@ -94,7 +26,7 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
94
26
|
<table>
|
|
95
27
|
<tr>
|
|
96
28
|
<td align="center" width="100%">
|
|
97
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/pyorps_planning_results_21_targets_22_5deg_1mxm.png" alt="ex." width="100%"/><br>
|
|
29
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/pyorps_planning_results_21_targets_22_5deg_1mxm.png" alt="ex." width="100%"/><br>
|
|
98
30
|
<sub>
|
|
99
31
|
<b>Figure 1:</b> Parallel computation of 21 paths from single source to multiple targets.<br>
|
|
100
32
|
332 s total runtime on laptop with Intel(R) Core(TM) i7-8850H CPU @ 2.6 GHz and 32 GB memory
|
|
@@ -104,6 +36,64 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
104
36
|
</table>
|
|
105
37
|
|
|
106
38
|
|
|
39
|
+
## What's new in 0.5.0
|
|
40
|
+
|
|
41
|
+
- **Python 3.12 to 3.15.** Wheels for Windows, Linux and macOS (macOS 15 or newer); Python 3.11 is no longer supported.
|
|
42
|
+
- **GUI cards.** Objective & terrain (weights, extra metric layers, DEM), cost field, corridor graph, a form for the
|
|
43
|
+
constrained-routing profile, background runs with a Stop button, and settings saved in the project file.
|
|
44
|
+
- **Overhead-line line ends.** `terminal_span_rule` and the connection heights of `ConstrainedPathFinder`.
|
|
45
|
+
- **Geographic data.** Data in degrees (for example EPSG:4326) is reprojected to the local UTM zone automatically.
|
|
46
|
+
- **Research packages** `pyorps.collector`, `pyorps.certify`, `pyorps.costmodel` and `pyorps.siting` with exports and API
|
|
47
|
+
pages (experimental).
|
|
48
|
+
|
|
49
|
+
The full list, including the changes that can alter results, is in the
|
|
50
|
+
[changelog](https://pyorps.readthedocs.io/en/latest/reference/changelog.html).
|
|
51
|
+
|
|
52
|
+
## What's new in 0.4.0
|
|
53
|
+
|
|
54
|
+
- **Route length in CRS units.** Lengths and costs no longer change with the raster resolution (breaking change for
|
|
55
|
+
results that were reported in cell units).
|
|
56
|
+
- **Several metrics at once.** `CostAssumptions(metrics=...)`, `MetricStack`, `Objective` and DEM-based slope for
|
|
57
|
+
multi-objective routing.
|
|
58
|
+
- **GPU backends.** `raster_gpu` (persistent delta-stepping kernels) and `raster_fim` (eikonal fast-iterative-method
|
|
59
|
+
solver, raw `.gpur` rasters); install with `pip install pyorps[gpu]`.
|
|
60
|
+
- **Cost fields and search sessions.** Solve one field once and price many endpoint pairs.
|
|
61
|
+
- **Corridor graphs and tower fields.** Shared trenches for many routes; precomputed fields for overhead lines.
|
|
62
|
+
- **Interactive GUI.** `pip install pyorps[gui]`, then `python -m pyorps.gui`.
|
|
63
|
+
- **Route simplification.** `simplify` option of `PathFinder.find_route`.
|
|
64
|
+
|
|
65
|
+
Everything is listed with its status (`stable` or `experimental`) in the
|
|
66
|
+
[release status](https://pyorps.readthedocs.io/en/latest/getting_started/release_status.html) and the
|
|
67
|
+
[changelog](https://pyorps.readthedocs.io/en/latest/reference/changelog.html).
|
|
68
|
+
|
|
69
|
+
### Planning substation sites with cost fields
|
|
70
|
+
|
|
71
|
+
Instead of routing from every candidate site to every terminal, the siting research code solves one cost field per
|
|
72
|
+
fixed terminal (grid connection points and turbines) and then prices each candidate substation site by lookup.
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<tr>
|
|
76
|
+
<td align="center" width="100%">
|
|
77
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/substation_siting_method.gif" alt="Animation: ten cost fields are settled on a cost raster and candidate substation sites are priced by lookup" width="100%"/><br>
|
|
78
|
+
<sub>
|
|
79
|
+
<b>Figure 2:</b> Method illustration on public geodata: ten cost fields rooted at the fixed terminals
|
|
80
|
+
(<b>+</b> turbines, <b>■</b> grid connection points), then four illustrative candidate sites (<b>○</b>),
|
|
81
|
+
one west, north, east and south of the wind farm, are read off the fields.<br>
|
|
82
|
+
The siting packages (<code>pyorps.siting</code>, <code>pyorps.collector</code>, <code>pyorps.costmodel</code>,
|
|
83
|
+
<code>pyorps.certify</code>) are research code: shipped, but not part of the stable API.
|
|
84
|
+
</sub>
|
|
85
|
+
</td>
|
|
86
|
+
</tr>
|
|
87
|
+
</table>
|
|
88
|
+
|
|
89
|
+
How the workflow in Figure 2 runs:
|
|
90
|
+
|
|
91
|
+
- Start from a cost raster in which every cell has a price per metre of trench and forbidden cells are black.
|
|
92
|
+
- Solve one cost field per fixed terminal (seven turbines and three grid connection points). Each field is kept in memory, and the raster is not searched again.
|
|
93
|
+
- Read a route out of a field by following the predecessor chain from a candidate site back to its root. No new search runs.
|
|
94
|
+
- Move the candidate site and read all ten routes again (seven medium-voltage feeders and three high-voltage connections). The cheapest of each kind is the one that counts.
|
|
95
|
+
- Ten searches therefore answer any number of candidate sites, because the search is rooted at what is fixed and what moves is looked up.
|
|
96
|
+
|
|
107
97
|
## Features
|
|
108
98
|
|
|
109
99
|
- **Flexible Input Data**: Use local raster files directly or create custom rasterized geodata from WFS services or
|
|
@@ -114,6 +104,9 @@ While tailored for distribution grids, it can be adapted for various infrastruct
|
|
|
114
104
|
- **Environmental Consideration**: Add cost modifiers for nature reserves, water protection zones, and other sensitive
|
|
115
105
|
regions
|
|
116
106
|
- **GIS Integration**: Export results as GeoJSON for further analysis in GIS applications
|
|
107
|
+
- **Multiple Metrics**: Route on cost, slope or other metrics at once with `metrics=` and `Objective`
|
|
108
|
+
- **GPU Backends**: `raster_gpu` and `raster_fim` for very large rasters (extra `gpu`)
|
|
109
|
+
- **Interactive GUI**: Draw an area, load data from WFS services, edit costs and compare routes (extra `gui`)
|
|
117
110
|
|
|
118
111
|
|
|
119
112
|
## Quick Start
|
|
@@ -147,7 +140,7 @@ path_finder.plot_paths()
|
|
|
147
140
|
path_finder.save_paths(r"<PATH>\<TO>\<YOUR>\<RESULTS>.geojson" )
|
|
148
141
|
```
|
|
149
142
|
|
|
150
|
-
Please check out the [example](https://github.com/marhofmann/pyorps/blob/
|
|
143
|
+
Please check out the [example](https://github.com/marhofmann/pyorps/blob/main/examples/create_rasterized_geodata.ipynb)
|
|
151
144
|
for creating and setting up a dedicated raster dataset for your planning task.
|
|
152
145
|
|
|
153
146
|
## Binder - Run Examples
|
|
@@ -184,6 +177,10 @@ This command will install the core functionality of **PYORPS** along with its es
|
|
|
184
177
|
- [Numba](https://github.com/numba/numba)
|
|
185
178
|
- [Rasterio](https://github.com/rasterio/rasterio)
|
|
186
179
|
|
|
180
|
+
> **macOS 14 or older with Python 3.12 or newer:** the newest rasterio release (1.5.2) ships macOS wheels for macOS 15 only, so pip would
|
|
181
|
+
> try to build it from source (this needs GDAL). Install `pip install --only-binary rasterio rasterio` first: pip then takes the
|
|
182
|
+
> newest release that has a wheel for your macOS (1.5.1 has wheels for macOS 14 and Python 3.12 to 3.15).
|
|
183
|
+
|
|
187
184
|
#### Optional Dependencies
|
|
188
185
|
|
|
189
186
|
**PYORPS** offers several optional dependencies that enhance its functionality. You can install these extras by specifying them in square brackets:
|
|
@@ -203,6 +200,25 @@ This command will install the core functionality of **PYORPS** along with its es
|
|
|
203
200
|
pip install pyorps[dev]
|
|
204
201
|
```
|
|
205
202
|
|
|
203
|
+
- **Interactive GUI**: Dash-based route-planning workbench (`python -m pyorps.gui`):
|
|
204
|
+
```bash
|
|
205
|
+
pip install pyorps[gui]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- **GPU backends**: CuPy for `raster_gpu` and `raster_fim` (CUDA 12; `gpu-full` adds cuGraph and cuDF):
|
|
209
|
+
```bash
|
|
210
|
+
pip install pyorps[gpu]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
- **Other graph libraries**: Rustworkx, iGraph, NetworkX and NetworKit backends:
|
|
214
|
+
```bash
|
|
215
|
+
pip install pyorps[graph]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
- **Route simplification**: `pip install pyorps[simplify]`
|
|
219
|
+
|
|
220
|
+
- **YAML files** (infrastructure profiles, cost catalogue, data manifests): `pip install pyorps[yaml]`
|
|
221
|
+
|
|
206
222
|
- **Full Installation**: To install all optional dependencies at once:
|
|
207
223
|
```bash
|
|
208
224
|
pip install pyorps[full]
|
|
@@ -247,9 +263,9 @@ This dramatically reduces memory and computation time, especially for high-resol
|
|
|
247
263
|
<table>
|
|
248
264
|
<tr>
|
|
249
265
|
<td align="center" width="100%">
|
|
250
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/buffer_600.png" alt="search spaces"
|
|
266
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/buffer_600.png" alt="search spaces"
|
|
251
267
|
width="100%"/><br>
|
|
252
|
-
<sub><b>Figure
|
|
268
|
+
<sub><b>Figure 3:</b> Various optimal paths for different search spaces on rasterised geodata with 1 m² resolution</sub>
|
|
253
269
|
</td>
|
|
254
270
|
</tr>
|
|
255
271
|
</table>
|
|
@@ -271,14 +287,14 @@ This allows you to balance accuracy (following real-world paths) and performance
|
|
|
271
287
|
<table>
|
|
272
288
|
<tr>
|
|
273
289
|
<td align="center" width="50%">
|
|
274
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/R3-complete.PNG"
|
|
290
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/R3-complete.PNG"
|
|
275
291
|
alt="R3 complete" width="79%"/><br>
|
|
276
|
-
<sub><b>Figure
|
|
292
|
+
<sub><b>Figure 4a:</b> Steps for neighbourhoods R0 (blue), R1 (green), R2 (yellow), and R3 (red)</sub>
|
|
277
293
|
</td>
|
|
278
294
|
<td align="center" width="50%">
|
|
279
|
-
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/images/intermediate_steps.PNG"
|
|
295
|
+
<img src="https://raw.githubusercontent.com/marhofmann/pyorps/refs/heads/main/docs/source/_static/images/intermediate_steps.PNG"
|
|
280
296
|
alt="intermediates" width="90%"/><br>
|
|
281
|
-
<sub><b>Figure
|
|
297
|
+
<sub><b>Figure 4b:</b> Intermediate elements Ik for selected edges of vertex v<sub>5,5</sub>.</sub>
|
|
282
298
|
</td>
|
|
283
299
|
</tr>
|
|
284
300
|
</table>
|
|
@@ -370,9 +386,9 @@ Routing is driven by a **cost raster**. **PYORPS** supports:
|
|
|
370
386
|
- **[Rustworkx](https://qiskit.org/documentation/rustworkx/)**: Pythonic, Rust-powered graph algorithms.
|
|
371
387
|
- **[NetworkX](https://networkx.org/)**: Widely-used, pure Python graph library.
|
|
372
388
|
- **[iGraph](https://igraph.org/python/)**: Efficient C-based graph library.
|
|
373
|
-
- **(
|
|
389
|
+
- **GPU** (experimental, extra `gpu`): `raster_gpu` (delta-stepping on the GPU) and `raster_fim` (eikonal fast-iterative-method solver).
|
|
374
390
|
|
|
375
|
-
You can select the backend via the `graph_api` parameter in `PathFinder
|
|
391
|
+
You can select the backend by name via the `graph_api` parameter in `PathFinder` (default `"cython"`; there is no automatic choice by problem size). Each backend exposes a unified interface for shortest path computation, supporting:
|
|
376
392
|
|
|
377
393
|
- **Δ-stepping**: Parallel path-finding algorithm - highest performance on multicore
|
|
378
394
|
CPUs
|
|
@@ -384,17 +400,21 @@ You can select the backend via the `graph_api` parameter in `PathFinder`. Each b
|
|
|
384
400
|
## Documentation
|
|
385
401
|
|
|
386
402
|
The documentation for **PYORPS**, including detailed explanations and usage instructions, can be found on
|
|
387
|
-
https://pyorps.readthedocs.io.
|
|
403
|
+
https://pyorps.readthedocs.io. It is organised into concepts (cost semantics, neighborhoods, search space, path
|
|
404
|
+
lengths and units, known limitations), one API page per feature and a
|
|
405
|
+
[release status](https://pyorps.readthedocs.io/en/latest/getting_started/release_status.html) page. Every page
|
|
406
|
+
states whether it is `stable` or `experimental`. For AI assistants and tools, the built site also ships
|
|
407
|
+
`llms.txt`, `llms-full.txt` and `api-index.json` at its root.
|
|
388
408
|
Examples demonstrating the functionality of **PYORPS**, along with practical use cases, are included as jupyter notebooks
|
|
389
|
-
in the [examples directory](https://github.com/marhofmann/pyorps/blob/
|
|
409
|
+
in the [examples directory](https://github.com/marhofmann/pyorps/blob/main/examples).
|
|
390
410
|
|
|
391
411
|
## Contributing
|
|
392
412
|
|
|
393
|
-
Contributions are welcome! If you want to contribute, please check out the [**PYORPS** contribution guidelines](https://github.com/marhofmann/pyorps/blob/
|
|
413
|
+
Contributions are welcome! If you want to contribute, please check out the [**PYORPS** contribution guidelines](https://github.com/marhofmann/pyorps/blob/main/CONTRIBUTING.md).
|
|
394
414
|
|
|
395
415
|
## License
|
|
396
416
|
|
|
397
|
-
This project is licensed under the [MIT License](https://github.com/marhofmann/pyorps/blob/
|
|
417
|
+
This project is licensed under the [MIT License](https://github.com/marhofmann/pyorps/blob/main/LICENSE).
|
|
398
418
|
|
|
399
419
|
## Citation
|
|
400
420
|
|
|
@@ -407,4 +427,4 @@ Hofmann, M., Stetz, T., Kammer, F., Repo, S.: 'PYORPS: An Open-Source Tool for A
|
|
|
407
427
|
|
|
408
428
|
## Contact
|
|
409
429
|
|
|
410
|
-
For questions and feedback, please open an issue on our GitHub repository.
|
|
430
|
+
For questions and feedback, please open an issue on our GitHub repository.
|