You are here

Model entry

Data-specified association between instances of the same submodel - Model catalogue - Simulistics.com

Search Simulistics Model catalogue Listed by keyword Listed by ID Listed by title Listed by date added

Data-specified association between instances of the same submodel

Model : data_specified_assoc2
Simile version : 3.1+
Date added : 2003-06-20
Keywords : Simile techniques ; Association submodel ;

Description

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

In this example, the association is between one multiple-instance submodel and itself. The submodel could, therefore, represent the nodes on a network, with the asociation indicating which nodes are connected (by arcs) to which other nodes.

Files

Model file

Click on the icon to download the model file. (You will need Simile to examine and run the model. A free evaluation version is available from the products page.)

Some browsers may attempt to display the model file, rather than open it in Simile; in this case, use the browser back button to return to this page, and use the context menu (invoked by right-clicking on the link) to save the target file to disk.

data_specified_assoc2.sml

Diagram

Equations

Equations in ../Desktop
  IDa = [1,2,3]
  IDb = [2,3,4]

Equations in Node
  ID = index(1)

Equations in Arc
 cond1 = (any(ID == [IDa]and ID_0 == [IDb])or any(ID == [IDb]and ID_0 == [IDa]))
  where
    ID = ../Node/ID (from Node in role1)
    ID_0 = ../Node/ID (from Node in role2)
    [IDa] = ../IDa
    [IDb] = ../IDb]