imit_model / AnyLogic / UsersManual(AnyLogic)
.pdf
AnyLogic V User’s Manual
Note that while items in the Project window are classes, items in the Model Explorer are instances.
Figure 135. Model Explorer
► To open the Model Explorer of the root object
1.Click the Model Root Object
toolbar button, or Choose View|Model Root Object from the main menu.
If you select an item in the Model Explorer, the Properties window displays the inspect window of the item. The inspect window shows the item’s inspect string obtained from the model. In addition, if the selected item is an active object, the Properties window displays the log window.
You can open more explorers having different objects at roots of their trees. The new Model Explorer displays the subtree of the object the explorer is opened on. This is a way of shifting the Model Explorer base along the object hierarchy. There is also a backward
© 1992-2004 XJ Technologies http://www.xjtek.com |
267 |
AnyLogic V User’s Manual
Every item in the Model Explorer has a set of actions associated with it, accessible through the item’s popup menu. For example, an encapsulated object can be explored in a new Model Explorer, its structure diagram, log, and inspect windows can be opened, and a breakpoint can be set on it.
11.2.1.1 Modifying variables and parameters
You can modify parameters and variables of active objects from the Model Explorer.
►To modify a variable/parameter
1.Double-click the variable/parameter, or
Right-click the variable/parameter and choose Modify from the popup menu. The Modify dialog box is displayed.
2.Type a new value in the Enter new value edit box.
3.Click OK.
11.2.1.2 Color highlighting of model items
Objects displayed in the Model Explorer (active objects, ports, threads, timers, etc.) may be involved in steps executed by the simulation engine. For example, an event step may be associated with a timer expiry. Such shapes are highlighted in the Model Explorer to help you to locate the current activity within the model.
The default highlight colors and their meanings are given in the table below. You can change the default color scheme using the Colors page of the Options dialog box.
Item |
Color |
Status |
|
(default) |
|
|
|
|
Timer |
Red |
Chosen. Will expire at this step. |
|
|
|
Thread |
Red |
Chosen. Will advance at this step. |
|
|
|
Statechart |
Red |
Chosen. One of the statechart’s transitions is |
|
|
chosen. |
|
|
|
© 1992-2004 XJ Technologies http://www.xjtek.com |
269 |
AnyLogic V User’s Manual
You can open the animated structure diagram from the Model Explorer, or from another animated structure diagram.
►To open the animated structure diagram of an active object from the Model Explorer
1.Double-click the active object in the Model Explorer, or
Right-click the active object in the Model Explorer and choose Structure from the popup menu.
►To open the animated structure diagram of an encapsulated object from the animated structure diagram of a parent object
1.Double-click the encapsulated object, or
Right-click the encapsulated object and choose Structure from the popup menu.
►To open the animated structure diagram of a parent object from the animated structure diagram of an encapsulated object
1.Right-click the empty area of the animated structure diagram and choose Up to Parent from the popup menu.
You can get the image of the animated structure diagram (including color highlighting) on the Clipboard:
►To copy the image of the animated structure diagram on the Clipboard
1.Click on the diagram, and choose Draw|Copy Image from the main menu, or Right-click the empty area of the diagram and choose Copy Image from the popup menu.
Every shape on the animated structure diagram has a set of actions associated with it, accessible through the shape’s popup menu. For example, an encapsulated object can be explored in the Model Explorer, its structure diagram, log, and inspect windows can be opened, and a breakpoint can be set on it.
►To explore an active object in the Model Explorer
1.Right-click the active object and choose Explore from the popup menu.
© 1992-2004 XJ Technologies http://www.xjtek.com |
271 |
AnyLogic V User’s Manual
11.2.2.3 Animating active objects
If you have developed some icon for an active object (see section 1.5.3, “Active object icon”), each time an instance of this object appears as an encapsulated object on an animated structure diagram, this icon is displayed. Since you can link properties of the shapes your icon is constructed from to active object data, you can animate active objects on the animated structure diagram.
11.2.3Animated statechart diagram
The animated statechart diagram window, see Figure 137, visualizes a statechart running in the model. It looks similar to the statechart diagram editor, but editing is not allowed and color animation, breakpoints, and other viewer features are enabled.
Figure 137. Animated statechart diagram
You can open the animated statechart diagram from the Model Explorer or from the animated structure diagram.
►To open the animated statechart diagram of a statechart
1.Double-click the statechart, or
Right-click the statechart and choose Statechart from the popup menu.
© 1992-2004 XJ Technologies http://www.xjtek.com |
273 |
AnyLogic V User’s Manual
Table 19.
11.2.4Inspect window
You can display the information about the current state of a model element in the element’s inspect window. More precisely, the inspect window displays the inspect string associated with the object. Some objects (datasets, variables) have hard coded inspect, see Figure 138. Inspect strings for active objects, statecharts and ports can be set manually.
Figure 138. Inspect window of a dataset
The inspect window appears in the Properties window when you select a model item. Also, a standalone inspect window can be opened from the popup menu of an item.
►To open the inspect window of a model item
1.Right-click the item in the Model Explorer or on the animated structure diagram and choose Inspect from the popup menu.
11.2.4.1 Defining custom inspect
You can define custom inspect strings for an active object, a port and a statechart. This is done using the following API (for more information, please consult AnyLogic Class Reference):
© 1992-2004 XJ Technologies http://www.xjtek.com |
275 |
