Elevator Control System and Simulator
Iteration 1 simulates a elevator using java threads represented with string prompts in the terminal. Users are notified when the elevator has finished a request/move and where that request is.
Iteration 2 has the goal of adding the state machines for the scheduler and elevator subsystems assuming that there is only one elevator.
Iteration 3 has the goal of adding multiple elvators to the program. The scheduler now has to choose the best elevator to receive the incoming instruction to execute based on direction and distance from floor request.
Iteration 4 has the goal of adding code for detecting and handling faults. Faults are outputted in the console as they happen, based on the the type of fault, the error handling is adjusted.
Iteration 5 has the goal of adding a User Interface for the concierge to monitor the elevator system while it is servicing requests. The performance of the system was also measured by recording the time it takes to run the entire input file.
🥇 Amanda Piazza (101143004)
- Implementation of Output Class (UI)
🥇 Juanita Rodelo (101141857)
- Measurement Analysis
- Output class (UI)
🥇 Matthew Belanger (101144323)
- Bug Fixes
🥇 Michael Kyrollos (101183521)
- Unit testing, UML diagrams
🥇 Nathan MacDiarmid (101098993)
- UML Sequence Diagram
- Scheduler State Machine
- Bug Fixes
-
Floor.java accepts events from InputData.java. Each event consists of the current time, the floor request, the direction of travel and the car button pressed. These events are sent to Scheduler.java
-
Elevator.java waits for the Scheduler to receive an event. It becomes active once the Scheulder.java is with an event in elevatorQueue ArrayList. The move is executed and the new data is sent to Scheduler.java. Implements the state machine.
-
Scheduler.java is a organized messanger between Floor.java and Elevator.java. It accepts events from Floor.java and sends this event to Elevator.java. New data is recieved from Elevator.java and is sent to Floor.java.
Open the settings.json file in VS code and modify according to the image below.
-
Open Eclipse and create a new project (File -> New -> Java Project)
-
Create a package by right clicking on the
/src
directory within the project folder in Eclipse, name itIteration3
-
Unzip
LA1G6_Iteration3.zip
-
Locate the directory in which the
Java
src files can be found. (From the Extracted zip in Step 4). From the GitHub Repo, it would be \SYSC3303A-Project\Iteration3\src\Iteration3
Include the following files
-
Elevator.java
-
Floor.java
-
InputData.java
-
Scheduler.java
-
ElevatorTest.java
-
Floor.java
-
SchedulerTest.java
If there is an x symbol beside any of the testing files, follow the intructions below.
-
Open a testing file and hover the mouse over the
@Test
code that is underlined red. Click on Add JUnit 5 library to the build path -
Hover over the import statement at the top of the file and click on the circled button in the picture below.
-
Hover over the
@Test
code that is underlined red. Click on Fix Project Setup. Click on Add JUnit 5 library to the build path -> choose org.junit.jupiter.api.Test -
Navigate to the module-info.java file and open it. Hover over the red underlined code and click on the option to change the build path. The tests should be working now.