【问题标题】:Get the current Object in its own properties - Anylogic在自己的属性中获取当前对象 - Anylogic
【发布时间】:2021-07-04 04:22:17
【问题描述】:

如何在自己的属性中获取当前选中的对象?

在下面的示例中,我想将当前选择的 StopLine 发送到每个车辆通行证的函数。

使用 this 函数只返回父对象 - main。

我希望有一个简单的函数来返回对象,而不必直接输入当前对象。

谢谢,

【问题讨论】:

    标签: java anylogic


    【解决方案1】:

    您需要使用“自我”。对于此类问题,灯泡是您最好的朋友。参考以下文章:

    https://www.benjamin-schumann.com/blog/2016/2/4/the-magic-lightbulb-and-how-it-can-help-your-anylogic-modelling

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-08
      相关资源
      最近更新 更多