Add elevator module: State-pattern car (idle, moving, doors open, maintenance), LOOK stop rule, round-robin / nearest-car / ETA dispatchers, tick simulation on seeded traffic (8 test classes, 13 transcripts)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6W3VPEBweaeA5DE4n
This commit is contained in:
Claude
2026-11-18 21:11:10 +05:30
parent 05f41a3ef7
commit 4180e746ef
48 changed files with 1665 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
12 floors, 3 cars (capacity 8), 120 people: same seeded traffic through three dispatchers
=========================================================================================
Times are in ticks. 'wait' is button press to boarding; 'total' is button press to arrival.
Up-peak (70% start at the lobby), seed 42, arrivals spread over 240 ticks
round-robin delivered 120/120 wait avg 18.5 max 57 total avg 32.7 max 79 floors 363 door cycles 134 ticks 299
hall calls per car (car0, car1, car2): [15, 15, 15]
nearest-car delivered 120/120 wait avg 91.9 max 248 total avg 106.4 max 258 floors 317 door cycles 129 ticks 481
hall calls per car (car0, car1, car2): [23, 15, 4]
eta delivered 120/120 wait avg 13.7 max 43 total avg 27.6 max 63 floors 338 door cycles 136 ticks 273
hall calls per car (car0, car1, car2): [18, 15, 14]
Between floors (uniform origin and destination), seed 7, arrivals spread over 360 ticks
round-robin delivered 120/120 wait avg 13.3 max 45 total avg 22.6 max 69 floors 564 door cycles 181 ticks 400
hall calls per car (car0, car1, car2): [30, 30, 29]
nearest-car delivered 120/120 wait avg 16.5 max 66 total avg 26.5 max 86 floors 428 door cycles 177 ticks 398
hall calls per car (car0, car1, car2): [36, 25, 26]
eta delivered 120/120 wait avg 9.9 max 43 total avg 19.6 max 61 floors 489 door cycles 190 ticks 378
hall calls per car (car0, car1, car2): [37, 28, 33]