Skip to content

Add an elevator simulation driven by a terminal UI - #76

Merged
hovsep merged 1 commit into
mainfrom
claude/elevator
Oct 5, 2026
Merged

hovsep merged 1 commit into
mainfrom
claude/elevator

Conversation

@hovsep

@hovsep hovsep commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Requested by ovsep · project thread

Before: no example had a building's worth of interacting stateful parts driven from a UI.

After: simulation/elevator is two cabs in a six-floor building, 14 components: six floor call panels, a dispatcher, a display, and per cab a controller, a motor and a door. In the terminal you type a floor to call a cab or a5/b2 to ride one; presses go into the mesh as signals and the building's state comes back out as a View signal the UI draws as a shaft view. -demo (or non-terminal stdin) plays a scripted rush hour.

How: every Run is one simulated second; components keep their state between runs. Each cab has two feedback loops (motor, door) plus the loop through the dispatcher, which assigns calls by cost and turns a cab's arrival into a lamp going off. Controllers record feedback in any cycle but decide once per tick, keeping direction while stops lie ahead. Tests play the demo to a quiet building, check how the dispatcher split the calls, and cover pressing a call where a cab already stands with open doors.

Closes #25

🤖 Generated with Claude Code

https://claude.ai/code/session_01WbQCnCrtf3EqpxJD24koiW


Generated by Claude Code

Floors, a dispatcher, and two cabs each with a motor and a door; button
presses go into the mesh as signals and the building's state comes back
out as one, one run per simulated second.

Closes #25

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WbQCnCrtf3EqpxJD24koiW
@hovsep hovsep self-assigned this Oct 5, 2026
@hovsep
hovsep merged commit 679c9c6 into main Oct 5, 2026
2 checks passed
@hovsep
hovsep deleted the claude/elevator branch October 5, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[example] Bidirectional graphic app

2 participants