AnyLogic:如何在 anylogic 中引用延迟块中的代理

AnyLogic: How to refer to an agent in a delay block in anylogic

我正在 AnyLogic 中构建 DES-ABM 混合模型。 代理经过DES块,其中有多个Delay块。

我怎么

  1. 访问处于延迟块中的代理 或者最好
  2. 访问触发延迟块'on enter'动作的特定代理?

我的最终目标是打开或关闭代理框架上的阀门对象 我也可以/我怎么办 A. 直接从 main/root 帧(延迟块所在的帧)打开或关闭代理帧上的阀 或者如果那不可能 B. 在特定代理中发送消息或触发状态图,然后从代理自己的框架打开或关闭阀门?

我尝试使用 'DelayBlockName'.agents() 函数,但这不起作用,returns [] 当我使用 traceln 检查它时。

access an agent which is in a Delay block or peferrably

使用关键字agent。这些关键字因不同的库块而不同,因此最好开始了解灯泡及其如何提供帮助,请参阅 here

acces the specific agent which triggered the 'on enter' action of the delay block?

当您在“On enter”块中写入 agent. 时,每个通过的代理都会执行该代码,因此根据定义,它始终是特定代理:)

My ultimate goal is to open or close a valve object on the agent frame So can I/ how do I A. open or close the valve on the agent frame directly form the main/root frame (on which the Delay block is located) or if that is not possible B. send a message or trigger a statechart within the specific agent which will then open or close the valve from the agent's own frame?

这与您原来的问题完全不同,而且……很乱。请将问题限制为 1 个主题,以便我们轻松回答:)(有关更多信息,请参阅 this guide