public class SimpleSimulationContext extends Object
The simulation context holds the current simulation time as well as available active resources.
| Constructor and Description |
|---|
SimpleSimulationContext()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActiveResource(String name,
ASimpleActiveResource resource)
Adds an active resource to this simulation.
|
ASimpleActiveResource |
getActiveResource(String name)
Getter method for the active resource identified by the given name.
|
double |
getSimulatedTime()
Getter method for passed simulation time.
|
void |
setSimulatedTime(double simulatedTime)
Setter for the passed simulation time.
|
public double getSimulatedTime()
public void setSimulatedTime(double simulatedTime)
simulatedTime - Passed simulation time.public void addActiveResource(String name, ASimpleActiveResource resource)
name - The name of the active resource, used as a reference key.resource - THe active resource to be added.public ASimpleActiveResource getActiveResource(String name)
name - The name of the resource to be returned.