Table of ContentsPreviousNext

Put your logo here!


CHAPTER 6
Graphical Modeling Constructs
Graphical constructs in SIMPROCESS include:
· Background Text (static and dynamic)
· Background Graphics
In addition, graphics can be imported for use as backgrounds or icons, and animation can be recorded for playback.

Background Text

There are two types of background text in SIMPROCESS: static text and dynamic labels. Static text is used for annotating the model layout and does not change during simulation. Dynamic labels are updated during simulation and are used to display information about changing properties of model elements. Several text labels can be grouped together on the layout and their horizontal and vertical alignment can be set using the Align option.
Dynamic labels can be updated automatically or by using the SIMPROCESS Expression Language. The SIMPROCESS Expression Language is an advanced feature found in SIMPROCESS Professional. Updating dynamic labels using expressions is covered in Chapter 10-Customizing a Model with Attributes and Expressions. This topic begins on page 237.
Properties are specified in the Background Text dialog, invoked by selecting a text tool from the Layout Toolbar (marked by a capital T) and clicking on the background in the location where text is to be placed. Text can be moved by clicking and dragging. The following shows a static label. Note that the Static Label field and Font Attributes are all that are required for a static label.

The dialog is divided into two sections: the top group of controls, designated as Dynamic Label Properties, is only applicable to dynamic text; the bottom group - Font Attributes - is used to specify all text properties. Defaults for the Font Attributes can be set on the Background Text tab of the Preferences dialog (Edit/Preferences).
SIMPROCESS provides a list of the available fonts. Some fonts will not properly display their names in the combo box if the Java environment is unable to handle them. Avoid using these fonts. All rotation settings in the Angle combo box can be used with any font settings. Note that once the text is placed on the layout, the selection box around it has no handles. The only way to resize font text is to change its point size in the Fonts dialog. Once the text is placed on the layout, it can be moved, its properties edited, and it can be grouped with other objects on the layout.
When a dynamic label is placed on the layout, in addition to its font attributes, appropriate information needs to be entered in the Dynamic Label Properties group. Each dynamic label must have a unique combination of Name and Id number. Usually, Id number will be 0, unless two dynamic labels have the same name. The name typed into the Name text box will not appear on the layout. It will only be used to reference the label. Also, choose the type of value with which the dynamic label will be updated. The choice between String, Integer, and Real is made in the Mode combo box. If the value of the dynamic label is Real, also specify Width and Precision in the corresponding value boxes. Width is the total number of digits that will be shown for the displayed value (including the decimal point), while Precision specifies the number of digits after the decimal point that will be displayed. If the Width is greater than the value being displayed, it will be padded with spaces on the left side. If the Mode is Integer, then only the Width field needs to be set.
The Value field can be left empty. If so, the dynamic label can only be updated by using the SIMPROCESS Expression Language (page 294). Likewise, if the Mode is String, the dynamic label can only be updated through the SIMPROCESS Expression Language. If the Value field is not empty, the dynamic label will update automatically every time the selected value changes. The six buttons to the right (Entity, Resource, Activity, Connector, Time Stamp, and Model Attribute) are used to set the Value for the dynamic label. These buttons are active when a valid Name and Id has been entered and the Mode is not String. Each button brings up a dialog that lists each model element of that type (Entity, Resource, etc.) on the left. Once a value is selected on the left, the values available are listed on the right. Only one item can be selected on each side.
Selecting the Entity button displays the following dialog.

The Value field can be changed by selecting a different value using one of the six Set Value buttons. Select the Clear Value button to clear the Value field. As stated earlier, leaving the Value field empty means the dynamic label can only be updated using expressions.
Although it is not necessary, add a Static Label to the dynamic label definition. If this is not done, there will be no place holder for the dynamic label on the layout after the dialog is closed. This label can still be found by dragging a rubber band box in the selection mode around the area where it was placed. A very small selection box may appear at the location of the label. The label's properties can then be edited by choosing Edit/Properties off the menu. Also, adding a static label to the side of the dynamic label makes it simpler to find the dynamic label location and provides a description of the value being updated. The static label is not replaced when dynamic value is updated since they are two separate labels.

Background Graphics

Select the Background Graphic icon from the Layout Toolbar and move it to the layout to add a background graphic. The Select Background dialog will open. Backgrounds can be previewed before adding to the layout by selecting a background then clicking the Preview button. Choose the background, and select OK to close the dialog. Once the graphic is on the layout, it can be resized by selecting Edit/Resize. Note that background graphics cannot be resized using the resize handles.
The properties of the Background Graphic has two options on the properties dialog, Locked and On Top.
The Locked option locks the Background Graphic to its current position on the layout, preventing inadvertent moving of the Background Graphic while editing or navigating. Background Graphics default to unlocked.
Turning the On Top option on brings the Background Graphic to the front of the layout display. Typically this option is left off, so that the Processes, Activities, and Connectors on the screen will appear on top of the Background Graphic.
Note that Background Text added after a Background Graphic has been added to a layout will be behind the Background Graphic. If the Background Graphic is not transparent, the Background Text will not be visible. To solve this, make sure Locked is not selected, then select the Background Graphic and choose Layout/Send to Back.

Importing Graphics Image Files

A Graphics Interchange Format (GIF), Joint Photographic Experts Group (JPEG), or Portable Network Graphics (PNG) graphic can be imported into SIMPROCESS. An imported graphic can be used as a Background Graphic, as an icon representing a Process or Activity, or as an icon representing an Entity.

Background Images

To use an imported graphic as a background, select Manage Background Images from the Tools menu. This will open the Manage Background Images dialog. The dialog has two actions for importing background images: Import Image and Import for Model. Import Image imports a background graphic for use by any SIMPROCESS model. Import for Model imports a background graphic only for the currently active SIMPROCESS model. Import for Model is disabled if no model is open or the active model has not been saved and given a name.

Selecting the Import Image or Import for Model buttons will open the Import Background Image dialog.

Select the Browse button, and choose a graphics file. Enter a name in the Background Name field. This is the name that will display in the list of available backgrounds and must be unique. Select OK to import the graphics file for use in SIMPROCESS.
Other features available from the Manage Background Images dialog can be accessed by selecting Manage Images, which opens the Export or Delete Background Image dialog.

This dialog allows exporting any of the available backgrounds to external graphics files, including those provided with SIMPROCESS. In addition, it will allow deletion of any imported background images. Note that background graphics imported for the currently active model will have ** (a pair of asterisks) before the name.

Activity, Process, and Entity Images

Use the Icon Manager (Tools/Icon Manager) to import a graphics file for use as a Process, Activity, or Entity.
The Icon Manager is used to import, export, and manage image files. A single image file can be imported for use as an icon, or multiple files (such as a directory of image files) can be imported. Select For Current Model to have the import apply only to the currently active SIMPROCESS model. For Current Model will be disabled if no model is open or if the currently active model has not been saved and given a name.

Choose Single Icon and click Import to import a single image for use as an icon. Use the Browse button to locate the Image File to import. Once selected, enter the Icon Name which must be unique among all icons, no matter what category or set. Select the Icon Category and Icon Set. If the Icon Set needed is not listed, create a new set by typing it in the Icon Set field. Click OK to finish the import.

A directory of images can be imported by choosing Multiple Icons and clicking Import. Using the Browse button, select the directory that contains the images to import. Only directories will be listed in the file chooser. Files may not be selected. All .gif, .jpg, and .png files in the directory will be imported. The Icon Name for each will default to the name of the file minus the extension. These names can be changed as long as they remain unique among all the standard and imported icons. An error message will appear listing the names that are not unique.

Note
Export exports images to a directory. It lists all the icons in SIMPROCESS, whether standard to SIMPROCESS or imported. The export dialog will list the Icon Name, Category, Icon Set, and whether the icon is Standard, Imported, or Model. (Standard indicates the icon was included as part of the SIMPROCESS installation. Imported means the icon was imported for use by any SIMPROCESS model. Model signifies the icon was imported for use by the currently active SIMPROCESS model.) Simply select the Export checkbox next to the icons to export and click OK. Using the Browse button, select the directory for the exported images.

Manage brings up a dialog that lists the imported icons. This dialog changes the Icon Name, Category, Icon Set, or Deletes the icon. Icons that were imported for the currently active model will have ** (a pair of asterisks) before the name.

Post Simulation Animation

Animation is very useful in verifying and validating a model as well as communicating a model to management or customers. Normally, when turned on, animation displays while a model is simulating, which causes the simulation to slow significantly. In addition, only the animation for the current simulation time can be viewed. In other words, something in the past cannot be viewed again without restarting the simulation and waiting through the simulation to get to the point of interest.
Post simulation animation displays an animation from a simulation without the simulation running. During a simulation the animation is recorded for playback. Animations can be recorded without displaying the animation during a simulation. Playback of animations that have been recorded can be paused, fast forwarded, and rewinded.
Note: Due to the addition of Connector delays and concurrent animation in SIMPROCESS Version 4.2, any animations that were recorded in a version prior to 4.2 will no longer replay. The animations must be recorded again.

Post Simulation Animation Toolbar

Post simulation recording and playback is controlled by the post simulation animation toolbar. The post simulation animation button displays and hides the post simulation animation toolbar. The button is to the right of the Animation Speed slider on the System Toolbar. The toolbar displays at the bottom of the SIMPROCESS layout.

The two buttons on the left are for recording, and the remainder are for playback.

Recording an Animation

Animation events are recorded in a file for playback. In order for the Record On/Off button to be active, an animation event file must be set using the Set Record File button. The Set Record File button brings up a dialog where the name of the file is entered. Do not enter the path to the file. Animation event files are automatically created in the model's directory. The file name is saved with the model. If an animation event file had been previously set, the Record On/Off button will activate when the toolbar is displayed.
The Record On/Off button is a toggle button. When the button is selected, animation events are recorded. Thus, recording can be turned on and off multiple times during a simulation.
The animation option buttons on the System Toolbar, or the Animation Settings dialog (Simulate/Animation Settings menu item) control which animation events are recorded. Animation On, Show Clock, and Animation Speed (slider) do not apply to recording animation events. The events recorded are determined by the status of Show Entities, Show Counts, and Update Dynamic Labels. If an item is selected, those type of animation events are recorded. In the example below, only the movement of entities and Activity counts would be recorded. Note that the Animation On button is not selected. Animation does not need to display during recording.

Warning: Animation events files can be very large. When recording counts and movement of entities, animation events for every level of the model must be recorded. Recording all that information will create very large files if recording is done for the whole simulation. The larger the model is, the larger the animation event file will be. Recording the movement of entities has the biggest impact. Recording only dynamic label events and/or Activity count events typically produces much smaller files.

Animation Playback

An animation event file of an animation that has been recorded must be opened for playback. This is done using the Open File button on the post simulation animation toolbar.
Important: Make sure the animation event file opened was recorded from the currently active model. The file browser will automatically open to the directory of the model. If the model has changed since the animation event file was created, delete the previous animation event files and record again.

Play

Once a file has been opened, the Play and Fast Forward buttons activate. Pressing Play will start the playback from the beginning of the animation event file.

Fast Forward

Pressing Fast Forward brings up a dialog where an amount of time to skip is entered. Note that the value entered must correspond to the Simulation Time Units set in the Run Settings. (See "Setting the Simulation Time Unit" on page 89.) That time unit will display on the dialog. If Fast Forward is used before Play, the time entered fast forwards the playback from the beginning of the simulation. Thus, if recording did not begin at the start of the simulation, it is possible that the time entered for Fast Forward will still be before recording began. So when Play is pressed, the playback begins where recording started.

Rewind

Rewind is available once playback has started. Pressing Rewind brings up a dialog where the amount of time to back up is entered. This time must fall within the model's Simulation Time Units. The playback starts over at the beginning if the time entered goes past the beginning of the playback.
Note: Both Fast Forward and Rewind have an advantage over animation during simulation. During simulation, Activity counts and dynamic labels only update when an entity enters or leaves an Activity/Process. So, when navigating through models during a run, there is normally a wait for counts and dynamic labels to display the most current values. A Fast Forward or Rewind during playback causes all counts and dynamic labels on the current level to immediately update to their values at that time.

Stop

Stop ends the playback.

Pause

When selected, the playback pauses. Press again to resume the playback.

Animation Controls

The animation buttons on the System Toolbar control what is visible during a simulation animation, and they control what is visible during animation playback. Just like during simulation animation, disabling Show Entities will stop the display of the movement of entities. Show Counts and Update Dynamic Labels work similarly. Remember, the Animation On setting has no effect on animation playback. Also, these animation settings have no effect if those particular animation events were not recorded.


Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
Table of ContentsPreviousNext