selection of wrong vehicle type
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 4
- Fork
- 1
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rl-institut/SimBA
-
bug low prio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
rl-institut/SimBA#250 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rl-institut/SimBA#246 ·
-
False Negative RotationsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
rl-institut/SimBA#238 ·
-
rename rotation -> blockCó thể làm lại được @stefansc1 đã nhận 764 ngày trước và không có pull request nào đang mở. Đang mở
rl-institut/SimBA#215 · 1 người được giao ·
-
wontfix
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
rl-institut/SimBA#207 · 1 bình luận ·
Tất cả issue của rl-institut/SimBA
Issue tương tự
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
BrainLesion/BraTS#200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OpenHands/extensions#970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
rl-institut/enetra#91 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
huggingface/datasets#9100 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
NVIDIA/garak#2486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày