Connecting objects

We can objects using either a single link or a broadcast link: see Figure [*]. In each case the ed ports are assigned the same name, the name of the wire that s the ports. Objects ed via a broadcast link can either send messages to all objects using the reserved word all, or to a specified object. Note that the sent is not received by the object that generated the message. In order to send a message to a specific object, the name of a variable must be used (instead of all). Of course, this variable must be initialized with the name of an object that will receive the message when the object is instantiated.

The ion between two or more objects can be done automatically. The
TANGRAM2_OBJECTS domain has a port object named port.sym that is used in this ion. When we use this feature, the name of all ports ed is set automatically. This feature is particularly useful when the model is very large. The user can set automatically all in the model, or do it by hand, initializing the name of each declared port, using the Initialization attribute. See more details in §[*].

Figure: Single and Broadcast links.
\includegraphics[width=2in]{figuras/port.eps}

Our first model is presented in Figure [*].

Figure: The M/M/1/k model.
\includegraphics[width=4in]{figuras/MM1kmodel.eps}

In Figure [*] the objects have a different format. These objects (Server_Queue and Poisson_Source) are stored in the TANGRAM2_OBJECTS . §[*] in the Appendix shows how to create a new object.

To save the new model, click on File $\rightarrow$ Save new. The model will be saved in the current directory.

Guilherme Dutra Gonzaga Jaime 2010-10-27