Class SimpleSimulationContext

java.lang.Object
org.palladiosimulator.probeframework.probes.example.SimpleSimulationContext

public class SimpleSimulationContext extends Object
Represents a simple simulation context for demonstration purposes.

The simulation context holds the current simulation time as well as available active resources.

  • 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

      public void addActiveResource(String name, ASimpleActiveResource resource)
      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

      public ASimpleActiveResource getActiveResource(String name)
      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.