Class BranchActionCreator


  • public class BranchActionCreator
    extends GeneralAction
    This class constructs a BranchAction. It is used to create the 'BranchAction' object step-by-step, i.e. 'BranchActionCreator' objects are of intermediate state.
    See Also:
    BranchAction
    • Constructor Detail

      • BranchActionCreator

        protected BranchActionCreator​(SeffCreator seff)
    • Method Detail

      • withName

        public BranchActionCreator withName​(String name)
        Description copied from class: Entity
        Defines the unique name of this current entity. Once created entities are referenced by this name. Only entities with a unique name can be fetched from the model.
        Overrides:
        withName in class Entity
        Returns:
        this current entity in the making
      • withGuardedBranchTransition

        public BranchActionCreator withGuardedBranchTransition​(String branchConditionStochasticExpression,
                                                               Seff branchActions,
                                                               String name)
        Adds a guarded branch transition to this action's list of branches.

        A Guarded Branch Transition provides a link between a BranchAction and a nested ResourceDemandingBehaviour, which includes the actions executed inside the branch. It uses a guard, i.e. a boolean expression specified by a RandomVariable, to determine whether the transition is chosen. If the guard evaluates to true, the branch is chosen, otherwise if the guard evaluates to false another branch transition must be chosen.

        Parameters:
        branchConditionStochasticExpression - boolean expression, condition of the branch
        branchActions - nested resource demanding behaviour
        name - of the branch
        Returns:
        this branch action in the making
      • withGuardedBranchTransition

        public BranchActionCreator withGuardedBranchTransition​(String branchConditionStochasticExpression,
                                                               SeffCreator branchActions)
        Adds a guarded branch transition to this action's list of branches.

        A Guarded Branch Transition provides a link between a BranchAction and a nested ResourceDemandingBehaviour, which includes the actions executed inside the branch. It uses a guard, i.e. a boolean expression specified by a RandomVariable, to determine whether the transition is chosen. If the guard evaluates to true, the branch is chosen, otherwise if the guard evaluates to false another branch transition must be chosen.

        Parameters:
        branchConditionStochasticExpression - boolean expression, condition of the branch
        branchActions - nested resource demanding behaviour
        Returns:
        this branch action in the making
      • withProbabilisticBranchTransition

        public BranchActionCreator withProbabilisticBranchTransition​(double branchProbability,
                                                                     SeffCreator branchActions,
                                                                     String name)
        Adds a probabilistic branch transition to this action's list of branches.

        A Probabilistic Branch Transition provides a link between a BranchAction and a nested ResourceDemandingBehaviour, which includes the actions executed inside the branch. But instead of using a guard, it specifies a branching probability without parameter dependencies.

        Parameters:
        branchProbability -
        branchActions - nested resource demanding behaviour
        name -
        Returns:
        this branch action in the making
      • withProbabilisticBranchTransition

        public BranchActionCreator withProbabilisticBranchTransition​(Double branchProbability,
                                                                     SeffCreator branchActions)
        Adds a probabilistic branch transition to this action's list of branches.

        A Probabilistic Branch Transition provides a link between a BranchAction and a nested ResourceDemandingBehaviour, which includes the actions executed inside the branch. But instead of using a guard, it specifies a branching probability without parameter dependencies.

        Parameters:
        branchProbability -
        branchActions - nested resource demanding behaviour
        Returns:
        this branch action in the making
      • withResourceDemand

        public BranchActionCreator withResourceDemand​(String specificationStochasticExpression,
                                                      ProcessingResource processingResource)
        Description copied from class: GeneralAction
        Adds a ParametricResourceDemand to this action.

        Parametric Resource Demand specifies the amount of processing requested from a certain type of resource in a parameterized way. It assigns the demand specified as a Random-Variable (specification_stochasticExpression) to an abstract ProcessingResourceType processingResource(e.g., CPU, hard disk) instead of a concrete ProcessingResourceSpecification (e.g., 5 GHz CPU, 20 MByte/s hard disk).

        Overrides:
        withResourceDemand in class GeneralAction
        Returns:
        this action in the making
      • withInfrastructureCall

        public BranchActionCreator withInfrastructureCall​(String numberOfCallsStochasticExpression,
                                                          org.palladiosimulator.pcm.repository.InfrastructureSignature signature,
                                                          org.palladiosimulator.pcm.repository.InfrastructureRequiredRole requiredRole,
                                                          VariableUsageCreator... variableUsages)
        Description copied from class: GeneralAction
        Adds an InfrastructureCall to this action.
        Overrides:
        withInfrastructureCall in class GeneralAction
        Returns:
        this action in the making
      • build

        protected org.palladiosimulator.pcm.seff.BranchAction build()
        Description copied from class: Entity
        Turns the entity in the making into the finished entity.
        Specified by:
        build in class SeffAction
        Returns:
        the finished entity