This model demonstrates how to set up an association between submodel instances using a data file containing pairs of instances.
Equations in ../Desktop
hs = [1,1,2]
fs = [3,4,4]
Comment: This two arrays together specify that household 1 owns fields
3 and 4, while household 2 owns field 4 (part ownership allowed!)
Equations in Household
h = index(1)
Equations in Owns
cond1 = any(var1 == [hs]and f == [fs])
where:
var1 = ../Household/h (from Household in owner)
f = ../Field/f (from Field in owned)
[hs] = ../hs
[fs] = ../fs
Equations in Field
variable:f = index(1)
Attachment | Size |
---|---|
data_specified_assoc1.sml | 36.26 KB |