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
+22
View File
@@ -0,0 +1,22 @@
Capacity 2, five people at the lobby, all going UP
==================================================
hall calls dispatched after five button presses: 1
t=0 hall 0u -> car0 (at 0 IDLE)
t=0 hall 0u -> car0 (at 0 DOORS_OPEN)
t=0 car0 opens at 0 heading UP off=[] on=[p0(0->2), p1(0->3)]
t=5 car0 opens at 2 heading UP off=[p0(0->2)] on=[]
t=9 car0 opens at 3 heading UP off=[p1(0->3)] on=[]
t=15 hall 0u -> car0 (at 0 DOORS_OPEN)
t=15 car0 opens at 0 heading UP off=[] on=[p2(0->4), p3(0->5)]
t=22 car0 opens at 4 heading UP off=[p2(0->4)] on=[]
t=26 car0 opens at 5 heading UP off=[p3(0->5)] on=[]
t=34 car0 opens at 0 heading UP off=[] on=[p4(0->6)]
t=43 car0 opens at 6 heading UP off=[p4(0->6)] on=[]
p0(0->2) wait 0 ride 5
p1(0->3) wait 0 ride 9
p2(0->4) wait 15 ride 7
p3(0->5) wait 15 ride 11
p4(0->6) wait 34 ride 9