Skip to content

aelsammak/ElevatorSystem

Repository files navigation

SYSC 3303A - Project (Elevator System)

Lab Section: L1 (Group 10)
Members: Kareem El-Hajjar, Adi El-Sammak, Ben Herriott, Erica Morgan, Cam Sommerville
Authors: Ben Herriott, Erica Morgan

Purpose: Design and develop a multi-car elevator system and simulator utilizing concurrent programming. The system will use a scheduler to control elevator routing, an elevator subsystem to handle individual car operations, and a floor subsystem to handle elevator requests on each floor.

Requirements:

  • Integrated Development Environment (IDE): Eclipse Java IDE
  • Java Development Kit: JDK-15.0.2
  • Plugins: Egit
  • Credentials: GitHub username and personal access token (PAC)

Setup Instructions:

  • Clone Repository
    • Clone repository via Eclipse
      • Go to File -> Import -> Git -> Projects from git -> Next -> Clone URI
      • Ensure all branches are checked and click Next
      • Choose directory to store project and click Next
      • Select Working Tree and click Next
      • Click Finish
    • Cloning repository via terminal
      • Go to https://github.com/aelsammak/ElevatorSystem/
      • Above the list of files click "Code"
      • Under "Clone with HTTPS" click clipboard
      • Open Terminal
      • Change the current working directory to the location where you want the cloned directory
      • Type git clone, and then paste the URL you copied earlier
      • $ git clone https://github.com/aelsammak/ElevatorSystem.git
      • Press Enter to create your local clone
      • Open Eclipse and Go to File -> Import -> General -> Existing Projects into Workspace
      • Select root directory where project is kept
      • Click Finish

Execution Instructions in Eclipse:

  • Using multiple programs/consoles (must be run in the following order)
    • Navigate to the /ElevatorSystem/src/gui/GUI.java
    • Right-click on GUI.java then click Run as -> Java Application
    • Navigate to the /ElevatorSystem/src/floorsubsystem/FloorSubsystem.java
    • Right-click on FloorSubsystem.java then click Run as -> Java Application
    • Navigate to the /ElevatorSystem/src/elevatorsubsystem/ElevatorSubsystem.java
    • Right-click on ElevatorSubsystem.java then click Run as -> Java Application
    • Navigate to the /ElevatorSystem/src/scheduler/Scheduler.java
    • Right-click on Scheduler.java then click Run as -> Java Application
  • Using one program/console
    • Navigate to the /ElevatorSystem/src/gui/GUI.java
    • Right-click on GUI.java then click Run as -> Java Application
    • Navigate to the /ElevatorSystem/src/main/Main.java
    • Right-click on Main.java then click Run as -> Java Application

Testing Instructions in Eclipse:

  • Navigate to the /ElevatorSystem/src/test/TestSuiteRunner.java
  • Right-click on TestSuiteRunner.java then click Run as -> Java Application
  • Note: this will run all test cases contained within the project

List of files: root of code files ('/ElevatorSystem/src'):

  • /common:
    • Common.java - class responsible for storing common attributes for other classes within the system to access
    • Config.java - class responsible for loading all the properties necessary for the simulation from a given config file.
    • RPC.java - class used as helper class for RPC communication.
  • /elevatorsubsystem:
    • ArrivalSensor.java - class represents the Elevator's ArrivalSensor
    • Door.java - class represents the Elevator's doors
    • Elevator.java - class represents a single Elevator in the ElevatorSubSystem
    • ElevatorButton.java - class represents the Elevator's buttons
    • ElevatorLamp.java - class represents the Elevator's lamps
    • ElevatorSubsystem.java - class acts as the intermediate between the Elevators and the Scheduler
    • Motor.java - class represents the Elevator's motor
    • MotorState.java - enum responsible for representing the different states of the Elevator's motor
    • StuckSensor.java - class used to simulate the time the elevator is stuck for when a transient error occurs
  • /floorsubsystem:
    • BottomFloor.java - Bottom floor variant in the Floor class
    • FileLoader.java - responsible for reading the instructions from the simulation.csv file
    • Floor.java - class represents a single Floor in the FloorSubSystem.
    • FloorButton.java - class represents the floor button and all its functionality
    • FloorLamp.java - class represents the floor lamp and all its functionality
    • FloorSubsystem.java - class represents the FloorSubSystem
    • MiddleFloor.java - Middle floor variant of the Floor class
    • TopFloor.java - Top floor variant of the Floor class
  • /gui:
    • GUI.java - class is used to represent the Elevator Simulation in the form of a GUI
    • TextManager.java - class is responsible for writing the logs to the textpanel
  • /scheduler:
    • ElevatorState.java - Keeps track of elevator state
    • FloorState.java - Keeps track of floor state
    • Scheduler.java - class responsible for storing and dispatching elevators in response to passenger requests
    • SchedulerState.java - enum responsible for representing the different states of the Scheduler
  • /test:
    • ElevatorTest.java - tests the implemented elevator selection algorithm to see based on a floor request which elevator will be selected to best facilitate the request
    • ElevatorTestHelper.java - helper class to mimic the work of the schedule on a series of elevators, code taken from the Scheduler class
    • InitialTest.java - test cases specifically focused on testing reading and parsing of data from csv's to the floor and elevator subsystems.
    • RPCTest.java - Tests all mechanisms of RPC within the application, from encoding to decoding to a simple send/recieve test
    • TestSuiteRunner.java - runs all test cases created within the application
  • /main:
    • Main.java - class that is responsible for running simulation and starting all threads
  • /resources:
    • config.cfg - config file used to configure the parameters and initial settings for the program

Responsibilities:

  • Elevator Subsystem: Adi El-Sammak
  • Floor Subsystem: Kareem El-Hajjar
  • Scheduler Subsystem: Erica Morgan & Cam Sommerville
  • Elevator Timings: Erica Morgan
  • UML Class Diagram: Cam Sommerville, Erica Morgan
  • Sequence Diagram: Adi El-Sammak & Kareem
  • State Machine Diagrams: Adi El-Sammak, Cam Sommerville & Kareem El-Hajjar
  • Testing: Ben Herriott
  • README: Ben Herriott, Erica Morgan

About

SYSC 3303 - Team Project - Group 10

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages