aiaw
TRANSCRIPT
-
7/26/2019 AIAW
1/11
BBaannkkOOffffiicceeMMooddeell
AnyLogic provides the Enterprise Library, a discrete-event simulation library containing objects you can use to
rapidly simulate complex discrete-events systems like:
MMaannuuffaaccttuurriinnggpprroocceesssseesswwiitthhddeettaaiilleeddsshhooppfflloooorrllaayyoouutt SSiimmpplleeaannddccoommpplleexxsseerrvviicceessyysstteemmss((ee..gg..bbaannkkss,,aaiirrppoorrttss,,eettcc..))
BBuussiinneesssspprroocceesssseesswwiitthhaaccttiivviittyybbaasseeddccoossttiinngg
LLooggiissttiiccssaannddssuuppppllyycchhaaiinnmmooddeellss
The Enterprise Library allows you to create flexible models, collect basic and advanced statistics, and effectively
visualize the process you are modeling to validate and present your model.
In this tutorial you will learn how to create models with the Enterprise Library in the fields of manufacturing and
business processes.
We will create a simple service system of a bank department, consisting of an automatic teller machine and teller
ines. ATM provides people with a quick self-service for cash. More complex transactions, e.g. paying bills, are
completed by tellers, allowing customers more time without inconveniencing those customers looking for quick
cash.
First, we will create a new model.
Create a new model
1. Click the New toolbar button. The New Modeldialog box is displayed.2. Specify the name of the model. Type Bank In the Model nameedit box.
-
7/26/2019 AIAW
2/11
3.
Click Next. This will open the next page of the New Modelwizard. Here you can choose, whether you wantto start creating a new model from scratch, or to use a model template as a starting point in model
development. Since we want to create a discrete-event model, select Use template to create modeloption
and choose Discrete Eventfrom the list below.
-
7/26/2019 AIAW
3/11
4.
Click Next. This will open the final page of the New Modelwizard. Here you can choose, whether you wantto use resources in your model, add charts or/and animation. Since we want to explain you the whole process
of creating a model in details, we will not use any of mentioned features, but will create our model from
scratch.
-
7/26/2019 AIAW
4/11
5.
Leave all the checkboxes deselected and click Finishto complete the process.
New model is created. It already has one active object class calledMainand experiment called Simulation.
Active objects are the main building blocks of AnyLogic model. They can be used to model very diverse objects of
the real world.
AnyLogic UI
In the center of the workspace you will see the graphical editor. It shows the diagram of theMainclass. The diagramcontains a set of Enterprise Library objects composing a flowchart (we will talk about these flowchart objects in the
next subsection).
-
7/26/2019 AIAW
5/11
To the left of the graphical editor you can see the Projectsview. TheProjectsview provides access to models
currently opened in the workspace. The workspace tree provides easy navigation throughout the models.
On the right side of the workspace you can see the Paletteview, and at the bottom - the Propertiesview. The
Paletteview provides the list of model elements grouped by categories in a number of stencils.
The Propertiesview is used to view and modify the properties of currently selected model item(s). When you
select something e.g., in the Projectsview or in a graphical editor the Propertiesview displays the
properties of the selection.
When working with a model, do not forget to save it by clicking Save .
Now we can continue developing our model by modifying the model created by AnyLogic model creation wizard.
Modifying the model flowchart
As we have already mentioned earlier, you can see the following flowchart on the diagram of active object class
Main:
-
7/26/2019 AIAW
6/11
The flowchart is a sequence of connected Enterprise Library objects. Each object (block) defines some operation
that will be performed with entities passing through this block.
The given flowchart models the simplest queuing system, consisting of a source of entities, delay (and a queue
before this delay) and final sink object.
Flowcharts in AnyLogic are constructed as follows: you add Enterprise Library objects from Enterprise Library
palette onto the diagram of your active object, then you connect them in the desired sequence so that they define
algorithm of entity's "life-in-system", and finally you configure these objects by adjusting their properties.
Please refer to the section Enterprise Library Objectsfor the brief description of all library objects and links to the
articles with detailed reference documentation on them. You can find there all object functions and their parameters.
Now we will adjust the properties of the flowchart blocks.
Modify the properties of the flowchart objects
1. The first object in the flowchart is Source. Sourceobject generates entities with the specifiedinterarrival time. In our example, it models customer arrival. Modify the properties of the source.
o Specify how often customers arrive. Type 0.67 for Arrival rate.
To modify properties of some model element, first select it by clicking on it in the graphical
editor or in the Projectsview. This opens the properties of this element in the Propertiesview.
-
7/26/2019 AIAW
7/11
2. Next flowchart object is of type Queue. This object models a queue of customers waiting for themoment they can be served. Modify the properties of the queue.
o Set queue capacity to 15 entities. At most 15 customers will wait in a queue.
o
Select the Enable statisticscheck box to turn statistics collecting for this object on.
-
7/26/2019 AIAW
8/11
3. Delayobject models the ATM that is spending some time serving the customer. Modify theproperties of the delay.
o Name the objectATM.
o Specify the processing time. Assume that processing time is triangularly distributed with mean valueof 1, min of 0.8and max value of 1.3minutes.
triangular() function is the standard AnyLogic random number generator. AnyLogic provides also
other random number distributions, like normal, poisson, exponentialetc. Please refer to
AnyLogic Helpfor the description of all the random number generators (seeAnyLogic Functions
topic).
o Select the Enable statisticscheck box.
-
7/26/2019 AIAW
9/11
4.
The last object (Sink) indicates the end of the flowchart and discards the incoming entities
Running the model
Now we have finished modeling the simplest queuing system and we are ready to run the resulting model. First,
build your model by clicking the Build Model toolbar button. If there are some errors in your model, the buildingfails and the Problems view appears listing all the errors found in your model. Double-click an error in the list to
open the location of the error and fix it.
After the model is successfully built, you can start it. Running the simulation, you automatically bring the current
model up to date.
Start the model
1.
Click the Run toolbar button and choose the experiment you want to run from the drop-down list. Yoursimulation experiment is called Bank/Simulation.
-
7/26/2019 AIAW
10/11
In the case this model is the only one opened in the workspace at the moment you will be prompted to run this
particular experiment. Later on this button will start the previously run experiment. To run any other
experiment, right-click the experiment in the Projectsview and choose Runfrom the context menu.
Having started the model, you will see the presentation window. It displays the presentation designed for your
simulation experiment.
Click the button to Run the model and switch to Main viewand observe the process dynamics. You will see
animated flowchart. Each model created with Enterprise Library instantly has animated flowchart where you can
see detailed current object status, for example queue size, number of entities left and so on completely in graphics!
If needed, adjust the execution speed to your needs using Slow downand Speed uptoolbar buttons.
You can inspect flowchart objects to get the detailed information on their current state. Click on the object to open
ts inspect window. Inspect window show statistics on the object, e.g. Queueobject's inspect shows the queue
capacity, the number of entities passed through either port of the object and also whether the timeout option is
enabled for this queue. Containsstring displays the number of entities currently being in the object along with IDsof these entities.
-
7/26/2019 AIAW
11/11
Reference model:Bank Office - Phase 1