Class SimuComAnalysis

java.lang.Object
de.uka.ipd.sdq.dsexplore.analysis.AbstractAnalysis
de.uka.ipd.sdq.dsexplore.analysis.simucom.SimuComAnalysis
All Implemented Interfaces:
IAnalysis

public class SimuComAnalysis extends AbstractAnalysis implements IAnalysis
Starts a SimuCom Analysis for the design space exploration.
  • Constructor Details

    • SimuComAnalysis

      public SimuComAnalysis()
  • Method Details

    • analyse

      public void analyse(PCMPhenotype pheno, org.eclipse.core.runtime.IProgressMonitor monitor) throws AnalysisFailedException, org.eclipse.core.runtime.CoreException, de.uka.ipd.sdq.workflow.jobs.UserCanceledException
      Calls SimuCom. Before doing so, it calls the ConfigurationHelper to update the ILaunchConfiguration and stores the PCMInstance to files, so that SimuCom can read it as usual. After the SimuCom run, the analysis results are extracted from the sensorFramework data sources and returned. The returned IAnalysisResult is a SimuComAnalysisResult which does not store the results directly, but provides access to the underlying sensorFramework data sources. Analyses the current PCM instance from the blackboard. This method can only be called after calling #initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch). The PCM instance for this PCMPhenotype has to be copied to the Blackboard into partition LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID before callings this. Otherwise, a wrong PCM model is analysed. The Analysis has to store the results for this PCMPhenotype, so that IAnalysis.retrieveResultsFor(PCMPhenotype, Criterion) can be called on it multiple times. The results should be stored in a memory-efficient way.
      Specified by:
      analyse in interface IAnalysis
      Parameters:
      pheno - TODO
      Throws:
      de.uka.ipd.sdq.workflow.jobs.UserCanceledException
      AnalysisFailedException
      org.eclipse.core.runtime.CoreException
      See Also:
      • de.uka.ipd.sdq.dsexplore.analysis.IAnalysis#analyse(PCMPhenotype, org.palladiosimulator.solver.core.models.PCMInstance)
    • initialise

      public void initialise(DSEWorkflowConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Saves the passed Run Configuration information so that we do not have to pass them as parameters all the time. For real analyses, you need to call setBlackboard before this so that the objectives can be determined from the usage model. For the AnalysisProxy it is ok to call this first, you then need to call setBlackboard before calling IAnalysis.analyse(PCMPhenotype, IProgressMonitor), #retrieveLastResultsForObjective(Objective), #getObjectives(), or IAnalysis.hasObjectivePerUsageScenario().
      Specified by:
      initialise in interface IAnalysis
      Throws:
      org.eclipse.core.runtime.CoreException
      See Also:
      • de.uka.ipd.sdq.dsexplore.analysis.IAnalysis#initialise(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
    • retrieveResultsFor

      public IStatisticAnalysisResult retrieveResultsFor(PCMPhenotype pheno, org.opt4j.core.Criterion criterion) throws org.eclipse.core.runtime.CoreException, AnalysisFailedException
      Description copied from interface: IAnalysis
      This method can only be called after calling a #analyse() for this phenotype and the current PCM models of this candidate have to be in the Blackboard partition LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID FIXME: Make this method independent of the blackboard state. Currently, the SimuComAnalysis and the LQN analyses still require the current PCM model to be on the blackboard.
      Specified by:
      retrieveResultsFor in interface IAnalysis
      Parameters:
      pheno - TODO
      Returns:
      Throws:
      org.eclipse.core.runtime.CoreException
      AnalysisFailedException
    • getQualityAttribute

      public DSEConstantsContainer.QualityAttribute getQualityAttribute() throws org.eclipse.core.runtime.CoreException
      Description copied from interface: IAnalysis
      Returns a String that represents the quality attribute that this analysis determines. This method can be called without initialization.
      Specified by:
      getQualityAttribute in interface IAnalysis
      Overrides:
      getQualityAttribute in class AbstractAnalysis
      Returns:
      Throws:
      org.eclipse.core.runtime.CoreException
    • hasStatisticResultsFor

      public boolean hasStatisticResultsFor() throws org.eclipse.core.runtime.CoreException
      Description copied from interface: IAnalysis
      Returns whether this analysis also provides statistics for the objectives. This method can be called without initialization.
      Specified by:
      hasStatisticResultsFor in interface IAnalysis
      Overrides:
      hasStatisticResultsFor in class AbstractAnalysis
      Returns:
      Throws:
      org.eclipse.core.runtime.CoreException
    • hasObjectivePerUsageScenario

      public boolean hasObjectivePerUsageScenario() throws org.eclipse.core.runtime.CoreException
      Description copied from interface: IAnalysis
      Returns whether this analysis provides one objective per usage scenario. This method can be called before calling #initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch, IProgressMonitor).
      Specified by:
      hasObjectivePerUsageScenario in interface IAnalysis
      Throws:
      org.eclipse.core.runtime.CoreException
    • setBlackboard

      public void setBlackboard(de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard blackboard)
      Specified by:
      setBlackboard in interface IAnalysis