Class SimpleSimulationContext
java.lang.Object
org.palladiosimulator.probeframework.probes.example.SimpleSimulationContext
Represents a simple simulation context for demonstration purposes.
The simulation context holds the current simulation time as well as available active resources.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addActiveResource
(String name, ASimpleActiveResource resource) Adds an active resource to this simulation.getActiveResource
(String name) Getter method for the active resource identified by the given name.double
Getter method for passed simulation time.void
setSimulatedTime
(double simulatedTime) Setter for the passed simulation time.
-
Constructor Details
-
SimpleSimulationContext
public SimpleSimulationContext()Default constructor.
-
-
Method Details
-
getSimulatedTime
public double getSimulatedTime()Getter method for passed simulation time.- Returns:
- Passed simulation time.
-
setSimulatedTime
public void setSimulatedTime(double simulatedTime) Setter for the passed simulation time.- Parameters:
simulatedTime
- Passed simulation time.
-
addActiveResource
Adds an active resource to this simulation.- Parameters:
name
- The name of the active resource, used as a reference key.resource
- THe active resource to be added.
-
getActiveResource
Getter method for the active resource identified by the given name.- Parameters:
name
- The name of the resource to be returned.- Returns:
- The active resource of interest.
-