18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Files
maszyna/tests
jerrrrycho cf94a39e9f refactor(ai): one span test for the pantographs and the AI, a wire query and the stop solver (#357)
Step 1 of 2 for the AI stopping with its pantograph past the end of the
overhead wire. Nothing changes in what the vehicles or the AI do.

- vehicle/aiwire.{h,cpp} (core): span_contact(), the geometry of a
  pantograph against a span of the wire, moved out of
  basic_cell::update_traction with the same operations in the same order;
  reaches(); wire_shortfall(), how far short of its target a train stops
  to keep its rear pantograph under the wire (3 m margin, 2 m steps, up
  to 300 m back, 0 when nothing is found); stops_under_wire(), which
  stops this applies to.
- basic_cell::update_traction calls span_contact().
- basic_cell/basic_section/basic_region::wire_over(): is there a wire
  over a point of the track within reach of a pantograph. Not called yet.
- tests/unit/test_ai_wire.cpp, including a check that span_contact()
  gives the very numbers of the code it replaced.
2026-11-20 03:43:44 +01:00
..