diff options
author | 2020-05-14 15:52:06 -0400 | |
---|---|---|
committer | 2020-05-14 15:52:06 -0400 | |
commit | 076b3b1042269757a32ad902402529fe6bed50e6 (patch) | |
tree | 830d2b132191149b80fe99ac61b49714d771f25d /Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql | |
parent | Merge branch 'master' of https://github.com/viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-076b3b1042269757a32ad902402529fe6bed50e6.tar.gz VIATRA-Generator-076b3b1042269757a32ad902402529fe6bed50e6.tar.zst VIATRA-Generator-076b3b1042269757a32ad902402529fe6bed50e6.zip |
Adjust Pledge, handling of many households.
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql index 56528cbb..03e6847d 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql | |||
@@ -182,22 +182,40 @@ pattern x_inv13(tp : Resident_Tax_Payer) { | |||
182 | 182 | ||
183 | //inv15-Ordered Sets in assignment if block | 183 | //inv15-Ordered Sets in assignment if block |
184 | //ERROR if no household object | 184 | //ERROR if no household object |
185 | //@Constraint(message = "inv15", severity = "error", key = {ea}) | ||
186 | //pattern inv15(ea : External_Allowance) { | ||
187 | // neg find x_inv15(ea); | ||
188 | //} | ||
189 | //pattern x_inv15(ea : External_Allowance) { | ||
190 | // External_Allowance.person(ea, child); | ||
191 | // Household.children(h, child);//only one due to multiplicity | ||
192 | // Household.parents.individual_A(h, iA); | ||
193 | // Tax_Payer(iA); | ||
194 | // External_Allowance.reciver(ea, iA); | ||
195 | //} or { | ||
196 | // External_Allowance.person(ea, child); | ||
197 | // Household.children(h, child);//only one due to multiplicity | ||
198 | // Household.parents.individual_B(h, iB); | ||
199 | // Tax_Payer(iB); | ||
200 | // External_Allowance.reciver(ea, iB); | ||
201 | //} | ||
202 | |||
185 | @Constraint(message = "inv15", severity = "error", key = {ea}) | 203 | @Constraint(message = "inv15", severity = "error", key = {ea}) |
186 | pattern inv15(ea : External_Allowance) { | 204 | pattern inv15(ea : External_Allowance) { |
187 | neg find x_inv15(ea); | 205 | External_Allowance.person(ea, child); |
188 | } | ||
189 | pattern x_inv15(ea : External_Allowance) { | ||
190 | External_Allowance.person(ea, child); | ||
191 | Household.children(h, child);//only one due to multiplicity | 206 | Household.children(h, child);//only one due to multiplicity |
192 | Household.parents.individual_A(h, iA); | 207 | External_Allowance.reciver(ea, i); |
193 | Tax_Payer(iA); | 208 | Tax_Payer(i); |
194 | External_Allowance.reciver(ea, iA); | 209 | neg find x_inv15(h, i); |
195 | } or { | 210 | } or { |
196 | External_Allowance.person(ea, child); | 211 | External_Allowance.reciver(ea, i); |
197 | Household.children(h, child);//only one due to multiplicity | 212 | Dependent(i); |
198 | Household.parents.individual_B(h, iB); | 213 | } |
199 | Tax_Payer(iB); | 214 | |
200 | External_Allowance.reciver(ea, iB); | 215 | pattern x_inv15(h : Household, i : Tax_Payer) { |
216 | Household.parents.individual_A(h, i); | ||
217 | } or { | ||
218 | Household.parents.individual_B(h, i); | ||
201 | } | 219 | } |
202 | 220 | ||
203 | //inv16-Tax_Card.tax_card_type is a derived feature | 221 | //inv16-Tax_Card.tax_card_type is a derived feature |