Skip to content

Commit

Permalink
corrected wrong property names
Browse files Browse the repository at this point in the history
  • Loading branch information
rapp-fzi committed Jan 9, 2025
1 parent dd36fee commit 64d0cba
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ modeltype PCM_STOEX uses 'http://sdq.ipd.uka.de/StochasticExpressions/2.2';
*/
transformation nodeRecovery( in pcmAllocation : PCM_ALLOC ) {

configuration property serverNode1 : String; // node1 availability
configuration property serverNode2 : String; // node2 availability
configuration property node1 : String; // node1 availability
configuration property node2 : String; // node2 availability


/**
Expand All @@ -44,37 +44,37 @@ transformation nodeRecovery( in pcmAllocation : PCM_ALLOC ) {
main() {

log('Transformation rule [nodeRecovery] ...');
if ((serverNode1 != "available") or (serverNode2 != "available")) {
if ((node1 != "available") or (node2 != "available")) {
log('Start node recovery ...');
if ((serverNode1.toString() = 'available') and (serverNode2.toString() != 'available')){
log("serverNode1 : '" + serverNode1.toString() + "', serverNode2: '" + serverNode2.toString() + "'");
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 ((serverNode1 = "available") and (serverNode2 = "available")){
log("serverNode1 : '" + serverNode1.toString() + "', serverNode2: '" + serverNode2.toString() + "'");
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 ((serverNode1 != "available") and (serverNode2 = "available")){
log("serverNode1 : '" + serverNode1.toString() + "', serverNode2: '" + serverNode2.toString() + "'");
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 ((serverNode1 != "available") and (serverNode2 != "available")){
log("serverNode1 : '" + serverNode1.toString() + "', serverNode2: '" + serverNode2.toString() + "'");
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(
Expand Down

0 comments on commit 64d0cba

Please sign in to comment.