diff options
author | 2019-05-17 20:37:45 -0400 | |
---|---|---|
committer | 2019-05-17 20:37:45 -0400 | |
commit | 256de89b45a055533650481593e026359d50c203 (patch) | |
tree | 246c6218ecafd8fcd1430eed9e31f8b5a845fb07 /Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql | |
parent | Formalize CPS case study for optimization (diff) | |
download | VIATRA-Generator-256de89b45a055533650481593e026359d50c203.tar.gz VIATRA-Generator-256de89b45a055533650481593e026359d50c203.tar.zst VIATRA-Generator-256de89b45a055533650481593e026359d50c203.zip |
Model generator for CPS case study
Added extra constraint for redundancy in CPS deployments
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql index 7f7cc5a4..40337443 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql | |||
@@ -96,6 +96,16 @@ pattern requirementNotSatisfied(Req : Requirement) { | |||
96 | check(Instances < RequiredCount); | 96 | check(Instances < RequiredCount); |
97 | } | 97 | } |
98 | 98 | ||
99 | @Constraint(severity = "error", key = {Req}, | ||
100 | message = "Redundant instances must not be allocated to the same host.") | ||
101 | pattern redundantInstancesOnSameHost(Req : Requirement) { | ||
102 | Requirement.instances(Req, App1); | ||
103 | Requirement.instances(Req, App2); | ||
104 | App1 != App2; | ||
105 | ApplicationInstance.allocatedTo(App1, Host); | ||
106 | ApplicationInstance.allocatedTo(App2, Host); | ||
107 | } | ||
108 | |||
99 | pattern averageFreeMemoryMetric(Average : java Double) { | 109 | pattern averageFreeMemoryMetric(Average : java Double) { |
100 | Average == avg find freeMemoryPercentage(_, #_); | 110 | Average == avg find freeMemoryPercentage(_, #_); |
101 | } | 111 | } |