imit_model / AnyLogic / UsersManual(AnyLogic)
.pdf
AnyLogic V User’s Manual
►To create a custom toolbar
1.Click New button.
The Toolbar Name dialog box is displayed.
2.Type the name of the new toolbar in the Toolbar Name edit box.
3.Click OK.
►To rename a custom toolbar
1.Select the toolbar in the Toolbars list.
2.Click the Rename button.
►To delete a custom toolbar
1.Select the toolbar in the Toolbars list.
2.Click the Delete button.
►To reset a toolbar to the default state
1.Select the toolbar in the Toolbars list.
2.Click the Reset button.
►To reset all toolbars to default states
1.Select the toolbar in the Toolbars list.
2.Click the Reset All button.
21.1.2Commands page
The Commands page (see Figure 180) enables you to add, delete, and change the layout of toolbar buttons.
© 1992-2004 XJ Technologies http://www.xjtek.com |
417 |
AnyLogic V User’s Manual
21.1.3Keyboard page
The Keyboard page (see Figure 181) enables you to change the shortcut keys for the commands.
Figure 181. Customize dialog box. Keyboard page
►To set new shortcut key for a command
1.Select the category from the Category drop-down list.
2.Select the command from the Command drop-down list.
The Description box displays the description of the selected command.
The Current Keys list displays the current shortcut keys for the selected command.
3.Click inside the Press New Shortcut Key box and press the combination of keys that you want to make shortcut keys.
4.Click the Assign button.
5.Click the Close button.
© 1992-2004 XJ Technologies http://www.xjtek.com |
419 |
AnyLogic V User’s Manual
Figure 182. Customize dialog box. Menu page
►To choose the animation effect for opening menus
1.Choose the animation effect from the Menu animations drop-down list. You may choose from None, Unfold, Slide, Fade, where None means no effect applied, Unfold – that menus are animated unfolded, Slide – that menus are animated sliding down, Fade – that menus are animated fading in.
►To display menus with/without shadows
1.Select/clear the Menu shadows check box.
21.1.5Options page
The Options page (see Figure 183) enables you to customize the toolbar buttons appearance, namely to choose whether to display tooltips or not (with shortcut keys or not) and whether to display buttons with standard or large icons.
© 1992-2004 XJ Technologies http://www.xjtek.com |
421 |
AnyLogic V User’s Manual
Figure 184. Options dialog box. Colors page
►To set the color of an item
1.Choose Tools|Options… from the main menu. The Options dialog box is displayed.
2.Click the Colors tab.
3.Select the item in the list.
The Color button has the color of the currently selected item.
4.Click the Color button.
The Color dialog box is displayed.
5.Choose color you want to set.
6.Click OK.
© 1992-2004 XJ Technologies http://www.xjtek.com |
423 |
Chapter 22. Project building. Model initialization and termination order
22. Project building. Model initialization and termination order
The information presented in this chapter might be useful for better understanding of how an AnyLogic project is built (see section 22.1, “Building a project”) and how a model initializes and terminates in terms of ordering of various operations (see section 22.2, “Model initialization and termination order”).
22.1 Building a project
22.1.1Project building stages
AnyLogic builds the project in three stages: code generation, compilation, and archiving (the latter is optional).
On the first stage, AnyLogic generates Java code for all classes defined in the project. The code is put into .java files. Files are placed into temporary folders whose structure mimics the structure of packages of the project. External files included into the project are also copied to those folders. You can examine the generated code each time you want to see how the visual representation of the model is mapped into source code. To specify the folder the generated files should be stored in instead of temporary folders, use the Folder for generated files property of the project. To set the project property, select the project item in the workspace tree.
On the second stage, a Java compiler is invoked. The compiler produces .class files containing bytecode to be executed on Java virtual machine. The .class files are placed into the same folder as .java files. The execution of the byte-code is the execution of the model.
In case the Target file property of the project is specified, the third stage – archiving – takes place. On the third stage, AnyLogic builds an archive by packing bytecode into the file specified in the Target file property of the project. For that purpose, a packager is used. The resulting file contains the complete bytecode of the model and usually has .jar (Java
424 |
© 1992-2004 XJ Technologies http://www.xjtek.com |
AnyLogic V User’s Manual
archive) extension. Note that in most cases you do not have to generate an archive. The rationale for creating an archive is that it is smaller than unpacked bytecode. So, if you put the model on a Web site as an applet, the archive is preferable. However, if the project being developed is a library, it must be packed into an archive; otherwise it will be unusable.
You can customize the process of compiling and archiving the model. You can tell AnyLogic which Java compiler and packager to use and specify compiler options (see section 22.1.3, “Project building options”).
The files involved in the process of building depend on each other. The example of dependencies is shown in Figure 185.
Editing the model
MyModel.alp
Generating code
Root.java Client.java Server.java
Compiling code
Root.class Client.class Server.class
Archiving
MyModel.jar
Figure 185. Example of file dependencies
A file is considered out-of-date if it is older than any of the files it depends on. To build the project, you either bring it up to date by building out-of-date and missing files, or you rebuild the whole project, starting with code generation for all classes.
© 1992-2004 XJ Technologies http://www.xjtek.com |
425 |

toolbar button, or Choose
toolbar button, or Choose
toolbar button, or Choose
toolbar button, or Choose