You are here

Data-specified association between two different submodels

ModelId: 
data_specified_assoc1
SimileVersion: 
3.1+

 This model demonstrates how to set up an association between submodel instances using a data file containing pairs of instances.

 

 household, field

 

Equations: 

 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)

 

 

 

AttachmentSize
Binary Data data_specified_assoc1.sml36.26 KB