Class AggregatedContextSEFFVisitor
java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
org.palladiosimulator.pcm.seff.util.SeffSwitch
org.palladiosimulator.solver.visitors.SeffVisitor
org.palladiosimulator.solver.visitors.AggregatedContextSEFFVisitor
Visitor that builds up the context model including the aggregated usage context.
Extends the
SeffVisitor
and adds the calculation of execution frequencies.
Uses the AggregatedContextExternalCallActionHandler
instead of the ExternalCallActionHandler
.-
Field Summary
Fields inherited from class org.palladiosimulator.solver.visitors.SeffVisitor
contextWrapper
Fields inherited from class org.palladiosimulator.pcm.seff.util.SeffSwitch
copyright, modelPackage
-
Constructor Summary
ConstructorDescriptionAggregatedContextSEFFVisitor
(ContextWrapper ctxWrp, double frequency, org.palladiosimulator.pcm.seff.ServiceEffectSpecification seff, org.palladiosimulator.pcm.usagemodel.UsageScenario currentScenario) -
Method Summary
Modifier and TypeMethodDescriptioncaseExternalCallAction
(org.palladiosimulator.pcm.seff.ExternalCallAction call) Overwrites theSeffVisitor.caseExternalCallAction(ExternalCallAction)
.caseInternalAction
(org.palladiosimulator.pcm.seff.InternalAction action) caseResourceDemandingBehaviour
(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour) Gets the frequency to execute thisResourceDemandingBehaviour
by checking the container.caseResourceDemandingSEFF
(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF seff) ExtendsSeffVisitor.caseResourceDemandingSEFF(ResourceDemandingSEFF)
: stores the described SEFF in theComputedAggregatedUsage
.double
Get the current frequency of this object.Methods inherited from class org.palladiosimulator.solver.visitors.SeffVisitor
caseAbstractInternalControlFlowAction, caseAcquireAction, caseBranchAction, caseCollectionIteratorAction, caseForkAction, caseGuardedBranchTransition, caseLoopAction, caseProbabilisticBranchTransition, caseReleaseAction, caseSetVariableAction, caseStartAction, caseStopAction, getContextWrapper, setContextWrapper
Methods inherited from class org.palladiosimulator.pcm.seff.util.SeffSwitch
caseAbstractAction, caseAbstractBranchTransition, caseAbstractLoopAction, caseCallAction, caseCallReturnAction, caseEmitEventAction, caseEntity, caseFailureHandlingEntity, caseForkedBehaviour, caseIdentifier, caseInternalCallAction, caseNamedElement, casePCMBaseClass, casePCMClass, caseResourceDemandingInternalBehaviour, caseServiceEffectSpecification, caseSynchronisationPoint, defaultCase, doSwitch, isSwitchFor
-
Constructor Details
-
AggregatedContextSEFFVisitor
public AggregatedContextSEFFVisitor(ContextWrapper ctxWrp, double frequency, org.palladiosimulator.pcm.seff.ServiceEffectSpecification seff, org.palladiosimulator.pcm.usagemodel.UsageScenario currentScenario)
-
-
Method Details
-
caseResourceDemandingSEFF
ExtendsSeffVisitor.caseResourceDemandingSEFF(ResourceDemandingSEFF)
: stores the described SEFF in theComputedAggregatedUsage
. Then callsSeffVisitor.caseResourceDemandingSEFF(ResourceDemandingSEFF)
. Handles resource demanding seffs. Goes to the first action within the seff..- Overrides:
caseResourceDemandingSEFF
in classSeffVisitor
- Parameters:
seff
- the resource demanding seff- Returns:
- the resource demanding seff
-
caseExternalCallAction
Overwrites theSeffVisitor.caseExternalCallAction(ExternalCallAction)
. Does the same, but uses anAggregatedContextExternalCallActionHandler
to handle the call, which in turn will instantiate anAggregatedContextSEFFVisitor
for the next SEFF.- Overrides:
caseExternalCallAction
in classSeffVisitor
- Parameters:
call
- the external call action- Returns:
- the external call action
-
caseInternalAction
ExtendsSeffVisitor.caseInternalAction(InternalAction)
. Adds the calculation of a mean resource demand weighted by frequency of execution. Adds this information to theAggregatedResourceDemand
. Then callsSeffVisitor.caseInternalAction(InternalAction)
. Handles internal actions. Invokes the internalActionHandler, then goes to the next action.- Overrides:
caseInternalAction
in classSeffVisitor
- Parameters:
action
- the internal action- Returns:
- the internal action
-
caseResourceDemandingBehaviour
public Object caseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour) Gets the frequency to execute thisResourceDemandingBehaviour
by checking the container. If it is aBranchTransition
orAbstractLoopAction
, update the frequency before callingSeffVisitor.caseExternalCallAction(ExternalCallAction)
. Then resets the frequency for the next action or trasition. Then callsSeffVisitor.caseResourceDemandingBehaviour(ResourceDemandingBehaviour)
. Handles resource demanding behaviours. Goes to the first action within the behaviour..- Overrides:
caseResourceDemandingBehaviour
in classSeffVisitor
- Parameters:
behaviour
- the resource demanding behaviour- Returns:
- the resource demanding behaviour
-
getCurrentFrequency
public double getCurrentFrequency()Get the current frequency of this object. This is not equal to the frequency of thisServiceEffectSpecification
, because the current frequency reflects the frequency of the currently handledAbstractAction
.
-