|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimulation
public class Simulation
This is a singleton class, which means only one instance can
be created.
COMP 2100
Project 3
November 2014
Method Summary | |
---|---|
static Simulation |
getInstance()
Get the Simulation object. |
WaitingLine |
getLine()
Obtain a reference to the WaitingLine for this simulation. |
Server |
getServer()
Obtain a reference to the Server for this simulation. |
int |
getTime()
Get the current simulation clock time. |
void |
halt()
Halt the simulation and exit. |
boolean |
isTracing()
Determines whether tracing information should be displayed during the simulation run. |
static void |
main(java.lang.String[] args)
|
void |
run()
Method to perform the simulation run. |
void |
scheduleArrival()
Schedule a customer arrival event. |
void |
scheduleDeparture()
Schedule a customer departure event. |
void |
scheduleSimulationEnd(int time)
Schedule the simulation end event. |
void |
scheduleSimulationReport(int time)
Schedule the simulation report event. |
void |
scheduleSimulationReportSequence(int interval,
int endTime)
Schedule a sequence of simulation report events based on a fixed reporting interval. |
void |
setTracing(boolean tracing)
Determine whether tracing information should be displayed during the simulation run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String[] args)
public static Simulation getInstance()
public void run()
public void halt()
public int getTime()
public boolean isTracing()
public void setTracing(boolean tracing)
tracing
- Set true to enable tracing and false to disable itpublic WaitingLine getLine()
public Server getServer()
public void scheduleArrival()
public void scheduleDeparture()
public void scheduleSimulationReport(int time)
time
- desired reporting time in simulation clock unitspublic void scheduleSimulationReportSequence(int interval, int endTime)
interval
- desired reporting interval in simulation clock units. The first
report will be produced this many clock units following the current clock time.endTime
- No reports will be scheduled later than this clock time.public void scheduleSimulationEnd(int time)
time
- desired ending time in simulation clock units
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |