Building a Model

Using the Simulation Studio GUI to build a simulation model is straightforward. It consists of dragging icons from the Template Palette window into a Model window and then creating links between the appropriate ports on the various blocks in the model. (Of course, the hard part is actually determining the appropriate composition of the model.)

To create an instance of a specific block in a Model window, you drag the appropriate icon or text in the Template Palette window into the Model window to the location where you want the block to be created. During the drag, a transparent icon is attached to the pointer. (You can always drag the new block instance around in the Model window to move it to another position.) You can modify the properties on any block in your model by using the properties dialog box associated with each block. You can open this dialog by right-clicking the block and selecting the Block Properties menu item. Double-clicking the block icon also causes the properties dialog box to open.

One-step undo and redo options are available immediately after you insert or delete a block. If you perform another action after adding or deleting a block, such as forming a link, then the undo and redo options are no longer available for that block. The options are available from the model pop-up menu, which you access by right-clicking in the Model window. To remove the last block added to the model, select Undo Block Insertion. To insert the block back into the model, select Redo Block Insertion. To insert a deleted block back into the model, select Undo Block Deletion.

After you have blocks in your Model window, you can begin to create links between the ports on the various blocks to enable the flow of values and entities between blocks. To create a link, position the pointer over a port that you want to be an endpoint of the link and hold down the left mouse button. (Note that the port size enlarges when the pointer is over it, indicating port selection.) A rubber-band line appears that connects the selected port with the pointer. While holding down the left mouse button, move the pointer until it is positioned over the port you want to connect to and then release the left mouse button. If the port types associated with the two selected ports are compatible, a link is created between them.

Simulation Studio also offers a two-click method for creating links that is especially useful when the blocks you want to connect are far apart in the model. You can use the two-click method to create a link by moving the pointer until it is positioned over the first port to connect and then clicking the left mouse button. Move the pointer until it is positioned over the compatible port that you want to connect to (scrolling the Model window if necessary), and then click the left mouse button again to form the link. If you hold down the CTRL key while performing the second click, then you can continue to click on other input ports to form additional links.

One-step undo and redo options are available for the most recent link insertion or deletion action. These options are available from the Model window pop-up menu, which you access by right-clicking in the Model window. To remove the last link formed from the model, select Undo Link Connection. To insert a deleted link back into the model, select Redo Link Connection.