|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--simulator.ProcessesHandler
This class run a thread that activate the vrml printer and the agents processes every simulation time. It use a resolution time set by user to count for departed time and a system to set if we use a real time, accelerated time or slow down time for simulation.
Field Summary | |
(package private) int |
agentsTime
Every agentsTime milliseconds time the agents are resumed
(this time must be multiple of resolutionTime ) |
(package private) java.lang.Thread |
printer
Contains the vrml printer proccess |
(package private) int |
printerTime
Every printerTime milliseconds time the printer is resumed
(this time must be multiple of resolutionTime ) |
protected java.util.Hashtable |
processesList
Contains the list of agents processes |
(package private) int |
realTime
This variable set the real time in the simulation with a 1 value. |
(package private) int |
resolutionTime
This is the resolution time in milliseconds of the process |
protected ServerAmbient |
serverAmbient
Contains the server ambient process |
Fields inherited from class java.lang.Thread |
contextClassLoader,
daemon,
eetop,
group,
inheritedAccessControlContext,
MAX_PRIORITY,
MIN_PRIORITY,
name,
NORM_PRIORITY,
priority,
single_step,
stillborn,
stopThreadPermission,
target,
threadInitNumber,
threadQ,
values |
Constructor Summary | |
ProcessesHandler(java.util.Hashtable processesList,
java.lang.Thread printer,
ServerAmbient serverAmbient,
int resolutionTime,
int printerTime,
int agentsTime,
int realTime)
Initialize the processes handler and start thread |
Method Summary | |
void |
run()
resume the printer processes and the agents processes at every simulation time. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.util.Hashtable processesList
java.lang.Thread printer
protected ServerAmbient serverAmbient
int realTime
resolutionTime
is 100msec. and this is set to
3, this implies that we update the simulation event us 100msec was departed, but
this is made in 300msec, so slow system can execute correctly the simulation even
if no real time is performed.int resolutionTime
int printerTime
printerTime
milliseconds time the printer is resumed
(this time must be multiple of resolutionTime
)int agentsTime
agentsTime
milliseconds time the agents are resumed
(this time must be multiple of resolutionTime
)Constructor Detail |
public ProcessesHandler(java.util.Hashtable processesList, java.lang.Thread printer, ServerAmbient serverAmbient, int resolutionTime, int printerTime, int agentsTime, int realTime)
processesList
- contains the list of agents processesprinter
- contains the vrml printer processserverAmbient
- contains the server ambientresolutionTime
- as defined in class variableprinterTime
- as defined in class variableagentsTime
- as defined in class variablerealTime
- as defined in class variableMethod Detail |
public void run()
resume
to serverAmbient
seems to be
necessary becouse when it will activate with an notify
(and the process is suspend in a queue
) not always
the process become active and so the agents processes will be wait
forever.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |