Class SimuComModel
java.lang.Object
de.uka.ipd.sdq.scheduler.SchedulerModel
de.uka.ipd.sdq.simucomframework.model.SimuComModel
- All Implemented Interfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel
public class SimuComModel
extends de.uka.ipd.sdq.scheduler.SchedulerModel
Central simulation class needed by desmoj. Keeps the simulation state which is not part of the
context of threads
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.log4j.Loggerprotected ResourceRegistry -
Constructor Summary
ConstructorsConstructorDescriptionSimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Deprecated.SimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, org.palladiosimulator.probeframework.ProbeFrameworkContext probeFrameworkContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Deprecated.SimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, org.palladiosimulator.probeframework.ProbeFrameworkContext probeFrameworkContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager, ResourceRegistry resourceRegistry) Creates a new SimuComModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIssue(de.uka.ipd.sdq.errorhandling.core.SeverityAndIssue issue) Adds an issues to the list of issues.voidfinalise()Deprecated.org.palladiosimulator.reliability.FailureStatisticsList<de.uka.ipd.sdq.errorhandling.core.SeverityAndIssue>longorg.palladiosimulator.probeframework.ProbeFrameworkContextde.uka.ipd.sdq.scheduler.ISchedulingFactoryde.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactoryde.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControlReturns the current collection of active workload drivers (simulated usage scenarios)voidvoidinit()voidinitialiseResourceContainer(IResourceContainerFactory resourceContainerFactory) Create this simulation run's resources using the resource factory given.voidSets the list of issues.voidsetSimulationControl(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control) voidsetSimulationEngineFactory(de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory) voidsetStatus(SimulationResult error, Throwable t) Set the simulation resultvoidsetUsageScenarios(IWorkloadDriver[] workload) Add the given usage scenarios to this simulation run
-
Field Details
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER -
resourceRegistry
-
-
Constructor Details
-
SimuComModel
@Deprecated public SimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Deprecated.Creates a new SimuComModel. ProbeFrameworkContext and ResourceRegistry are created as part of this constructor. Legacy behavior of SimuCom. -
SimuComModel
@Deprecated public SimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, org.palladiosimulator.probeframework.ProbeFrameworkContext probeFrameworkContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Deprecated.Creates a new SimuComModel. The ResourceRegistry is created as part of this constructor. -
SimuComModel
public SimuComModel(SimuComConfig config, SimuComStatus status, de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory, boolean isRemoteRun, org.palladiosimulator.probeframework.ProbeFrameworkContext probeFrameworkContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager, ResourceRegistry resourceRegistry) Creates a new SimuComModel. Please use this constructor for future work.
-
-
Method Details
-
getIssues
- Returns:
- Gets the list of issues.
-
setIssues
Sets the list of issues.- Parameters:
issues- the list of issues to use. May not benull.
-
addIssue
public void addIssue(de.uka.ipd.sdq.errorhandling.core.SeverityAndIssue issue) Adds an issues to the list of issues.- Parameters:
issue- the issue.
-
init
public void init() -
getUsageScenarios
Returns the current collection of active workload drivers (simulated usage scenarios)- Returns:
- the collection of active workload drivers
-
setUsageScenarios
Add the given usage scenarios to this simulation run- Parameters:
workload- Usage scenarios to execute during this simulation run
-
getResourceRegistry
- Returns:
- The resource registry storing all simulated resources and their states
-
initialiseResourceContainer
Create this simulation run's resources using the resource factory given. The factory is queried for the list of IDs of the resources to create and creates and inialises each of them- Parameters:
resourceContainerFactory- The resource factory used to initialse the simulated resources
-
setStatus
Set the simulation result- Parameters:
error- The new statust- The exception message if any, null otherwise
-
getErrorStatus
- Returns:
- The simulation status
-
getErrorThrowable
- Returns:
- The exception caused during the last simulation run. Null if there was no such exception
-
getConfig
Deprecated.usegetConfiguration()instead- Returns:
- The configuration settings of this simulation model instance
-
increaseMainMeasurementsCount
public void increaseMainMeasurementsCount() -
getMainMeasurementsCount
public long getMainMeasurementsCount() -
getSimulationControl
public de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl getSimulationControl() -
setSimulationControl
public void setSimulationControl(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control) -
setSimulationEngineFactory
public void setSimulationEngineFactory(de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory) -
getSimEngineFactory
public de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory getSimEngineFactory() -
getSimulationStatus
-
getProbeFrameworkContext
public org.palladiosimulator.probeframework.ProbeFrameworkContext getProbeFrameworkContext() -
getSchedulingFactory
public de.uka.ipd.sdq.scheduler.ISchedulingFactory getSchedulingFactory() -
finalise
public void finalise() -
getConfiguration
-
getFailureStatistics
public org.palladiosimulator.reliability.FailureStatistics getFailureStatistics()
-
getConfiguration()instead