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