public class Scheduler extends Object implements IScheduler
Modifier and Type | Field and Description |
---|---|
protected ArrayList<TreeMap<Double,Set<IAtomicSimulator>>> |
scheds
The array is to differentiate the models making an internal event with
output from the models making an internal event without output.
|
Constructor and Description |
---|
Scheduler()
Default constructor creates the maps
|
Modifier and Type | Method and Description |
---|---|
void |
addSimulator(Double tN,
IAtomicSimulator sim,
int value)
Add a simulator at a given time of next internal event
|
Double |
findGTEKey(Double inT)
Given a time of event, finds the greatest key (time of next event)
lower or equal to the given time.
|
void |
remove(Double tN,
int val)
At a given event time, remove all the scheduled simulators from either
the tree of outputting models, or the tree without output
|
void |
removeSimulator(double t,
IAtomicSimulator sim)
Remove a simulator from the tree of future events at the given key
time.
|
Set<IAtomicSimulator> |
selectp(Double t,
int value)
Select the next event set (at a given time, the minimum one in this
case, all events making an internal transition)
|
protected ArrayList<TreeMap<Double,Set<IAtomicSimulator>>> scheds
public void addSimulator(Double tN, IAtomicSimulator sim, int value)
addSimulator
in interface IScheduler
tN
- time of next eventsim
- the simulatorvalue
- the valuepublic Set<IAtomicSimulator> selectp(Double t, int value)
selectp
in interface IScheduler
t
- time of eventvalue
- the value deciding between with or without (you) outputpublic void remove(Double tN, int val)
remove
in interface IScheduler
tN
- event timeval
- code for either of the two treespublic void removeSimulator(double t, IAtomicSimulator sim)
removeSimulator
in interface IScheduler
t
- event time the simulator was associated withsim
- the simulator to remove from the scheduler at that event
timepublic Double findGTEKey(Double inT)
findGTEKey
in interface IScheduler
inT
- the time before the searched eventCopyright © 2017–2019 UniversitĂ© CĂ´te d'Azur, CNRS, I3S. All rights reserved.