How to schedule, trigger static
event
Become an AnyLogic Expert Step by Step
About me
khoi.tran@simbean.com 2
My name is Khoi Tran and I’m living in beautiful Stuttgart, Germany.
As a 12-years expert...
Learning subjects
khoi.tran@simbean.com 3
In this example you can learn,
• How to create different kind of events.
• Stati...
Create a static events
khoi.tran@simbean.com 4
Drag & drop all the
elements and rename
them
Schedule static event with “Occurs once“
khoi.tran@simbean.com 5
Set trigger type on
“Time out“ and mode
on “Occurs once“
...
Schedule static event with “Occurs once“
khoi.tran@simbean.com 6
Set variable type on
“boolean“ and initial
value on false
Schedule static event with “User control“
khoi.tran@simbean.com 7
Set trigger type on “Time
out“ and mode on “User
mode“
S...
Schedule static event with “User control“
khoi.tran@simbean.com 8
Start the event
For mode “User control“ you need to defi...
Schedule static event with “Cyclic“
khoi.tran@simbean.com 9
Set event mode
on “Cyclic“
The the first
occurence, event
star...
Schedule static event with “Rate“
khoi.tran@simbean.com 10
Create dynamic events,
Value 10 is the trigger time
The value o...
Schedule static event with “Condition“
khoi.tran@simbean.com 11
When this condition is true,
the event is triggered
Rememb...
Run the model
khoi.tran@simbean.com
Click on the run button and
choose the simulation
12
1. You can run the model and see ...
Thank You
khoi.tran@simbean.com 13
IF YOU HAVE ANY QUESTION, IDEA, FEEDBACK or FIND ANY MISTAKE,
PLEASE SEND ME an EMAIL
k...
Upcoming SlideShare
Loading in …5
×

AnyLogic - Free AnyLogic basic lessions - Learning AnyLogic by examples -- Demo schedule trigger event

898 views

Published on

Free AnyLogic basic lessions - Learning AnyLogic by examples is made by Khoi Tran.

In this example you can learn, how to trigger and schedule events in AnyLogic

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
898
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

AnyLogic - Free AnyLogic basic lessions - Learning AnyLogic by examples -- Demo schedule trigger event

  1. 1. How to schedule, trigger static event Become an AnyLogic Expert Step by Step
  2. 2. About me khoi.tran@simbean.com 2 My name is Khoi Tran and I’m living in beautiful Stuttgart, Germany. As a 12-years expert in the software industry and 6-years expert in simulation with AnyLogic, I would like to share my experiences with you on a simple and fast path.
  3. 3. Learning subjects khoi.tran@simbean.com 3 In this example you can learn, • How to create different kind of events. • Static events • Dynamic events You can see the demo in action first http://simbean.com/en/knowhow/become-an-anylogic-expert.html If you like to know, how I built this model, this presentation may help you.
  4. 4. Create a static events khoi.tran@simbean.com 4 Drag & drop all the elements and rename them
  5. 5. Schedule static event with “Occurs once“ khoi.tran@simbean.com 5 Set trigger type on “Time out“ and mode on “Occurs once“ Absolute time for scheduling the trigger Show the message on the console and set the variable on true, when the event is triggered This event is triggered only once, event starts at the begin of model run.
  6. 6. Schedule static event with “Occurs once“ khoi.tran@simbean.com 6 Set variable type on “boolean“ and initial value on false
  7. 7. Schedule static event with “User control“ khoi.tran@simbean.com 7 Set trigger type on “Time out“ and mode on “User mode“ Show the message on the console For mode “User control“ you need to define the event start.
  8. 8. Schedule static event with “User control“ khoi.tran@simbean.com 8 Start the event For mode “User control“ you need to define the event start. You can define the event start e.g. In the startup code block of the active object.
  9. 9. Schedule static event with “Cyclic“ khoi.tran@simbean.com 9 Set event mode on “Cyclic“ The the first occurence, event starts right at the begin of model run After every event trigger, this event is rescheduled for the same value This event never stops, otherwise you have to stop or suspend it explixitely. The message will be shown on the console every 5 time units.
  10. 10. Schedule static event with “Rate“ khoi.tran@simbean.com 10 Create dynamic events, Value 10 is the trigger time The value of rate defines how many times the event will occure. If the rate e.g. is 10, the event will occure 10 times per time unit. For rate = 0.1 the event occures one time per 10 time units. The interarrival time is calculated by the exponential distributed function. The mean of this function is exactly 1/rate, for rate = 0.1 => mean = 1/0.1 = 10 To see this histogram, you need to run the model with maximum speed
  11. 11. Schedule static event with “Condition“ khoi.tran@simbean.com 11 When this condition is true, the event is triggered Remember: We already set this variable in the action of the event “eventTimeoutOccursOnce“. This means, when the action is executed by the “eventTimeoutOccursOnce“, our „eventCondition“ is triggered, too.
  12. 12. Run the model khoi.tran@simbean.com Click on the run button and choose the simulation 12 1. You can run the model and see the result 2. Try to change or set properties to see some small effects e.g. 1. Change the absolute time for the static events. 2. Change the rate of the eventRate to understand the histogram. 3. You need to restart the model to see the effects
  13. 13. Thank You khoi.tran@simbean.com 13 IF YOU HAVE ANY QUESTION, IDEA, FEEDBACK or FIND ANY MISTAKE, PLEASE SEND ME an EMAIL khoi.tran@simbean.com BECAUSE I WOULD LIKE to IMPROVE this SLIDE CONTINUOUSLY. I APPRECIATE a lot YOUR TIME.

×