aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin
diff options
context:
space:
mode:
authorLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2020-05-14 15:52:06 -0400
committerLibravatar ArenBabikian <aren.babikian@mail.mcgill.ca>2020-05-14 15:52:06 -0400
commit076b3b1042269757a32ad902402529fe6bed50e6 (patch)
tree830d2b132191149b80fe99ac61b49714d771f25d /Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin
parentMerge branch 'master' of https://github.com/viatra/VIATRA-Generator (diff)
downloadVIATRA-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/bin')
-rw-r--r--Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin/queries/case_study_A.vql31
1 files changed, 27 insertions, 4 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin/queries/case_study_A.vql b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin/queries/case_study_A.vql
index 56528cbb..05bffd2d 100644
--- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin/queries/case_study_A.vql
+++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/bin/queries/case_study_A.vql
@@ -182,20 +182,43 @@ 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})
186pattern inv15(ea : External_Allowance) { 204pattern inv15(ea : External_Allowance) {
205 External_Allowance.person(ea, child);
206 Household.children(h, child);//only one due to multiplicity
207 Household.parents.individual_A(h, iA);
208 Household.parents.individual_B(h, iB);
209
210 Dependant(iA)
211 Dependant(iB)
187 neg find x_inv15(ea); 212 neg find x_inv15(ea);
188} 213}
189pattern x_inv15(ea : External_Allowance) { 214pattern x_inv15(ea : External_Allowance) {
190 External_Allowance.person(ea, child); 215
191 Household.children(h, child);//only one due to multiplicity
192 Household.parents.individual_A(h, iA);
193 Tax_Payer(iA); 216 Tax_Payer(iA);
194 External_Allowance.reciver(ea, iA); 217 External_Allowance.reciver(ea, iA);
195} or { 218} or {
196 External_Allowance.person(ea, child); 219 External_Allowance.person(ea, child);
197 Household.children(h, child);//only one due to multiplicity 220 Household.children(h, child);//only one due to multiplicity
198 Household.parents.individual_B(h, iB); 221
199 Tax_Payer(iB); 222 Tax_Payer(iB);
200 External_Allowance.reciver(ea, iB); 223 External_Allowance.reciver(ea, iB);
201} 224}