Skip to main content

最短経路探索ライブラリ

Project description

about routemin

routeminは、特定のルート検索アルゴリズムを実装したPythonパッケージです。このパッケージを使用することで、鉄道ネットワークやその他のネットワーク上での最短経路を簡単に見つけることができます。

特徴

  • 簡単に使える最短経路探索機能。
  • 複数のルートオプション。
  • カスタマイズ可能な検索パラメータ。

インストール

このパッケージはPython 3.6以上で動作します。以下のコマンドでインストールできます:

pip install routemin=0.1.2

使い方

基本的な使用方法は以下の通りです:

from routemin import create_graph, calculate_shortest_path, main

# グラフを作成
G = create_graph()

# 最短経路を計算
start_station = '三鷹'
end_station = '大崎'
include_dash = False
path, total_time, compact_lines = calculate_shortest_path(G, start_station, end_station, include_dash)

# 最短経路を矢印を使って表示
formatted_path = ' → '.join(path)
print(f"最短経路: {formatted_path}")
print(f"合計時間: {total_time}", "minutes")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

routemin-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file routemin-0.1.2.tar.gz.

File metadata

  • Download URL: routemin-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for routemin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d4815ff4ba5757dffa8769775f452d50b118ed16e2a881edd185766294ee1031
MD5 577fc39b3aacd6644eb4931aa42a3944
BLAKE2b-256 4aa561d3b060a4411009001f5798a016695aca644fde3ea2f3a1f425e7006b78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page