Package edu.kit.ipd.sdq.eventsim.system
Class EventSimSystemModel
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.system.EventSimSystemModel
-
- All Implemented Interfaces:
ISystem
public class EventSimSystemModel extends Object implements ISystem
The simulation model. This is the central class of an EventSim simulation run. Before the simulation starts, it initialises the simulation in theinit()
method. During the simulation, it provides information about the PCM model that is to be simulated, the simulation configuration and the simulation status. Finally, it cleans up after a simulation run in the {finalise()} method.Instances are created by using the static
create
method that builds the simulation model in accordance with a specified simulation configuration.
-
-
Constructor Summary
Constructors Constructor Description EventSimSystemModel(ISimulationMiddleware middleware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
callService(IUser user, org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall call, Procedure callback)
Handles the simulation of a service call.IActiveResource
getActiveResource()
ComponentInstance
getComponent(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
Returns the component instance that is encapsulated by the specified assembly context.MeasurementFacade<SystemMeasurementConfiguration>
getMeasurementFacade()
IPassiveResource
getPassiveResource()
AllocationRegistry
getResourceAllocation()
Returns the allocation ofAssemblyContext
s toSimulatedResourceContainer
s.SimulatedResourceEnvironment
getResourceEnvironment()
Returns the resource environment comprisingSimulatedResourceContainer
.
-
-
-
Constructor Detail
-
EventSimSystemModel
@Inject public EventSimSystemModel(ISimulationMiddleware middleware)
-
-
Method Detail
-
callService
public void callService(IUser user, org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall call, Procedure callback)
Handles the simulation of a service call. Service calls are usually generated by a workload simulation component.- Specified by:
callService
in interfaceISystem
- Parameters:
user
- The user which initiated the callcall
- The called service in form of a PCM entry level system call actioncallback
- the callback to be invoked once the system call has been simulated completely
-
getActiveResource
public IActiveResource getActiveResource()
-
getPassiveResource
public IPassiveResource getPassiveResource()
-
getResourceEnvironment
public SimulatedResourceEnvironment getResourceEnvironment()
Returns the resource environment comprisingSimulatedResourceContainer
.- Returns:
- the resource environment
-
getResourceAllocation
public AllocationRegistry getResourceAllocation()
Returns the allocation ofAssemblyContext
s toSimulatedResourceContainer
s.- Returns:
- a registry containing the resource allocations
-
getComponent
public ComponentInstance getComponent(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
Returns the component instance that is encapsulated by the specified assembly context.- Parameters:
assemblyContext
- the assembly context- Returns:
- the queried component instance
-
getMeasurementFacade
public MeasurementFacade<SystemMeasurementConfiguration> getMeasurementFacade()
-
-