Class TransitionDeterminer

java.lang.Object
org.palladiosimulator.simulizar.utils.TransitionDeterminer

public class TransitionDeterminer extends Object
Util class to determine a transition based on probabilities.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.log4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<Double>
    createSummedProbabilityList(List<Double> branchProbabilities)
    Sums the probabilities of the list of probabilities.
    org.palladiosimulator.pcm.usagemodel.BranchTransition
    determineBranchTransition(EList<org.palladiosimulator.pcm.usagemodel.BranchTransition> branchTransitions)
    Determines a branch transition out of a list of branch transitions, with respect to their probabilities.
    org.palladiosimulator.pcm.seff.ProbabilisticBranchTransition
    determineProbabilisticBranchTransition(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> probabilisticBranchTransitions)
    Determines a probabilistic branch transition out of a list of probabilistic branch transitions, with respect to their probabilities.
    org.palladiosimulator.pcm.seff.AbstractBranchTransition
    determineTransition(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> abstractBranchTransitions)
    Determines a branch transition in the list of branch transitions.
    protected List<Double>
    extractProbabiltiesRDSEFF(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> probabilisticBranchTransitions)
    Extracts the probabilities of a list of ProbabilisticBranchTransition.
    protected List<Double>
    extractProbabiltiesUsageModel(EList<org.palladiosimulator.pcm.usagemodel.BranchTransition> branchTransitions)
    Extracts the probabilities of a list of BranchTransition.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      protected static final org.apache.log4j.Logger LOGGER
  • Constructor Details

    • TransitionDeterminer

      public TransitionDeterminer(InterpreterDefaultContext context)
      Constructor.
      Parameters:
      config - the SimuCom config for the random generator.
      modelInterpreter - the calling model interpreter.
  • Method Details

    • createSummedProbabilityList

      protected List<Double> createSummedProbabilityList(List<Double> branchProbabilities)
      Sums the probabilities of the list of probabilities. In a list of summed probabilities, each value of an element in the list has its own probability added by the previous probability. Means, if the the first probabilities in the list of probabilities is 0.3, the value of the first element in the summed probability list is 0.3. If the second probabilities in the list of probabilities is 0.4, the corresponding value in the summed probability list is 0.4+0.3 and so on.
      Parameters:
      branchProbabilities - a list with branch probabilities.
      Returns:
      the summed probability list.
    • determineBranchTransition

      public org.palladiosimulator.pcm.usagemodel.BranchTransition determineBranchTransition(EList<org.palladiosimulator.pcm.usagemodel.BranchTransition> branchTransitions)
      Determines a branch transition out of a list of branch transitions, with respect to their probabilities.
      Parameters:
      branchTransitions - the list of branch transition.
      Returns:
      a branch transition.
    • determineProbabilisticBranchTransition

      public org.palladiosimulator.pcm.seff.ProbabilisticBranchTransition determineProbabilisticBranchTransition(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> probabilisticBranchTransitions)
      Determines a probabilistic branch transition out of a list of probabilistic branch transitions, with respect to their probabilities.
      Parameters:
      probabilisticBranchTransitions - the list of probabilistic branch transition.
      Returns:
      a probabilistic branch transition.
    • determineTransition

      public org.palladiosimulator.pcm.seff.AbstractBranchTransition determineTransition(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> abstractBranchTransitions)
      Determines a branch transition in the list of branch transitions. The list can only contains either probabilistic or guarded branch transitions.
      Parameters:
      abstractBranchTransitions - the list with branch transitions.
      Returns:
      the determined AbstractBranchTransition.
    • extractProbabiltiesRDSEFF

      protected List<Double> extractProbabiltiesRDSEFF(EList<org.palladiosimulator.pcm.seff.AbstractBranchTransition> probabilisticBranchTransitions)
      Extracts the probabilities of a list of ProbabilisticBranchTransition.
      Parameters:
      probabilisticBranchTransitions - the list of ProbabilisticBranchTransition.
      Returns:
      a list only containing the probabilities.
    • extractProbabiltiesUsageModel

      protected List<Double> extractProbabiltiesUsageModel(EList<org.palladiosimulator.pcm.usagemodel.BranchTransition> branchTransitions)
      Extracts the probabilities of a list of BranchTransition.
      Parameters:
      branchTransitions - the list of BranchTransition.
      Returns:
      a list only containing the probabilities.