无法访问任何逻辑的消息发件人

问题描述 投票:0回答:1

我正在尝试访问消息的发送者(发送者是个人代理),以评估发送者和接收者之间的连接,作为过渡的条件。在anylogic帮助中,它说您可以使用msg访问有效的消息内容,并使用sender访问发件人。

我尝试使用sender = msgSender

其中msgSender是变量。但是我收到错误消息sender cannot be resolved to a variable

message anylogic
1个回答
0
投票

将消息发送到Link to agent对象,而不是直接发送到状态图。

如果您的消息通过Link to agent块(例如默认的称为connections的块)到达,则可以访问发件人,请参见下文:enter image description here

在其中,您可以决定将消息转发到状态图(如果发送者是正确的)。

© www.soinside.com 2019 - 2024. All rights reserved.