Skip to content

Iteration 3 Deliverables  #75

Description

@withaspirit

Milestone Description

For this iteration, you are to use what you have learned from Assignments 2 and 3 and split your system up into three (or more) separate programs that can run on three separate computers and communicate with each other using UDP. Your task in Assignment 3 was to implement a simple version of a remote procedure call, so you are encouraged to recycle that code here.

The Scheduler will now be used to coordinate the movement of cars such that each car carries roughly the same number of passengers as all of the others and so that the waiting time for passengers at floors is minimized. Hint: if a passenger wants to go down and there is an elevator above the passenger, then that elevator should service the passenger rather than having a second elevator go up instead. The state machines for each car should execute independently of each other, but they will all have to share their position with the scheduler. The scheduler will choose which elevator will be used to service a given request.

Note: any task preceded (???) has some uncertainty around it. This refers to how it will be done or whether it will be done at all.
NOTE: This needs to be updated because some these tasks should be done in iteration 4, not iteration 3.

Iteration 2 Leftovers

Iteration 3 Breakdown

Major Goals

  • Get simulation working for multiple elevators
  • Elevator Selection Algorithm: Scheduler chooses which elevator serves a given request
  • Message Transfer: Use Client/Server scheme as seen in Assignments 2 and 3 instead of what we have now.
  • UDP messages to transfer data as seen in Assignment 2
  • Three programs running separately as seen in Assignment 2
  • Implement Doors on Elevators

Code Breakdown

  • Client/Server
  • Message Transfer
    • ElevatorRequest Sequence Diagram
  • UDP Packets
    • Convert Requests to byte array and then from byte array to request
      • request classes implement serializable
      • method to convert Object to byte array
      • method to convert byte array to Object (maybe returns systemevent)
    • Create EncodeDecodeTest verifying this actually works
      • do the conversion for every type of request being sent (Done for FloorRequest and ElevatorRequest)
      • check that objects are the same after conversion (Not same object, but a copy of)
    • Integrate into code
  • Elevator Select Algorithm Update
    • Fix ElevatorSelectionTest (currently bugged, loops infinitely)
    • Finish implementing Elevator Select Algorithm along with a state diagram
  • Multiple Elevator Functionality
    • Note that many JUnit tests with have to be modified to ensure multiple Elevators can do them at once
    • [ ] Add JUnit tests where Structure has a varying number of Elevators
  • Doors
    • Create Doors Class #107
      • Doors should have an ENUM indicating whether it is open or closed (not a boolean), a getter to indicate whether they're open/closed, methods to open and close themselves, and a door time variable with a default value that can be modified
      • Add Doors to elevator
  • Update Movement Algorithm with doors:
    • Add statements for opening / closing doors to certain parts of the elevator
  • Three programs running separately
    • Add main methods where appropriate
    • 3 Programs working

Documentation

  • GitHub Release
  • ReadMe
    • (update) Detailed set up and test instructions, including test files used
    • Breakdown of responsibilities of each team member for this iteration
    • General description of system
    • Explaining the names of your files, set up instructions, etc
  • Diagrams
    • Updated UML class diagram
      • Insert into README
    • UML Sequence Diagram for
      • Transferring ApproachRequests
      • Transferring ElevatorRequests
      • Insert into README
    • State Machine Diagrams in README
      • Message Transfer - ElevatorRequest - FloorSubsystem to ElevatorSubsystem, Elevator, and back
      • Message Transfer - ApproachEvent - Elevator to FloorSubsystem and back
      • Elevator Service Algorithm

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions