diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/launches/FT_LB_modelled.launch b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/launches/FT_LB_modelled.launch
index 4ac09b3e9..4e6fda74c 100644
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/launches/FT_LB_modelled.launch
+++ b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/launches/FT_LB_modelled.launch
@@ -7,6 +7,7 @@
+
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityFailSave.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/nodeRecovery.qvto
similarity index 53%
rename from examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityFailSave.qvto
rename to examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/nodeRecovery.qvto
index eb4ef49d3..f94fdcd0a 100644
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityFailSave.qvto
+++ b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/nodeRecovery.qvto
@@ -31,7 +31,10 @@ modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
* transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
* type and namespace notation are used in operational QVT (: and :: respectively).
*/
-transformation unsetBranchProbabilityFailSave( in pcmAllocation : PCM_ALLOC ) {
+transformation nodeRecovery( in pcmAllocation : PCM_ALLOC ) {
+
+ configuration property node1 : String; // node1 availability
+ configuration property node2 : String; // node2 availability
/**
@@ -39,20 +42,57 @@ transformation unsetBranchProbabilityFailSave( in pcmAllocation : PCM_ALLOC ) {
* This is the entry point to the overall transformation.
*/
main() {
+
+ log('Transformation rule [nodeRecovery] ...');
+ if ((node1 != "available") or (node2 != "available")) {
+ log('Start node recovery ...');
+ if ((node1.toString() = 'available') and (node2.toString() != 'available')){
+ log("node1 : '" + node1.toString() + "', node2: '" + node2.toString() + "'");
+ var probBranch1 : Real = 1.0;
+ var probBranch2 : Real = 0.0;
+ pcmAllocation.rootObjects()[Allocation]->forAll(
+ allocation : Allocation |
+ setBranchProbabilities(allocation.allocationContexts_Allocation, probBranch1, probBranch2)
+ );
+ };
+ if ((node1 = "available") and (node2 = "available")){
+ log("node1 : '" + node1.toString() + "', node2: '" + node2.toString() + "'");
+ var probBranch1 : Real = 1.0;
+ var probBranch2 : Real = 0.0;
+ pcmAllocation.rootObjects()[Allocation]->forAll(
+ allocation : Allocation |
+ setBranchProbabilities(allocation.allocationContexts_Allocation, probBranch1, probBranch2)
+ );
+ };
+ if ((node1 != "available") and (node2 = "available")){
+ log("node1 : '" + node1.toString() + "', node2: '" + node2.toString() + "'");
+ var probBranch1 : Real = 0.0;
+ var probBranch2 : Real = 1.0;
+ pcmAllocation.rootObjects()[Allocation]->forAll(
+ allocation : Allocation |
+ setBranchProbabilities(allocation.allocationContexts_Allocation, probBranch1, probBranch2)
+ );
+ };
+ if ((node1 != "available") and (node2 != "available")){
+ log("node1 : '" + node1.toString() + "', node2: '" + node2.toString() + "'");
+ var probBranch1 : Real = 0.0;
+ var probBranch2 : Real = 0.0;
+ pcmAllocation.rootObjects()[Allocation]->forAll(
+ allocation : Allocation |
+ setBranchProbabilities(allocation.allocationContexts_Allocation, probBranch1, probBranch2)
+ );
+ };
+ log('Node recovery DONE.');
+ };
- log('*** STARTED: Transformation rule [unsetBranchProbabilityFailSave] ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- setBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('*** DONE: Transformation rule [unsetBranchProbabilityFailSave]');
+ log('Transformation rule [unsetBranchProbabilityNode1] DONE.');
}
/**
* branchProbabilityProcessing Processing.
*/
- helper setBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
+ helper setBranchProbabilities(allocationContexts : Set(AllocationContext), in probBranch1 : Real, in probBranch2: Real) : Boolean {
allocationContexts->forEach(allocation){
@@ -60,6 +100,12 @@ transformation unsetBranchProbabilityFailSave( in pcmAllocation : PCM_ALLOC ) {
//log('Found load balancer: AC_LoadBalancer');
allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
+ var branch1 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_ridTkAEoEeS7FKokKTKFow"); // entityName="delegateToServer1"
+ branch1.branchProbability := probBranch1;
+ log('Set branch1.branchProbability to ' + branch1.branchProbability.toString());
+ var branch2 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_tjFukAEoEeS7FKokKTKFow"); // entityName="delegateToServer2"
+ branch2.branchProbability := probBranch2;
+ log('Set branch2.branchProbability to ' + branch2.branchProbability.toString());
var branchFailSave : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_fm8UkQFdEe-xm__qsFXqOw"); // entityName="failSavee"
branchFailSave.branchProbability := 0.0;
log('Set branchFailSave.branchProbability to ' + branchFailSave.branchProbability.toString());
@@ -70,6 +116,6 @@ transformation unsetBranchProbabilityFailSave( in pcmAllocation : PCM_ALLOC ) {
};
return false;
- }
+ }
}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityFailSave.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityFailSave.qvto
deleted file mode 100644
index 38d191a71..000000000
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityFailSave.qvto
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This simple QVTO SimuLizar reconfiguration rule increases the processing rate of all
- * resources in case the monitored mean response time is greater than 3.0 (seconds).
- *
- */
-
-/*
- * Two modeltypes are declared. The http NS URIs correspond to those used to register the
- * Ecore models in the environment. Alternatively, a workspace metamodel may be used
- * in conjunction with mappings defined in the project properties.
- */
-modeltype PRM uses 'http://simulizar.palladiosimulator.org/RuntimeMeasurement/1.0';
-modeltype PCM_ALLOC uses 'http://palladiosimulator.org/PalladioComponentModel/Allocation/5.2';
-modeltype PCM_REP uses 'http://palladiosimulator.org/PalladioComponentModel/Repository/5.2';
-modeltype PCM_SEFF uses 'http://palladiosimulator.org/PalladioComponentModel/SEFF/5.2';
-modeltype PCM_SYS uses 'http://palladiosimulator.org/PalladioComponentModel/System/5.2';
-modeltype PCM_RES_ENV uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceEnvironment/5.2';
-modeltype PCM_RES_TYPE uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceType/5.2';
-modeltype PCM_USAGE uses 'http://palladiosimulator.org/PalladioComponentModel/UsageModel/5.2';
-modeltype PCM_FEATURE_CONF uses 'http://sdq.ipd.uka.de/FeatureConfig/2.0';
-modeltype PCM_FEATURE_MOD uses 'http://sdq.ipd.uka.de/FeatureModel/2.0';
-modeltype PCM_CORE uses 'http://palladiosimulator.org/PalladioComponentModel/Core/5.2';
-modeltype PCM_COMP uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Composition/5.2';
-modeltype PCM_ENTITY uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Entity/5.2';
-modeltype PCM_PARAM uses 'http://palladiosimulator.org/PalladioComponentModel/Parameter/5.2';
-modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
-
-/*
- * The transformation signature declares that a PRM modeltype is required as input, while an PCM
- * modeltype is transformed inplace. The PRM modeltype is referenced as 'prm' throughout the
- * transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
- * type and namespace notation are used in operational QVT (: and :: respectively).
- */
-transformation setBranchProbabilityFailSave( in pcmAllocation : PCM_ALLOC ) {
-
-
- /**
- * The main transformation.
- * This is the entry point to the overall transformation.
- */
- main() {
-
- log('*** STARTED: Transformation rule [setBranchProbabilityFailSave] ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- setBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('*** DONE: Transformation rule [setBranchProbabilityFailSave]');
- }
-
-
- /**
- * branchProbabilityProcessing Processing.
- */
- helper setBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
-
- allocationContexts->forEach(allocation){
-
- if( allocation.assemblyContext_AllocationContext.id = "_6F6LYAEnEeS7FKokKTKFow" ) {
- //log('Found load balancer: AC_LoadBalancer');
- allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
- if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
- var branchFailSave : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_fm8UkQFdEe-xm__qsFXqOw"); // entityName="failSavee"
- branchFailSave.branchProbability := 1.0;
- log('Set branchFailSave.branchProbability to ' + branchFailSave.branchProbability.toString());
- return true;
- }
- }
- }
- };
-
- return false;
- }
-
-}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode1.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode1.qvto
deleted file mode 100644
index 2f24a52a2..000000000
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode1.qvto
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This simple QVTO SimuLizar reconfiguration rule increases the processing rate of all
- * resources in case the monitored mean response time is greater than 3.0 (seconds).
- *
- */
-
-/*
- * Two modeltypes are declared. The http NS URIs correspond to those used to register the
- * Ecore models in the environment. Alternatively, a workspace metamodel may be used
- * in conjunction with mappings defined in the project properties.
- */
-modeltype PRM uses 'http://simulizar.palladiosimulator.org/RuntimeMeasurement/1.0';
-modeltype PCM_ALLOC uses 'http://palladiosimulator.org/PalladioComponentModel/Allocation/5.2';
-modeltype PCM_REP uses 'http://palladiosimulator.org/PalladioComponentModel/Repository/5.2';
-modeltype PCM_SEFF uses 'http://palladiosimulator.org/PalladioComponentModel/SEFF/5.2';
-modeltype PCM_SYS uses 'http://palladiosimulator.org/PalladioComponentModel/System/5.2';
-modeltype PCM_RES_ENV uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceEnvironment/5.2';
-modeltype PCM_RES_TYPE uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceType/5.2';
-modeltype PCM_USAGE uses 'http://palladiosimulator.org/PalladioComponentModel/UsageModel/5.2';
-modeltype PCM_FEATURE_CONF uses 'http://sdq.ipd.uka.de/FeatureConfig/2.0';
-modeltype PCM_FEATURE_MOD uses 'http://sdq.ipd.uka.de/FeatureModel/2.0';
-modeltype PCM_CORE uses 'http://palladiosimulator.org/PalladioComponentModel/Core/5.2';
-modeltype PCM_COMP uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Composition/5.2';
-modeltype PCM_ENTITY uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Entity/5.2';
-modeltype PCM_PARAM uses 'http://palladiosimulator.org/PalladioComponentModel/Parameter/5.2';
-modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
-
-/*
- * The transformation signature declares that a PRM modeltype is required as input, while an PCM
- * modeltype is transformed inplace. The PRM modeltype is referenced as 'prm' throughout the
- * transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
- * type and namespace notation are used in operational QVT (: and :: respectively).
- */
-transformation setBranchProbabilityNode1( in pcmAllocation : PCM_ALLOC ) {
-
-
- /**
- * The main transformation.
- * This is the entry point to the overall transformation.
- */
- main() {
-
- log('*** STARTED: Transformation rule [setBranchProbabilityNode1] ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- setBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('*** DONE: Transformation rule [setBranchProbabilityNode1]');
- }
-
-
- /**
- * branchProbabilityProcessing Processing.
- */
- helper setBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
-
- allocationContexts->forEach(allocation){
-
- if( allocation.assemblyContext_AllocationContext.id = "_6F6LYAEnEeS7FKokKTKFow" ) {
- //log('Found load balancer: AC_LoadBalancer');
- allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
- if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
- var branch1 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_ridTkAEoEeS7FKokKTKFow"); // entityName="delegateToServer1"
- branch1.branchProbability := 1.0;
- log('Set branch1.branchProbability to ' + branch1.branchProbability.toString());
- return true;
- }
- }
- }
- };
-
- return false;
- }
-
-}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode2.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode2.qvto
deleted file mode 100644
index f475c78be..000000000
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/setBranchProbabilityNode2.qvto
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This simple QVTO SimuLizar reconfiguration rule increases the processing rate of all
- * resources in case the monitored mean response time is greater than 3.0 (seconds).
- *
- */
-
-/*
- * Two modeltypes are declared. The http NS URIs correspond to those used to register the
- * Ecore models in the environment. Alternatively, a workspace metamodel may be used
- * in conjunction with mappings defined in the project properties.
- */
-modeltype PRM uses 'http://simulizar.palladiosimulator.org/RuntimeMeasurement/1.0';
-modeltype PCM_ALLOC uses 'http://palladiosimulator.org/PalladioComponentModel/Allocation/5.2';
-modeltype PCM_REP uses 'http://palladiosimulator.org/PalladioComponentModel/Repository/5.2';
-modeltype PCM_SEFF uses 'http://palladiosimulator.org/PalladioComponentModel/SEFF/5.2';
-modeltype PCM_SYS uses 'http://palladiosimulator.org/PalladioComponentModel/System/5.2';
-modeltype PCM_RES_ENV uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceEnvironment/5.2';
-modeltype PCM_RES_TYPE uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceType/5.2';
-modeltype PCM_USAGE uses 'http://palladiosimulator.org/PalladioComponentModel/UsageModel/5.2';
-modeltype PCM_FEATURE_CONF uses 'http://sdq.ipd.uka.de/FeatureConfig/2.0';
-modeltype PCM_FEATURE_MOD uses 'http://sdq.ipd.uka.de/FeatureModel/2.0';
-modeltype PCM_CORE uses 'http://palladiosimulator.org/PalladioComponentModel/Core/5.2';
-modeltype PCM_COMP uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Composition/5.2';
-modeltype PCM_ENTITY uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Entity/5.2';
-modeltype PCM_PARAM uses 'http://palladiosimulator.org/PalladioComponentModel/Parameter/5.2';
-modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
-
-/*
- * The transformation signature declares that a PRM modeltype is required as input, while an PCM
- * modeltype is transformed inplace. The PRM modeltype is referenced as 'prm' throughout the
- * transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
- * type and namespace notation are used in operational QVT (: and :: respectively).
- */
-transformation setBranchProbabilityNode2( in pcmAllocation : PCM_ALLOC ) {
-
-
- /**
- * The main transformation.
- * This is the entry point to the overall transformation.
- */
- main() {
-
- log('*** STARTED: Transformation rule [setBranchProbabilityNode2] ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- setBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('*** DONE: Transformation rule [setBranchProbabilityNode2]');
- }
-
-
- /**
- * branchProbabilityProcessing Processing.
- */
- helper setBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
-
- allocationContexts->forEach(allocation){
-
- if( allocation.assemblyContext_AllocationContext.id = "_6F6LYAEnEeS7FKokKTKFow" ) {
- //log('Found load balancer: AC_LoadBalancer');
- allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
- if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
- var branch2 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_tjFukAEoEeS7FKokKTKFow"); // entityName="delegateToServer2"
- branch2.branchProbability := 1.0;
- log('Set branch2.branchProbability to ' + branch2.branchProbability.toString());
- return true;
- }
- }
- }
- };
-
- return false;
- }
-
-}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode1.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode1.qvto
deleted file mode 100644
index e269b44a8..000000000
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode1.qvto
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This simple QVTO SimuLizar reconfiguration rule increases the processing rate of all
- * resources in case the monitored mean response time is greater than 3.0 (seconds).
- *
- */
-
-/*
- * Two modeltypes are declared. The http NS URIs correspond to those used to register the
- * Ecore models in the environment. Alternatively, a workspace metamodel may be used
- * in conjunction with mappings defined in the project properties.
- */
-modeltype PRM uses 'http://simulizar.palladiosimulator.org/RuntimeMeasurement/1.0';
-modeltype PCM_ALLOC uses 'http://palladiosimulator.org/PalladioComponentModel/Allocation/5.2';
-modeltype PCM_REP uses 'http://palladiosimulator.org/PalladioComponentModel/Repository/5.2';
-modeltype PCM_SEFF uses 'http://palladiosimulator.org/PalladioComponentModel/SEFF/5.2';
-modeltype PCM_SYS uses 'http://palladiosimulator.org/PalladioComponentModel/System/5.2';
-modeltype PCM_RES_ENV uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceEnvironment/5.2';
-modeltype PCM_RES_TYPE uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceType/5.2';
-modeltype PCM_USAGE uses 'http://palladiosimulator.org/PalladioComponentModel/UsageModel/5.2';
-modeltype PCM_FEATURE_CONF uses 'http://sdq.ipd.uka.de/FeatureConfig/2.0';
-modeltype PCM_FEATURE_MOD uses 'http://sdq.ipd.uka.de/FeatureModel/2.0';
-modeltype PCM_CORE uses 'http://palladiosimulator.org/PalladioComponentModel/Core/5.2';
-modeltype PCM_COMP uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Composition/5.2';
-modeltype PCM_ENTITY uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Entity/5.2';
-modeltype PCM_PARAM uses 'http://palladiosimulator.org/PalladioComponentModel/Parameter/5.2';
-modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
-
-/*
- * The transformation signature declares that a PRM modeltype is required as input, while an PCM
- * modeltype is transformed inplace. The PRM modeltype is referenced as 'prm' throughout the
- * transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
- * type and namespace notation are used in operational QVT (: and :: respectively).
- */
-transformation unsetBranchProbabilityNode1( in pcmAllocation : PCM_ALLOC ) {
-
-
- /**
- * The main transformation.
- * This is the entry point to the overall transformation.
- */
- main() {
-
- log('Transformation rule [unsetBranchProbabilityNode1] started ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- unsetBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('Transformation rule [unsetBranchProbabilityNode1] DONE.');
- }
-
-
- /**
- * branchProbabilityProcessing Processing.
- */
- helper unsetBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
-
- allocationContexts->forEach(allocation){
-
- if( allocation.assemblyContext_AllocationContext.id = "_6F6LYAEnEeS7FKokKTKFow" ) {
- //log('Found load balancer: AC_LoadBalancer');
- allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
- if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
- var branch1 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_ridTkAEoEeS7FKokKTKFow"); // entityName="delegateToServer1"
- branch1.branchProbability := 0.0;
- log('Set branch1.branchProbability to ' + branch1.branchProbability.toString());
- return true;
- }
- }
- }
- };
-
- return false;
- }
-
-}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode2.qvto b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode2.qvto
deleted file mode 100644
index 81d2ec5e7..000000000
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/reconfiguration-rules/reconfigurations_active/unsetBranchProbabilityNode2.qvto
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This simple QVTO SimuLizar reconfiguration rule increases the processing rate of all
- * resources in case the monitored mean response time is greater than 3.0 (seconds).
- *
- */
-
-/*
- * Two modeltypes are declared. The http NS URIs correspond to those used to register the
- * Ecore models in the environment. Alternatively, a workspace metamodel may be used
- * in conjunction with mappings defined in the project properties.
- */
-modeltype PRM uses 'http://simulizar.palladiosimulator.org/RuntimeMeasurement/1.0';
-modeltype PCM_ALLOC uses 'http://palladiosimulator.org/PalladioComponentModel/Allocation/5.2';
-modeltype PCM_REP uses 'http://palladiosimulator.org/PalladioComponentModel/Repository/5.2';
-modeltype PCM_SEFF uses 'http://palladiosimulator.org/PalladioComponentModel/SEFF/5.2';
-modeltype PCM_SYS uses 'http://palladiosimulator.org/PalladioComponentModel/System/5.2';
-modeltype PCM_RES_ENV uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceEnvironment/5.2';
-modeltype PCM_RES_TYPE uses 'http://palladiosimulator.org/PalladioComponentModel/ResourceType/5.2';
-modeltype PCM_USAGE uses 'http://palladiosimulator.org/PalladioComponentModel/UsageModel/5.2';
-modeltype PCM_FEATURE_CONF uses 'http://sdq.ipd.uka.de/FeatureConfig/2.0';
-modeltype PCM_FEATURE_MOD uses 'http://sdq.ipd.uka.de/FeatureModel/2.0';
-modeltype PCM_CORE uses 'http://palladiosimulator.org/PalladioComponentModel/Core/5.2';
-modeltype PCM_COMP uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Composition/5.2';
-modeltype PCM_ENTITY uses 'http://palladiosimulator.org/PalladioComponentModel/Core/Entity/5.2';
-modeltype PCM_PARAM uses 'http://palladiosimulator.org/PalladioComponentModel/Parameter/5.2';
-modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
-
-/*
- * The transformation signature declares that a PRM modeltype is required as input, while an PCM
- * modeltype is transformed inplace. The PRM modeltype is referenced as 'prm' throughout the
- * transformation definition, while no name is needed for the output PCM modeltype. Note that OCL
- * type and namespace notation are used in operational QVT (: and :: respectively).
- */
-transformation unsetBranchProbabilityNode2( in pcmAllocation : PCM_ALLOC ) {
-
-
- /**
- * The main transformation.
- * This is the entry point to the overall transformation.
- */
- main() {
-
- log('*** STARTED: Transformation rule [unsetBranchProbabilityNode2] ...');
- pcmAllocation.rootObjects()[Allocation]->forAll(
- allocation : Allocation |
- unsetBranchProbabilities(allocation.allocationContexts_Allocation)
- );
- log('*** DONE: Transformation rule [unsetBranchProbabilityNode2]');
- }
-
-
- /**
- * branchProbabilityProcessing Processing.
- */
- helper unsetBranchProbabilities(allocationContexts : Set(AllocationContext)) : Boolean {
-
- allocationContexts->forEach(allocation){
-
- if( allocation.assemblyContext_AllocationContext.id = "_6F6LYAEnEeS7FKokKTKFow" ) {
- //log('Found load balancer: AC_LoadBalancer');
- allocation.assemblyContext_AllocationContext.encapsulatedComponent__AssemblyContext.oclAsType(BasicComponent).serviceEffectSpecifications__BasicComponent->forEach(seff) {
- if(seff.oclIsTypeOf(ResourceDemandingSEFF)) {
- var branch2 : ProbabilisticBranchTransition = seff.allSubobjects()[ProbabilisticBranchTransition]->any(id="_tjFukAEoEeS7FKokKTKFow"); // entityName="delegateToServer2"
- branch2.branchProbability := 0.0;
- log('Set branch2.branchProbability to ' + branch2.branchProbability.toString());
- return true;
- }
- }
- }
- };
-
- return false;
- }
-
-}
diff --git a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/strategies/FaultTolerantScalingPlanningStrategy.smodel b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/strategies/FaultTolerantScalingPlanningStrategy.smodel
index 46b53edef..42ea5b775 100644
--- a/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/strategies/FaultTolerantScalingPlanningStrategy.smodel
+++ b/examples/org.palladiosimulator.simexp.pcm.examples.loadbalancer.faulttolerant/strategies/FaultTolerantScalingPlanningStrategy.smodel
@@ -3,25 +3,22 @@ modelName = "FaultTolerantScalingPlanningStrategy";
const double lowerThreshold = 1.0;
const double upperThreshold = 2.0;
const string available = "available";
-
+var double scalingFactor = 0.1;
envvar string serverNode1: variableId = "_AiOj4AFHEe6baZPxrKywYw"; // entity name: GRV_StaticInstance_ServerNode1
envvar string serverNode2:variableId = "_QZ8DcAFHEe6baZPxrKywYw"; // entity name: GRV_StaticInstance_ServerNode2
-
probe double responseTime : monitorId = "_LQcqIMltEeSsG6YHnSxiuA"; // System Response Time : "Usage Scenario: overloadUsageScenario";
action scaleOut();
+//action scaleOut(param double factor);
action scaleIn();
-action setBranchProbabilityNode1();
-action setBranchProbabilityNode2();
-action unsetBranchProbabilityNode1();
-action unsetBranchProbabilityNode2();
-action setBranchProbabilityFailSave();
-action unsetBranchProbabilityFailSave();
+//action scaleIn(optimizable double[0.1, 0.2, 0.05] factor);
+action nodeRecovery(param string node1, param string node2);
if ((serverNode1==available) && (serverNode2==available)) {
if (responseTime >= upperThreshold) {
scaleOut();
+ //scaleOut(factor=scalingFactor);
}
if (responseTime <= lowerThreshold) {
@@ -29,27 +26,5 @@ if ((serverNode1==available) && (serverNode2==available)) {
}
} else {
// node recovery implements logic of class 'FaultTolerantScalingNodeFailureRecoveryStrategy.handleStates'
- if ((serverNode1!=available) || (serverNode2!=available)) {
-
- if ((serverNode1==available) && (serverNode2!=available)){
- setBranchProbabilityNode1();
- unsetBranchProbabilityNode2();
- unsetBranchProbabilityFailSave();
- }
- if ((serverNode1==available) && (serverNode2==available)){
- setBranchProbabilityNode1();
- unsetBranchProbabilityNode2();
- unsetBranchProbabilityFailSave();
- }
- if ((serverNode1!=available) && (serverNode2==available)){
- unsetBranchProbabilityNode1();
- setBranchProbabilityNode2();
- unsetBranchProbabilityFailSave();
- }
- if ((serverNode1!=available) && (serverNode2!=available)){
- unsetBranchProbabilityNode1();
- unsetBranchProbabilityNode2();
- setBranchProbabilityFailSave();
- }
- }
+ nodeRecovery(node1=serverNode1, node2=serverNode2);
}