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
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
LOGGER
protected ResourceRegistry
resourceRegistry
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addIssue(de.uka.ipd.sdq.errorhandling.SeverityAndIssue issue)
Adds an issues to the list of issues.void
finalise()
SimuComConfig
getConfig()
Deprecated.usegetConfiguration()
insteadSimuComConfig
getConfiguration()
SimulationResult
getErrorStatus()
Throwable
getErrorThrowable()
org.palladiosimulator.reliability.FailureStatistics
getFailureStatistics()
List<de.uka.ipd.sdq.errorhandling.SeverityAndIssue>
getIssues()
long
getMainMeasurementsCount()
org.palladiosimulator.probeframework.ProbeFrameworkContext
getProbeFrameworkContext()
ResourceRegistry
getResourceRegistry()
de.uka.ipd.sdq.scheduler.ISchedulingFactory
getSchedulingFactory()
de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory
getSimEngineFactory()
de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl
getSimulationControl()
SimuComStatus
getSimulationStatus()
Collection<IWorkloadDriver>
getUsageScenarios()
Returns the current collection of active workload drivers (simulated usage scenarios)void
increaseMainMeasurementsCount()
void
init()
void
initialiseResourceContainer(IResourceContainerFactory resourceContainerFactory)
Create this simulation run's resources using the resource factory given.void
setIssues(List<de.uka.ipd.sdq.errorhandling.SeverityAndIssue> issues)
Sets the list of issues.void
setSimulationControl(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl control)
void
setSimulationEngineFactory(de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory factory)
void
setStatus(SimulationResult error, Throwable t)
Set the simulation resultvoid
setUsageScenarios(IWorkloadDriver[] workload)
Add the given usage scenarios to this simulation run
-
-
-
Field Detail
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER
-
resourceRegistry
protected ResourceRegistry resourceRegistry
-
-
Constructor Detail
-
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 Detail
-
getIssues
public List<de.uka.ipd.sdq.errorhandling.SeverityAndIssue> getIssues()
- Returns:
- Gets the list of issues.
-
setIssues
public void setIssues(List<de.uka.ipd.sdq.errorhandling.SeverityAndIssue> issues)
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.SeverityAndIssue issue)
Adds an issues to the list of issues.- Parameters:
issue
- the issue.
-
init
public void init()
-
getUsageScenarios
public Collection<IWorkloadDriver> getUsageScenarios()
Returns the current collection of active workload drivers (simulated usage scenarios)- Returns:
- the collection of active workload drivers
-
setUsageScenarios
public void setUsageScenarios(IWorkloadDriver[] workload)
Add the given usage scenarios to this simulation run- Parameters:
workload
- Usage scenarios to execute during this simulation run
-
getResourceRegistry
public ResourceRegistry getResourceRegistry()
- Returns:
- The resource registry storing all simulated resources and their states
-
initialiseResourceContainer
public void initialiseResourceContainer(IResourceContainerFactory resourceContainerFactory)
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
public void setStatus(SimulationResult error, Throwable t)
Set the simulation result- Parameters:
error
- The new statust
- The exception message if any, null otherwise
-
getErrorStatus
public SimulationResult getErrorStatus()
- Returns:
- The simulation status
-
getErrorThrowable
public Throwable getErrorThrowable()
- Returns:
- The exception caused during the last simulation run. Null if there was no such exception
-
getConfig
public SimuComConfig 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
public SimuComStatus getSimulationStatus()
-
getProbeFrameworkContext
public org.palladiosimulator.probeframework.ProbeFrameworkContext getProbeFrameworkContext()
-
getSchedulingFactory
public de.uka.ipd.sdq.scheduler.ISchedulingFactory getSchedulingFactory()
-
finalise
public void finalise()
-
getConfiguration
public SimuComConfig getConfiguration()
-
getFailureStatistics
public org.palladiosimulator.reliability.FailureStatistics getFailureStatistics()
-
-