Class 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 Detail

      • LOGGER

        protected static final org.apache.log4j.Logger LOGGER
    • 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 be null.
      • 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 status
        t - 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.
        use getConfiguration() 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()
      • getFailureStatistics

        public org.palladiosimulator.reliability.FailureStatistics getFailureStatistics()