A B C D E F G H I K L M N O P R S T U V W X Y

A

actionPerformed(ActionEvent) - Method in class ElevatorSimulation.Control
 
addAgent(Cell) - Method in class Landscape
Adds an agent to the Landscape
addPassenger(Passenger) - Method in class ElevatorBank
Adds a passenger to the bank by placing them in the proper queue on their start floor.
advance() - Method in class Landscape
Advances the Landsacpe one turn of the simulation.
agents - Variable in class Landscape
List of Cell agents on the landscape

B

bank - Variable in class Dispatch
 
bank - Variable in class Elevator
A link to the elevator bank
bank - Variable in class ElevatorSimulation
 

C

Cell - Class in <Unnamed>
A parent class for Cell objects.
Cell(double, double, int) - Constructor for class Cell
Constructor that places the cell and sets its type.
closeFiles() - Method in class Dispatch
Closes any files opened by this dispatch.
consumeCount - Variable in class Dispatch
 
consumePassenger(Passenger, Elevator) - Method in class Dispatch
Receives a passenger from the simulation.
currentFloor - Variable in class Elevator
The current floor of the elevator

D

direction - Variable in class Elevator
The current direction of motion of the elevator
Dispatch - Class in <Unnamed>
Responsible for injecting and receiving passengers from the elevator simulation.
Dispatch() - Constructor for class Dispatch
Builds a dispatch; private to control when the single instance is instantiated.
dispatched - Variable in class Dispatch
 
display - Variable in class ElevatorSimulation
 
DOOR_TIME - Static variable in class Elevator
the penalty incurred from stopping at a floor
downQueues - Variable in class ElevatorBank
 
draw(Graphics, int, int, int) - Method in class Cell
 
draw(Graphics, int, int, int) - Method in class Elevator
Draws an elevator as a stack of floors.

E

Elevator - Class in <Unnamed>
Represents an elevator in an elevator simulation.
Elevator(ElevatorBank, int) - Constructor for class Elevator
Create an elevator in an elevator bank with a maximum capacity.
Elevator.Direction - Enum in <Unnamed>
Represents the current traveling state of an elevator.
Elevator.Direction() - Constructor for enum Elevator.Direction
 
ElevatorBank - Class in <Unnamed>
Represents a collection of elevators that operate independently.
ElevatorBank(int, int, int) - Constructor for class ElevatorBank
Initializes an elevator bank with the given number of elevators and floors.
elevators - Variable in class ElevatorBank
 
ElevatorSimulation - Class in <Unnamed>
Simulates the operation of a bank of elevators.
ElevatorSimulation(int, int, int) - Constructor for class ElevatorSimulation
Initializes an elevator simulation.
ElevatorSimulation.Control - Class in <Unnamed>
Provides simple keyboard control to the simulation by implementing the KeyListener interface.
ElevatorSimulation.Control() - Constructor for class ElevatorSimulation.Control
 
ElevatorSimulation.PlayState - Enum in <Unnamed>
 
ElevatorSimulation.PlayState() - Constructor for enum ElevatorSimulation.PlayState
 
emptyRule() - Method in class Elevator
Determines what an elevator does when it is empty.

F

fileIn - Variable in class Dispatch
 
fileOut - Variable in class Dispatch
 
FLOOR_DMAX - Static variable in class Elevator
the maximum number of floors one can move at a time
formatStatistics() - Method in class Dispatch
Returns a string containing statistics.

G

getAgents() - Method in class Landscape
Returns an ArrayList of the agents in a Landscape
getCol() - Method in class Cell
 
getCols() - Method in class Landscape
Returns the width of the Landscape in units
getCurrentFloor() - Method in class Elevator
 
getDirection() - Method in class Elevator
Gets the Direction the elevator is traveling.
getElevator(int) - Method in class ElevatorBank
Gets the elevator with the given index.
getElevatorCount() - Method in class ElevatorBank
 
getFloorCount() - Method in class ElevatorBank
 
getFloorQueue(Elevator) - Method in class ElevatorBank
Gets a queue of passengers waiting to board an elevator.
getHeight() - Method in class Landscape
Returns the height of the Landscape in units
getNearestPassenger(Elevator) - Method in class ElevatorBank
Returns a reference to the passenger that is closest to the given elevator in the direction it is traveling.
getNeighbors(Cell) - Method in class Landscape
Returns the neighbors of the query Cell
getRow() - Method in class Cell
 
getRows() - Method in class Landscape
Returns the height of the Landscape in units
getType() - Method in class Cell
 
getWidth() - Method in class Landscape
Returns the width of the Landscape in units
getX() - Method in class Cell
 
getY() - Method in class Cell
 

H

height - Variable in class Landscape
Height of the landscpe

I

instance - Static variable in class Dispatch
 
instance() - Static method in class Dispatch
Returns a reference to the single instance of this class.
isFloorValid(int) - Method in class ElevatorBank
Determines whether a given floor index is valid for this bank.
isNeighbor(Cell) - Method in class Cell
 
isNeighbor(Cell) - Method in class Elevator
 
iterate() - Method in class ElevatorSimulation
Implements one iteration (time step) of the elevator simulation.
iteration - Variable in class Dispatch
 
iteration - Variable in class ElevatorSimulation
 

K

keyTyped(KeyEvent) - Method in class ElevatorSimulation.Control
Controls the simulation in response to key presses.

L

landscape - Variable in class Dispatch
 
landscape - Variable in class ElevatorSimulation
 
Landscape - Class in <Unnamed>
Represents a continuous landscape with agents moving on it.
Landscape(int, int) - Constructor for class Landscape
Constructor
Landscape(double, double) - Constructor for class Landscape
Alternate Constructor using doubles

M

main(String[]) - Static method in class Elevator
Tests the elevator class by creating a new elevator and adding a few passengers.
main(String[]) - Static method in class ElevatorBank
Tests the elevator bank by creating a new bank, adding passengers to it, and seeing where an elevator would stop traveling up and down.
main(String[]) - Static method in class ElevatorSimulation
Runs an elevator simulation.
main(String[]) - Static method in class Landscape
Test function
maxWaitTime - Variable in class Dispatch
 
minWaitTime - Variable in class Dispatch
 

N

nextLine - Variable in class Dispatch
 
nonEmptyRule() - Method in class Elevator
Determines what an elevator does when it is not empty.

O

openDoors() - Method in class Elevator
Default implementation for handling the case where the doors open on a particular floor.

P

passengers - Variable in class Elevator
The priority queue of passengers in the elevator
pause - Variable in class ElevatorSimulation
 
pGround - Variable in class Dispatch
 
pOther - Variable in class Dispatch
 
produceCount - Variable in class Dispatch
 
producePassenger(Passenger) - Method in class Dispatch
Injects a passenger into the simulation; this adds the passenger to the elevator bank, initially waiting at their start floor.

R

rand - Static variable in class Dispatch
 
readFromFile(String) - Method in class Dispatch
Sets up this class to read simulation data in from a file.
readPassenger() - Method in class Dispatch
Attempts to read information for a single passenger in from the input file.
removeAgent(Cell) - Method in class Landscape
Removes an agent from the Landscape
reset() - Method in class Landscape
Clears all agents from the Landscape

S

setBank(ElevatorBank) - Method in class Dispatch
Sets the elevator bank that this Dispatch spawns passengers for.
setCurrentFloor(int) - Method in class Elevator
 
setDirection(Elevator.Direction) - Method in class Elevator
Sets the direction the elevator is traveling.
setGroundProbability(double) - Method in class Dispatch
Sets the probability that a passenger will be generated on the ground floor.
setLandscape(Landscape) - Method in class Dispatch
Sets the landscape that this Dispatch spawns passengers in.
setOtherProbability(double) - Method in class Dispatch
Sets the probability that a passenger will be generated on an floor other than the ground floor.
setPosition(double, double) - Method in class Cell
 
setSpawnTries(int) - Method in class Dispatch
Sets the number of times that passengers could get spawned in each iteration.
setType(int) - Method in class Cell
 
setupUI() - Method in class ElevatorSimulation
Sets up the UI controls for the elevator simulation.
spawnPassengers() - Method in class Dispatch
Spawns new passengers randomly and adds them to the simulation.
spawnTries - Variable in class Dispatch
 
state - Variable in class ElevatorSimulation
 

T

textMessage - Variable in class ElevatorSimulation
 
toString() - Method in class Cell
 
toString() - Method in class Elevator
Returns a string representation of this elevator.
toString() - Method in class ElevatorBank
Returns a string representation of the elevator bank.
toString() - Method in class Landscape
Returns a string representation of the Landscape
totalWaitTime - Variable in class Dispatch
 
type - Variable in class Cell
a unique type identifier

U

updateState(Landscape) - Method in class Cell
 
updateState() - Method in class Dispatch
Instructs the dispatch to move to the next iteration of the simulation, spawning new passengers and adding them to the simulation.
updateState(Landscape) - Method in class Elevator
Updates the elevator by dropping off or picking up passengers at the current floor, if needed, or moving one floor in either direction.
upQueues - Variable in class ElevatorBank
 

V

valueOf(String) - Static method in enum Elevator.Direction
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum ElevatorSimulation.PlayState
Returns the enum constant of this type with the specified name.
values() - Static method in enum Elevator.Direction
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum ElevatorSimulation.PlayState
Returns an array containing the constants of this enum type, in the order they are declared.

W

waitTime - Variable in class Elevator
The wait time at each floor
width - Variable in class Landscape
Width of the landscpe
writeToFile(String) - Method in class Dispatch
Sets up this class to write simulation data out to a file.

X

x - Variable in class Cell
x-position in units

Y

y - Variable in class Cell
y-position int units

A B C D E F G H I K L M N O P R S T U V W X Y