How kevinrcorrales/momento3 works
1. Project purpose
- This repository is a plain Java elevator simulator (“Sistema de Ascensor Java”).
- The architecture is centered on modeling elevator behavior as interacting objects rather than using a framework or distributed system.
2. Core domain model
- The main stateful entities are likely:
- Ascensor: the elevator unit itself.
- Piso: a floor in the building.
- Puerta: the elevator door.
- Usuario: a passenger or actor interacting with the system.
- These classes represent the physical world of the elevator system.
3. Control and orchestration
- SistemaControl is the likely coordination layer.
- It probably receives requests, updates elevator state, and decides movement/door actions.
- In the architecture diagram, this is the central logic boundary between user actions and the elevator’s internal state.
4. Input abstraction through buttons
- The Boton hierarchy suggests a command/event model:
- BotonAscensor
- BotonPiso
- BotonEmergencia
- BotonTiempoPuertas
- These classes likely encapsulate different kinds of interactions or signals that affect the system.
5. Specialized behaviors
- The presence of BotonEmergencia and BotonTiempoPuertas shows that safety and door timing are treated as separate behaviors.
- This is important architecturally: emergency handling and door-duration logic are not embedded directly into the elevator model, but isolated as distinct controls.
6. Execution entry points
- There are three runnable classes:
- EjecutarAscensor
- EjecutarAscensor2
- EjecutarAscensor3
- These are likely different simulations, test scenarios, or manual demos of the same elevator system.
- They form the application boundary, where the program starts.
7. Likely data flow
- A user or scenario class triggers a button action.
- The button action is interpreted by SistemaControl.
- The control layer updates Ascensor, Piso, and Puerta state.
- Usuario may be used to represent who requested service or who is riding the elevator.
8. Subsystem boundaries
- The repository appears to separate the system into:
- Domain entities: elevator, floors, doors, user.
- Interaction objects: buttons.
- Coordinator: system control.
- Launcher classes: runnable demos.
- This is a clean object-oriented split suitable for an architecture diagram.
9. Technology/runtime
- The project is Java-only and appears to use no visible external libraries or frameworks.
- The code is organized under SistemaAscensor/src, suggesting a simple standalone Java application.
10. Documentation artifact
- The file SistemaAscensor.drawio is likely the conceptual design diagram for the system.
- It probably reflects the same object relationships implied by the class names, making it useful as a reference for the architecture.
11. What to emphasize in a diagram
- Put SistemaControl at the center.
- Show Ascensor, Piso, Puerta, and Usuario as domain entities around it.
- Show the Boton subclasses as input/event sources feeding into control.
- Show the three EjecutarAscensor* classes as separate entry points into the same model.
12. Overall architectural style
- This is best described as a single-process, object-oriented simulation of an elevator system.
- The main concern is modeling state transitions and interactions, not networking, persistence, or UI frameworks.
Main entry points: SistemaControl.java SistemaControl · Boton.java Boton · SistemaAscensor.drawio SistemaAscensor.drawio · BotonAscensor.java BotonAscensor
Components 14
Runtimes
Executable simulation entry points
- EjecutarAscensor · Primary simulation entry point
SistemaAscensor/src/EjecutarAscensor.java - EjecutarAscensor2 · Alternative simulation scenario
SistemaAscensor/src/EjecutarAscensor2.java - EjecutarAscensor3 · Alternative simulation scenario
SistemaAscensor/src/EjecutarAscensor3.java
Domain
Core elevator state and entities
- SistemaControl · Coordinates requests and state transitions
SistemaAscensor/src/SistemaControl.java - Ascensor · Elevator state and movement
SistemaAscensor/src/Ascensor.java - Piso · Building floor model
SistemaAscensor/src/Piso.java - Puerta · Elevator door behavior
SistemaAscensor/src/Puerta.java - Usuario · Passenger or actor in the system
SistemaAscensor/src/Usuario.java
Interaction
Buttons and input abstractions
- Boton · Common abstraction for button-driven actions
SistemaAscensor/src/Boton.java - BotonAscensor · Elevator cabin button
SistemaAscensor/src/BotonAscensor.java - BotonPiso · Floor call button
SistemaAscensor/src/BotonPiso.java - BotonEmergencia · Emergency action button
SistemaAscensor/src/BotonEmergencia.java - BotonTiempoPuertas · Door timing control
SistemaAscensor/src/BotonTiempoPuertas.java
Docs
Conceptual design artifact
- SistemaAscensor.drawio · Conceptual architecture sketch
SistemaAscensor.drawio
Connections 19
- Boton → BotonAscensor: specializes · Base button abstraction
- Boton → BotonPiso: specializes · Base button abstraction
- Boton → BotonEmergencia: specializes · Base button abstraction
- Boton → BotonTiempoPuertas: specializes · Base button abstraction
- EjecutarAscensor → SistemaControl: starts · Bootstraps the simulation
- EjecutarAscensor2 → SistemaControl: starts · Bootstraps the simulation
- EjecutarAscensor3 → SistemaControl: starts · Bootstraps the simulation
- BotonAscensor → SistemaControl: signals · Cabin request reaches control
- BotonPiso → SistemaControl: signals · Hall request reaches control
- BotonEmergencia → SistemaControl: alerts · Emergency handling path
- BotonTiempoPuertas → SistemaControl: tunes · Door timing behavior
- SistemaControl → Ascensor: updates · Moves and manages elevator state
- SistemaControl → Piso: consults · Reads floor state and requests
- SistemaControl → Puerta: controls · Opens and closes the door
- SistemaControl → Usuario: serves · Responds to passenger interactions
- SistemaAscensor.drawio → SistemaControl: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Ascensor: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Piso: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Puerta: documents · Conceptual reference for the model