imit_model / AnyLogic / UsersManual(AnyLogic)
.pdfAnyLogic V User’s Manual
16.4 |
RUNNING THE OPTIMIZATION........................................................................... |
369 |
|
16.5 |
HOW TO INCREASE OPTIMIZATION PERFORMANCE .............................. |
372 |
|
16.6 |
TIPS AND NOTES......................................................................................................... |
374 |
|
17. COLLECTING DATA AND PERFORMING STATISTICAL ANALYSIS .... |
375 |
||
17.1 |
COLLECTING DATA IN DATASETS..................................................................... |
375 |
|
17.1.1 |
Defining a dataset .......................................................................................................... |
377 |
|
17.1.2 |
Dataset types.................................................................................................................. |
378 |
|
17.1.3 Intervals associated with datasets..................................................................................... |
380 |
||
17.1.4 |
Statistics block ............................................................................................................... |
380 |
|
17.2 |
COLLECTING DATASETS FOR VARIABLES ..................................................... |
381 |
|
17.3 |
VISUALIZING COLLECTED DATA....................................................................... |
382 |
|
17.3.1 Visualizing collected data in Model Viewer.................................................................... |
382 |
||
17.3.2 Visualizing collected data in AnyLogic animation .......................................................... |
389 |
||
17.4 |
EXPORTING STATISTICAL DATA TO OTHER APPLICATIONS ............... |
390 |
|
18. STANDALONE MODEL RUNNING............................................................... |
391 |
||
18.1 |
RUNNING A MODEL FROM THE COMMAND LINE..................................... |
391 |
|
18.2 |
RUNNING A MODEL AS AN APPLET .................................................................. |
392 |
|
18.2.1 Configuring your Web browser to view Java applets ......................................................... |
394 |
||
18.3 |
CONTROLLING THE MODEL SIMULATION ................................................... |
394 |
|
18.3.1 Controlling the model simulation..................................................................................... |
395 |
||
18.3.2 Setting up model speed.................................................................................................... |
395 |
||
18.3.3 |
Configuring animation.................................................................................................... |
396 |
|
19. LIBRARIES AND EXTERNAL FILES ............................................................ |
399 |
||
19.1 |
EXTERNAL FILES ........................................................................................................ |
399 |
|
19.2 |
LIBRARIES....................................................................................................................... |
400 |
|
19.2.1 |
Creating a library........................................................................................................... |
400 |
|
19.2.2 |
Working with libraries................................................................................................... |
401 |
© 1992-2004 XJ Technologies http://www.xjtek.com |
xi |
AnyLogic V User’s Manual
20. DATABASE SUPPORT...................................................................................... |
404 |
||
20.1 |
INTRODUCTION.......................................................................................................... |
404 |
|
20.2 |
CREATING A DATA SOURCE.................................................................................. |
405 |
|
20.2.1 Associating with a database file ...................................................................................... |
406 |
||
20.2.2 Associating with an ODBC data source ......................................................................... |
407 |
||
20.2.3 Viewing data source content............................................................................................ |
411 |
||
20.3 |
WORKING WITH DATA SOURCES ....................................................................... |
412 |
|
20.4 |
CUSTOM QUERIES ...................................................................................................... |
413 |
|
20.5 |
TIPS AND NOTES......................................................................................................... |
414 |
|
21. CUSTOMIZING ANYLOGIC UI....................................................................... |
415 |
||
21.1 |
CUSTOMIZING TOOLBARS AND MENUS ......................................................... |
415 |
|
21.1.1 |
Toolbars page................................................................................................................. |
416 |
|
21.1.2 |
Commands page ............................................................................................................. |
417 |
|
21.1.3 |
Keyboard page ................................................................................................................ |
419 |
|
21.1.4 |
Menu page ..................................................................................................................... |
420 |
|
21.1.5 |
Options page .................................................................................................................. |
421 |
|
21.2 |
CUSTOMIZING COLORS........................................................................................... |
422 |
|
22. PROJECT BUILDING. MODEL INITIALIZATION AND TERMINATION |
|||
ORDER...................................................................................................................... |
|
424 |
|
22.1 |
BUILDING A PROJECT .............................................................................................. |
424 |
|
22.1.1 |
Project building stages..................................................................................................... |
424 |
|
22.1.2 |
Building a project ........................................................................................................... |
426 |
|
22.1.3 |
Project building options................................................................................................... |
426 |
|
22.2 |
MODEL INITIALIZATION AND TERMINATION ORDER........................... |
428 |
|
22.2.1 |
Model initialization order............................................................................................... |
428 |
|
22.2.2 |
Model termination order ................................................................................................. |
429 |
|
23. THREADS .......................................................................................................... |
430 |
||
xii |
|
© 1992-2004 XJ Technologies |
http://www.xjtek.com |
AnyLogic V User’s Manual
© 1992-2004 XJ Technologies http://www.xjtek.com |
xiii |
AnyLogic V User’s Manual
1. Creating AnyLogic model
1.1 AnyLogic modeling language
The modeling language of AnyLogic is an extension of UML-RT - a collection of the best engineering practices that have proven successful in the modeling of large and complex systems.
The main building block of AnyLogic model is the active object. Active objects can be used to model very diverse objects of the real world: processing stations, resources, people, hardware, physical objects, controllers, etc.
An active object is an instance of an active object class. When you develop an AnyLogic model, you actually develop classes of active objects and define their relationships. You can also use ready to use active object classes from AnyLogic libraries.
Active object classes map to Java classes. Therefore, they allow inheritance, virtual methods, polymorphism, etc. Object-oriented modeling brings evident benefits. Modeling with classes provides for structural decomposition and active objects reuse. Once an active object class with the required structure is defined, you can create multiple active object instances in your model. Class hierarchies allow further expansion of these ideas.
Active objects inheritance
Being Java classes, active object classes may inherit one from another. The subclass inherits the interface of the superclass and may add specific structure elements and methods. Inheritance permits the reuse of code and supports easy model modification. Once you have defined the fundamental class, representing an automobile, its general characteristics can be inherited by subclasses, representing sport cars and trucks.
Actually all objects of the real world have complex structure. Decomposition is an essential principle in order to manage and master the complexity of large systems. Breaking up a whole system into parts, which may then be further decomposed, helps to overcome the limitations of the human cognition.
Hierarchical decomposition
© 1992-2004 XJ Technologies http://www.xjtek.com |
1 |
Chapter 1. Creating AnyLogic model
AnyLogic models are hierarchically decomposed, since active objects may encapsulate other active objects to any desired depth. This enables you to decompose a model into as many levels of detail as required, since each active object typically represents a logical section of the model. Each AnyLogic model has a root active object which contains encapsulated objects which, in turn, contain their encapsulated objects, and so on. This way, the hierarchical tree of active objects is constructed. Encapsulation also enables you to hide all the complexities of a modeled object.
Structural decomposition
AnyLogic models are structurally decomposed since they have well-defined interaction interfaces. Active objects interact with their surroundings solely through boundary objects. Connections between objects are conveniently described by defining connectors which model physical coupling. This de-coupling of the internal object implementation from any direct knowledge about the environment makes active objects reusable.
Active objects reuse
Besides the use of inheritance, reuse of modeling knowledge is supported by use of libraries containing model classes. AnyLogic lets you create reusable libraries of active object classes developed for some particular application area or modeling task. Libraries provide for better reuse of classes across multiple models. A class can be developed and stored once and used in several projects.
1.2 Starting AnyLogic
You develop and run models using AnyLogic development environment – hereinafter AnyLogic. First, you start AnyLogic and create a new project or open an existing one. Second, you build up the model using constructs provided by AnyLogic. Third, you run the simulation.
This section provides the reference on how to start AnyLogic.
2 |
© 1992-2004 XJ Technologies http://www.xjtek.com |
AnyLogic V User’s Manual
►To start AnyLogic
1.Invoke the AnyLogic shortcut from Windows Start menu (by default it is located on the following menu path: Start|Programs|AnyLogic 5.0|AnyLogic).
2.Registration wizard appears. To build models with AnyLogic you should have an evaluation (limited time) or fully-functional permanent key.
►To evaluate AnyLogic
1.Obtain an evaluation key. If you have downloaded AnyLogic for evaluation, the key is sent to you by e-mail. Otherwise, open the web-page http://www.xjtek.com/products/anylogic/evaluate/ and fill out the form. The key will be sent to you by e-mail.
2.With the registration wizard opened, enter the evaluation key received by e-mail by selecting the Enter permanent or evaluation key option of the wizard.
3.For subsequent runs of AnyLogic, you can select the Continue with evaluation version option.
►To obtain a fully functional AnyLogic key
1.With the registration wizard opened, select the Send request for permanent key option and follow the wizard instructions. You will be prompted to send the request information to the request processing center by e-mail.
2.When you receive your personal unlock key by e-mail, open the registration wizard again (if necessary, point to the Help menu of AnyLogic and select Register product …), then select the Enter permanent or evaluation key option and enter your personal unlock key.
Once you complete the product registration wizard, AnyLogic is started (see Figure 1).
► To start AnyLogic and open a particular project
Click on the AnyLogic project file (extension .alp, icon ) in the Windows Explorer. If you already completed the project registration wizard, AnyLogic should be running. If not, complete the product registration wizard and click the icon again.
© 1992-2004 XJ Technologies http://www.xjtek.com |
3 |
Chapter 1. Creating AnyLogic model
Figure 1. AnyLogic
Note that clicking on a model file does not result in starting another instance of AnyLogic. Instead, that file is opened in the same AnyLogic instance (you are prompted to save the already opened file if necessary).
1.2.1Working with projects
When opened, AnyLogic displays the Start Page (see Figure 2). The Start Page prompts you to create a new project, open an existing one, or open one of the state-of-the-art AnyLogic examples.
4 |
© 1992-2004 XJ Technologies http://www.xjtek.com |
AnyLogic V User’s Manual
Figure 2. AnyLogic Start Page
A project is a workspace for developing your model. To manage AnyLogic projects, use both the Start Page and AnyLogic File menu.
►To create a new project
1.On the Projects page of the Start Page, click the New project button, or Click the New toolbar button, or
Choose File|New… from the main menu, or Press Ctrl+N.
The New project dialog box is displayed.
2.Specify the the name and location of the new project.
© 1992-2004 XJ Technologies http://www.xjtek.com |
5 |
Chapter 1. Creating AnyLogic model
3.Specify whether you want to create a folder for the project.
4.Click OK.
►To open an existing project
1.On the Projects page of the Start Page, click Browse button, or Click the Open toolbar button, or
Choose File|Open… from the main menu, or Press Ctrl+O.
The Open dialog box is displayed.
2.Browse for the project file you want to open, Double-click this file, or
Click it and click Open button.
AnyLogic provides easy access to recently opened projects.
►To open a recently opened project
1.Choose the project you want to open from the project list in the bottom of the AnyLogic File menu, or
Click the Projects tab of the Start Page, click the project you want to open in the list of recently opened projects and click Open button.
If you are working with one particular project, you can tell AnyLogic not to display the Start Page on AnyLogic startup, but instead to open the last project you were working with.
►To open last used project/the Start Page on AnyLogic startup
1.Choose Tools|Options… from the main menu. The Options dialog box is displayed.
2.On the Miscellaneous page, select/clear the Reload last project on startup check box.
3.Click OK.
6 |
© 1992-2004 XJ Technologies http://www.xjtek.com |