Professional Documents
Culture Documents
INTRODUCTION TO ANYLOGIC
1
IE 603: Discrete Event System Simulation IIT Bombay
Open AnyLogic software. Go to menu, File >> New>> Model. In the dialog
that opens, given model name as FirstModel. Note the location where the files
are stored. Click Next. Select Start creating a new model from scratch (blank
canvas) option. Click Finish.
AnyLogic Model Building Environment will open.
o Graphical editor (at the center) is where you build your simulation model.
o The Projects view (on the left side) provides access to models currently
opened in the workspace.
o The Palette view (on the right) provides list of model elements grouped by
categories.
o The Properties view (at the bottom) is used to view and modify the properties
of currently selected model item(s).
Graphical editor
Project view
or
area Palettes.
Model Workspace
Enterprise Library
is at the bottom
Properties view
area
and others..
Connect them as shown in the figure below. To connect them double click on the
squares in the figure (the squares are called as ports) then drag click on the next
block to join them
2
IE 603: Discrete Event System Simulation IIT Bombay
3
IE 603: Discrete Event System Simulation IIT Bombay
4
IE 603: Discrete Event System Simulation IIT Bombay
Person
entity
Polyline
queue Oval
resource
Run the model, as per the step given earlier, to view the animations
When the model is run, you will see that the Average Number in queue and
Utilization statistics are collected by default!
5
IE 603: Discrete Event System Simulation IIT Bombay
6
IE 603: Discrete Event System Simulation IIT Bombay
Customers get frustrated after waiting in queue for sometime, and leave. How
to model this?
o Suppose customers wait time tolerance threshold is about 4 to 8 minutes. If
their actual wait time is more than their threshold (they are not serviced by
then), then they will leave the queue (and perhaps come some other time).
To model this:
Go to Properties of ATMQueue:
Tick Enable exit on timeout
Enter Timeout as uniform(4, 8)
From Enterprise Library palette, drag & drop another Sink module
near queue.
Connect the port marked T to the new Sink module
7
IE 603: Discrete Event System Simulation IIT Bombay
o RUN your model again to observe what happens The new sink module
counts the number of customers who leave frustrated as their wait time is
too long.
How do I get the same result each time I run the model?
Now, you must have seen that each time you run the model you are getting
different results. To get reproducible results we need to use the same set of
random numbers. To do this.
o In the Projects view (left side panel), click on Simulation:Main. Now, in
the Properties view, click General. In that choose Fixed seed.
o Now, run the model repeatedly. You will get the same results and the
results should also match with that got by your friend working on other
computer!
If we have TWO ATMs to service the customers, how much will it reduce the
waiting time? % of customers who leave without using ATM? How are the
ATMs utilizations?
o Run the existing model. Note down the results.
o To model above scenario of 2 ATMS, we need to increase resource
capacity to 2!
Open ATM (DELAY) block. Change Capacity to 2
o Run and compare results with single ATM case.
o Do we need to use Random seed or Fixed Seed when we run the
models?