selection of wrong vehicle type
評価
調査の方向性
Start in simba/schedule.py at assign_vehicles_w_adaptive_soc and assign_vehicles_w_min_recharge_soc; the issue includes examples of both substring checks and a proposed exact comparison. Check vehicle assignments for types such as 5 and 15 under both strategies, and confirm the type and charging type match exactly. Pull request #249 is already open for this issue.
索引モデルが issue の本文から書いたものです。
説明
Vehicle assignment mixes vehicle types whose names end with another type name
Description
Both vehicle assignment strategies (adaptive and fixed_recharge) decide whether an idle
vehicle may serve a rotation by checking whether the string "<vehicle_type>_<charging_type>"
is a substring of the vehicle ID:
# simba/schedule.py, assign_vehicles_w_adaptive_soc
standing_vehicles = list(filter(lambda x: vt_ct in x[0] * (x[1] == rot.departure_name),
all_standing_vehicles))
# simba/schedule.py, assign_vehicles_w_min_recharge_soc
if vt_ct in id and deps == rot.departure_name:
Vehicle IDs have the form <vehicle_type>_<charging_type>_<number>, e.g. 15_depb_06.
If one vehicle type name ends with another one, the check also matches the other type:
"5_depb" in "15_depb_06" is True. A rotation of vehicle type 5 can therefore be served
by a vehicle of type 15 (and likewise 3 / 23, 8 / 28, A / BA, ...).
Observed behaviour
In a project with numeric vehicle types (4, 5, 15, 19, 22, 23, 26, 28, 29),
rotation 200003-1 (vehicle type 5) was assigned to vehicle 15_depb_06, and
200003-2 to 15_depb_12, in rotation_summary.csv.
Expected behaviour
A vehicle may only serve rotations of exactly its own vehicle type and charging type.
Impact
- Rotations are simulated with the battery capacity, charging curve and consumption of the
wrong vehicle type, so SoC results (including negative SoC) can be wrong. - Vehicle counts per type, and all costs derived from them, are wrong.
- Only happens if one vehicle type name is a suffix of another. That is common with numeric
type names, so the error goes unnoticed.
Steps to reproduce
- Use two vehicle types
5and15with the same charging type. - Create a rotation of type
15followed, at the same depot, by a rotation of type5
that could be served by the same vehicle. - Run
Schedule.assign_vehicleswithassign_strategy = adaptiveorfixed_recharge. - The type
5rotation gets a vehicle ID starting with15_.
Proposed fix
Compare the full type part of the vehicle ID instead of a substring:
vehicle_id.rsplit("_", 1)[0] == vt_ct
- 主要言語
- Python
- スター
- 4
- フォーク
- 1
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rl-institut/SimBA のほかの issue
-
bug low prio
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
rl-institut/SimBA#250 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rl-institut/SimBA#246 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
rl-institut/SimBA#238 ·
-
rename rotation -> block再び着手できるかも @stefansc1 が 764 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
rl-institut/SimBA#215 · 担当者 1 名 ·
-
wontfix
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
rl-institut/SimBA#207 · コメント 1 件 ·
rl-institut/SimBA の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
BrainLesion/BraTS#200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OpenHands/extensions#970 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rl-institut/enetra#91 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/datasets#9100 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/garak#2486 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信