我正在实施 Anylogic 7.3.1 的银行办公室样本。我在源代码块中创建了 20 个代理。当任何代理进入源时,我想分配代理 ID。我为此编写了这段代码。
agent.enteredSystem = time();
if(agent.enteredSystem > 0)
{
if(count <100)
{
String customerId = "CId-";
customerId = customerId + count;
count++;
}
}
有一个客户类,我已将 enterSystem 变量声明为 double。count 是在主类的图形编辑器中声明的静态变量。
我想将此 customerId 移动到队列块,然后延迟,但是当我将其写入文本文件时。customerId 有重复。帮我。提前致谢..