public class DiscreteEventSimulation extends Object implements RuntimeEnvironment
Platform
runtime environment for Discrete-Event Simulation (DES). The implementation
applies DiscreteEventTimeManager
for simulation time management.
Implementation note: This class is not thread-safe.
Modifier and Type | Field and Description |
---|---|
static String |
PARALLELISM_ATTRIBUTE |
static String |
START_TIME_ATTRIBUTE |
static String |
TERMINATION_TIME_ATTRIBUTE |
static String |
TIME_GRANULARITY_ATTRIBUTE |
Constructor and Description |
---|
DiscreteEventSimulation()
Creates a new instance without any attributes set.
|
DiscreteEventSimulation(Timestamp startTime)
Creates a new instance with the given desired start time.
|
DiscreteEventSimulation(Timestamp startTime,
Timestamp terminationTime)
Creates a new instance with the given desired start and termination time.
|
DiscreteEventSimulation(Timestamp startTime,
Timestamp terminationTime,
Duration timeGranularity)
Creates a new instance with the given desired start and termination time as well as
the given time granularity.
|
DiscreteEventSimulation(Timestamp startTime,
Timestamp terminationTime,
Duration timeGranularity,
int parallelism)
Creates a new instance with the given desired start and termination time as well as
the given time granularity.
|
Modifier and Type | Method and Description |
---|---|
Controller |
getController()
Returns the
Controller of this runtime environment. |
Platform.Mode |
getExecutionMode()
Returns the execution mode of this runtime environment.
|
TimeManager |
getTimeManager()
Returns the
TimeManager of this runtime environment. |
void |
setAttributes(Attributes attributes)
Sets the attributes configuring this runtime environment.
|
public static final String START_TIME_ATTRIBUTE
public static final String TERMINATION_TIME_ATTRIBUTE
public static final String TIME_GRANULARITY_ATTRIBUTE
public static final String PARALLELISM_ATTRIBUTE
public DiscreteEventSimulation()
public DiscreteEventSimulation(Timestamp startTime)
startTime
- Logical start time desired for the simulation. The effective logical start
time might differ depending on time granularity of the TimeManager
.public DiscreteEventSimulation(Timestamp startTime, Timestamp terminationTime)
startTime
- Logical start time desired for the simulation. The effective logical start
time might differ depending on time granularity of the TimeManager
.terminationTime
- Logical termination time desired for the simulation. The effective
logical termination time might differ depending on time granularity of the
TimeManager
.public DiscreteEventSimulation(Timestamp startTime, Timestamp terminationTime, Duration timeGranularity)
startTime
- Logical start time desired for the simulation. The effective logical start
time might differ depending on time granularity of the TimeManager
.terminationTime
- Logical termination time desired for the simulation. The effective
logical termination time might differ depending on time granularity of the
TimeManager
.timeGranularity
- Time granularity for the DiscreteEventTimeManager
.public DiscreteEventSimulation(Timestamp startTime, Timestamp terminationTime, Duration timeGranularity, int parallelism)
startTime
- Logical start time desired for the simulation. The effective logical start
time might differ depending on time granularity of the TimeManager
.terminationTime
- Logical termination time desired for the simulation. The effective
logical termination time might differ depending on time granularity of the
TimeManager
.timeGranularity
- Time granularity for the DiscreteEventTimeManager
.parallelism
- Targeted hardware parallelism of running processes. Usually corresponds
to the number of threads dedicated for agent execution.public void setAttributes(Attributes attributes)
START_TIME_ATTRIBUTE
- The desired logical start time of the simulation.
The value is stated as xsd:dateTime which is very similar to the extended format of
ISO 8601 (e.g., "2012-11-01T16:35Z" for November 1st in year 2012 at 4:35 a.m.
in Universal Time Coordinated, UTC). When omitting time zone qualifiers the
value is interpreted for the local time zone.
TERMINATION_TIME_ATTRIBUTE
- The desired logical termination time of the
simulation. The value is stated as xsd:dateTime.
TIME_GRANULARITY_ATTRIBUTE
- Time granularity (in milliseconds) applied for
time management.
setAttributes
in interface RuntimeEnvironment
attributes
- the attributes specifying this runtime environmentpublic Platform.Mode getExecutionMode()
RuntimeEnvironment
getExecutionMode
in interface RuntimeEnvironment
public TimeManager getTimeManager()
RuntimeEnvironment
TimeManager
of this runtime environment.getTimeManager
in interface RuntimeEnvironment
public Controller getController()
RuntimeEnvironment
Controller
of this runtime environment.getController
in interface RuntimeEnvironment
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.