Class MarkovSensitivity
- java.lang.Object
-
- org.palladiosimulator.solver.reliability.sensitivity.MarkovSensitivity
-
- Direct Known Subclasses:
ComponentSensitivity
,FailureTypeSensitivity
,InternalActionSensitivity
,MTTFSensitivity
,MTTRSensitivity
,MultiSensitivity
,NetworkSensitivity
,ProbabilisticBranchSensitivity
,ResourceMTTFSensitivity
,ResourceMTTRSensitivity
,SoftwareSensitivity
,UsageBranchSensitivity
,VariableUsageSensitivity
public abstract class MarkovSensitivity extends Object
Base class for (rudimentary) sensitivity analysis. Further refactorings required.
-
-
Field Summary
Fields Modifier and Type Field Description protected SensitivityCalculator
calculator
A calculator for variations and steps during the sensitivity analysis.protected org.palladiosimulator.reliability.helper.EMFHelper
helper
Provides EMF utility functions.protected static org.apache.log4j.Logger
LOGGER
A logger to give detailed information about the PCM instance transformation.protected BufferedWriter
logWriter
Provides a writer to the log file.protected PCMInstance
model
The model on which sensitivity analysis is based.protected String
name
The name of this sensitivity (for logging).protected int
numberOfSteps
The number of steps to take during sensitivity analysis.
-
Constructor Summary
Constructors Modifier Constructor Description protected
MarkovSensitivity(String name, org.palladiosimulator.reliability.sensitivity.SensitivityParameterVariation variation)
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
alterModel()
Alters the model according to the next sensitivity analysis step.protected abstract void
extractSensitivityInformation()
Extracts the relevant sensitivity information from the given model.void
finalize()
Finalizes the sensitivity analysis.protected int
getCurrentStepNumber()
Retrieves the current step number.protected org.palladiosimulator.reliability.sensitivity.DoubleParameterVariation
getDoubleVariation()
Returns the double parameter variation.protected abstract List<List<String>>
getLogHeadingsMulti()
Builds the headings strings for logging.protected List<String>
getLogSingleResults(List<MarkovTransformationResult> markovResults)
Builds the results strings for sensitivity logging.protected abstract List<String>
getLogSingleResultsMulti()
Builds the results string for sensitivity logging.protected PCMInstance
getModel()
Retrieves the PCM instance.PCMInstance
getNextModel()
Retrieves the model to be used for the next step in the sensitivity analysis.protected org.palladiosimulator.reliability.sensitivity.StringParameterSequence
getStringSequence()
Returns the string parameter sequence.protected boolean
increaseCurrentStepNumber()
Increases the current step number.void
initialize(PCMInstance model)
Initializes the sensitivity analysis.void
logResults(List<MarkovTransformationResult> markovResults)
Logs the results of the current sensitivity analysis step.protected void
resetCurrentStepNumber()
Resets the current step number.void
setLogFileName(String logFileName)
Sets the result log file name.protected void
setModel(PCMInstance model)
Sets the PCM instance.void
setResultSpecifications(EList<org.palladiosimulator.reliability.sensitivity.SensitivityResultSpecification> resultSpecifications)
Specifies the relevant Markov analysis results.
-
-
-
Field Detail
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER
A logger to give detailed information about the PCM instance transformation.
-
calculator
protected SensitivityCalculator calculator
A calculator for variations and steps during the sensitivity analysis.
-
helper
protected org.palladiosimulator.reliability.helper.EMFHelper helper
Provides EMF utility functions.
-
logWriter
protected BufferedWriter logWriter
Provides a writer to the log file.
-
model
protected PCMInstance model
The model on which sensitivity analysis is based.
-
name
protected String name
The name of this sensitivity (for logging).
-
numberOfSteps
protected int numberOfSteps
The number of steps to take during sensitivity analysis.
-
-
Constructor Detail
-
MarkovSensitivity
protected MarkovSensitivity(String name, org.palladiosimulator.reliability.sensitivity.SensitivityParameterVariation variation)
The constructor. Only to be invoked by concrete sub classes.- Parameters:
name
- the name of the sensitivity analysisvariation
- the parameter variation
-
-
Method Detail
-
alterModel
protected abstract boolean alterModel()
Alters the model according to the next sensitivity analysis step.- Returns:
- indicates if the model could be successfully altered
-
extractSensitivityInformation
protected abstract void extractSensitivityInformation()
Extracts the relevant sensitivity information from the given model.
-
finalize
public void finalize()
Finalizes the sensitivity analysis.
-
getCurrentStepNumber
protected int getCurrentStepNumber()
Retrieves the current step number.- Returns:
- the current step number
-
getDoubleVariation
protected org.palladiosimulator.reliability.sensitivity.DoubleParameterVariation getDoubleVariation()
Returns the double parameter variation.- Returns:
- the double parameter variation
-
getLogHeadingsMulti
protected abstract List<List<String>> getLogHeadingsMulti()
Builds the headings strings for logging.- Returns:
- the log headings strings
-
getLogSingleResults
protected List<String> getLogSingleResults(List<MarkovTransformationResult> markovResults)
Builds the results strings for sensitivity logging.- Parameters:
markovResults
- the Markov transformation results- Returns:
- the results strings
-
getLogSingleResultsMulti
protected abstract List<String> getLogSingleResultsMulti()
Builds the results string for sensitivity logging.- Returns:
- the results strings
-
getModel
protected PCMInstance getModel()
Retrieves the PCM instance.- Returns:
- the PCM instance
-
getNextModel
public PCMInstance getNextModel()
Retrieves the model to be used for the next step in the sensitivity analysis.- Returns:
- the model
-
getStringSequence
protected org.palladiosimulator.reliability.sensitivity.StringParameterSequence getStringSequence()
Returns the string parameter sequence.- Returns:
- the string parameter sequence
-
increaseCurrentStepNumber
protected boolean increaseCurrentStepNumber()
Increases the current step number.- Returns:
- indicates an overflow
-
initialize
public void initialize(PCMInstance model)
Initializes the sensitivity analysis.- Parameters:
model
- the PCM instance
-
logResults
public void logResults(List<MarkovTransformationResult> markovResults)
Logs the results of the current sensitivity analysis step.- Parameters:
markovResults
- the markov transformation results
-
resetCurrentStepNumber
protected void resetCurrentStepNumber()
Resets the current step number.
-
setLogFileName
public void setLogFileName(String logFileName)
Sets the result log file name.- Parameters:
logFileName
- the log file name
-
setModel
protected void setModel(PCMInstance model)
Sets the PCM instance.- Parameters:
model
- the PCM instance
-
setResultSpecifications
public void setResultSpecifications(EList<org.palladiosimulator.reliability.sensitivity.SensitivityResultSpecification> resultSpecifications)
Specifies the relevant Markov analysis results.- Parameters:
resultSpecifications
- specification of results
-
-