|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectm865.simulation.DepartmentStore
public class DepartmentStore
The DepartmentStore has a main method which sets up and starts the simulation. The DepartmentStore object manages the entities in the simulation and shuts the simulation down when there are no more events.
Field Summary | |
---|---|
ButtonSystem |
buttonSystem
The ButtonSystem that records the interests of passengers who are waiting for elevators |
static int |
CAPACITY
Symbolic constants that define various simulation parameters |
Clock |
clock
The clock keeps track of the simulation time and insures that events occur in the proper order and at the proper times. |
java.util.ArrayList<BalkingQueue> |
elevatorQueues
The array of queues that hold the passengers who are waiting for elevators. |
Elevator[] |
elevators
The array of Elevators |
int |
elevatorTransitTime
The time for an elevator to move from one floor to the next |
static int |
LOADTIME
|
int |
numberOfElevators
The number of elevators |
int |
numberOfFloors
The number of floors |
static int |
OFFLOADTIME
|
PassengerFactory |
passengerFactory
The factory that generates the people, sets up their shopping tasks, and schedules their arrival events. |
static int |
QUIET
Symbolic constants to indicate the verbosity level |
Statistician |
statistician
The class which collects the Passenger and teller statistics and generates the simulation report. |
static int |
VERBOSE
|
int |
verbosity
verbosity indicates the level of information that gets printed out. |
static int |
VERY_VERBOSE
|
Constructor Summary | |
---|---|
DepartmentStore(int v,
int nf,
int ne,
int tt,
PassengerFactory pf)
The constructor for the DepartmentStore. |
Method Summary | |
---|---|
BalkingQueue |
getQueue(int floor,
boolean goingUp)
Get an elevator queue |
static void |
main(java.lang.String[] args)
The main method sets up the simulation. |
void |
run()
The run method runs the simulation. |
java.lang.String |
toString()
the toString method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int QUIET
public static final int VERBOSE
public static final int VERY_VERBOSE
public static final int CAPACITY
public static final int OFFLOADTIME
public static final int LOADTIME
public PassengerFactory passengerFactory
public Clock clock
public int numberOfFloors
public int numberOfElevators
public int elevatorTransitTime
public Elevator[] elevators
public java.util.ArrayList<BalkingQueue> elevatorQueues
public ButtonSystem buttonSystem
public Statistician statistician
public int verbosity
Constructor Detail |
---|
public DepartmentStore(int v, int nf, int ne, int tt, PassengerFactory pf)
v
- The flag that indicates how verbose the simulation
should be.Method Detail |
---|
public void run()
public BalkingQueue getQueue(int floor, boolean goingUp)
floor
- -The floor using conventional ordinal numbers (1, 2, etc.)goingUp
- A boolean true for going up and false for going down
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- The list of arguments needed to set up the simulation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |