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:
@@ -0,0 +1,11 @@
|
||||
Hall call UP at floor 3 while car0 (at 4) is going DOWN and car1 waits at 9
|
||||
===========================================================================
|
||||
|
||||
nearest-car: after 4 ticks car0 floor 4 MOVING_DOWN DOWN stops [0] riders [rider(4->0)]
|
||||
nearest-car: t=4 hall 3u -> car0 (at 4 MOVING_DOWN)
|
||||
eta: after 4 ticks car0 floor 4 MOVING_DOWN DOWN stops [0] riders [rider(4->0)]
|
||||
eta: t=4 hall 3u -> car1 (at 9 IDLE)
|
||||
|
||||
wait for the person at floor 3, in ticks:
|
||||
nearest-car 9
|
||||
eta 5
|
||||
Reference in New Issue
Block a user