Search code examples
anylogic

Refer to DES block in its java actions


I remember reading once that there is a syntax to access a DES block while in its java actions similar to the this and agent syntaxes. I can't seem to find the syntax anywhere and would appreciate your help. Thanks.

Regards,


Solution

  • you can use self

    check the light bulb that you can find just besides the action, you can see more about it here: https://www.benjamin-schumann.com/blog/2016/2/4/the-magic-lightbulb-and-how-it-can-help-your-anylogic-modelling

    this tells you what you can use in the action...

    so if you are inside a wait block called waitx you can ask self.size() which is equivalent to waitx.size()