Simulation

Elevator Scheduling System

Simulation Loop

The simulation has some global elements that all things can access

The simulation holds a request maker, elevator, and operator. It foes in the following order.

Startup

This sets up the elevators, requests, log, etc

Log

A log request happens on

A log request tracks

Requests

There are two types of requests. Outside requests and inside requests. The elevator can choose how to handle them. An outside request is a request that a user makes when they ask the elevator to pick them up. An inside request is the request that the user makes once they are picked up and inside of the elevator.

When an outside request is handled, a corresponding inside request is made.

Elevator

This elevator has one job: Stopping at a floor. This means it stops at a floor and whoever is on that floor gets dropped off or picked up.

It has the following functions which can be used by the operator

The elevator also has functions that the operator cannot use

To know which floor to stop at, it gets requests from the users. When user sends a request, it is put in the queue of the elevator. A request tells the elevator someone wants to be picked up or dropped off. An elevator may only have as many inside requests as its capacity.

Stop

This saves the log to a file and downloads it to the computer