Class AbstractLQNAnalysis

java.lang.Object
de.uka.ipd.sdq.dsexplore.analysis.AbstractAnalysis
de.uka.ipd.sdq.dsexplore.analysis.lqn.AbstractLQNAnalysis
All Implemented Interfaces:
IAnalysis
Direct Known Subclasses:
LQNSolverAnalysis, LQSimAnalysis

public abstract class AbstractLQNAnalysis extends AbstractAnalysis implements IAnalysis
  • Field Details

    • logger

      protected static org.apache.log4j.Logger logger
      Logger for log4j.
    • iteration

      protected int iteration
  • Constructor Details

    • AbstractLQNAnalysis

      public AbstractLQNAnalysis()
  • 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
      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
    • retrieveResultsFor

      public IAnalysisResult retrieveResultsFor(PCMPhenotype pheno, org.opt4j.core.Criterion criterion) throws AnalysisFailedException
      FIXME: Make this method independent of the blackboard state.
      Specified by:
      retrieveResultsFor in interface IAnalysis
      Parameters:
      pheno - TODO
      Returns:
      Throws:
      AnalysisFailedException
    • handleException

      protected abstract IAnalysisResult handleException(RuntimeException e, org.palladiosimulator.solver.core.models.PCMInstance pcm)
      try to handle the exception or throw it back.
      Parameters:
      e -
      pcm -
      Returns:
    • getSolverMessageString

      protected abstract String getSolverMessageString()
    • retrieveResult

      protected abstract ILQNResult retrieveResult(org.palladiosimulator.solver.core.models.PCMInstance pcm, org.palladiosimulator.solver.lqn.LqnModelType model, org.opt4j.core.Criterion criterion) throws AnalysisFailedException
      Throws:
      AnalysisFailedException
    • 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)
    • setBlackboard

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