• Like
  • Save
AnyLogic - Free AnyLogic basic lessions - Learning AnyLogic by examples - Demo accessRootObject
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

AnyLogic - Free AnyLogic basic lessions - Learning AnyLogic by examples - Demo accessRootObject

  • 3,876 views
Published

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

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

In this example you can learn, how to access the root object from another active object.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,876
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Become an AnyLogic Expert Step by Step
    How to access a root active object
  • 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. About me
    khoi.tran@simbean.com
    3
    In this example you can learn,
    • how to access the root object from another active object.
  • Create a new model
    khoi.tran@simbean.com
    4
    Write the name of the model e.g. „DemoRootAccessControl“
    Choose menu item „Model“
    Right mouse click on the Project area, e.g. At the the point of this pointer
    Create a new model
  • 4. Create an active object
    khoi.tran@simbean.com
    5
    • Right mouse click on the project
    • 5. Choose this menu item
    Write „SpeedControl“ instead of „MyClass“
    Create an active object called “SpeedControl” in the model project
  • 6. Insert a control object to an active object
    khoi.tran@simbean.com
    6
    Choose Control tab on the palette on the right side
    Drag and drop the Slider on the Graphical editor of the active object
    Drag & drop the slider onto the graghical editor
  • 7. Set properties for control object „slider“
    khoi.tran@simbean.com
    7
    Enable the “icon” checkbox
    Set Maximum value to 300
  • 8. Create Object from Enterprise Library and its connections
    khoi.tran@simbean.com
    8
    Drag & drop elements from Enterprise Library
    Drag & drop elements from Enterprise Library
    Drag & drop elements from Enterprise Library
    Drag & drop elements from the Enterprise Library
    • Double click on the source
    • 9. Then move mouse to the queue
    • 10. Click on the queue
  • Draw Polyline
    khoi.tran@simbean.com
    9
    Drag & drop polyline
    Draw three polyline
    You can make double click on the polyline to add more point
    Then you can move each point to get the right figure
  • 11. Set properties for polyline
    khoi.tran@simbean.com
    10
    • Choose the middle polyline
    • 12. Choose Properties, then “Dynamic” Tab
    • 13. Set Visible on “false”
    • 14. Choose the middle polyline
    • 15. Choose Properties, then “Dynamic” Tab
    • 16. Set Visible on “false”
    • 17. Choose the middle polyline
    • 18. Choose Properties, then “Dynamic” Tab
    • 19. Set Visible on “false”
  • Create shape and shape group
    khoi.tran@simbean.com
    Draw the car picture with many polyline and ovals
    11
    • Select all shape elements by range select
    • 20. Right mouse click on all selected element
    • 21. Select “Create a group”
    Rename the picture group to “groupCar”
  • 22. Set properties for „source“
    khoi.tran@simbean.com
    12
    Write “groupCar” for the entity animation shape
    Set the unique shape for each entity
  • 23. Create embedded active object
    khoi.tran@simbean.com
    Drag & drop the “SpeedControl” active object onto the graphical editor of the “Main” active object
    13
  • 24. Code for changing the conveyor behaviour in „Main“ or so called „Root“ active object
    khoi.tran@simbean.com
    14
    Write this two lines of code in “Action” property
    Click on the “SpeedControl” active object to get back to the graphical editor
    Put the two lines of code
    Main main = ((Main)getEngine().getRoot());
    main.conveyor.set_speed(value);
  • 25. Run the model
    khoi.tran@simbean.com
    Click on the run button and choose the simulation
    15
    You can run the model and see the result
    Try to change or set properties to see some small effect e.g.
    Where the property is put on “false”, you can turn it on with “true”.
    Set and unset the checkboxes.
    You need to restart the model to see the effects
  • 26. Thank You
    khoi.tran@simbean.com
    16
    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.