如何在任何时候循环浏览批处理的代理商?

发布于 2025-02-06 01:49:13 字数 306 浏览 0 评论 0原文

我在模拟模型中有批处理和联合国批处理逻辑。我正在收集有关代理人人群的统计数据,在我的情况下,这是“ Myagent”。但是看起来它忽略了批处理状态的代理。如何获得批处理代理的属性?我想通过批次循环,以获取哪些代理在任何时间点都被批准。

-d “

I am having a batching and un batching logic in my simulation model. I am collecting statistics on agent population which in my case is "MyAgent". But looks like it is ignoring the agents which are in Batch State. How can I get the agent's properties which are batched ? I want to loop through Batch to get which agents are batched at any point in time.

-Denter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鲜肉鲜肉永远不皱 2025-02-13 01:49:13

要访问批处理中的代理,您可以使用cottents()。添加批处理的自定义总体(并在其中添加新批次 - 请参见下图),假设您将其称为batchTypes,然后循环循环浏览批处理的代理,您可以编写以下内容:

for( BatchType b : batchTypes) {
  for(int i = 0 ; i < b.contents().size() ; i++) {
    b.contents().get(i);
  }
}

To access the agents inside a batch, you can use contents(). Add a custom population for the batches (and add the new batches to it - see image below), let's say you call it batchTypes, then to loop through the batched agents, you write the following:

for( BatchType b : batchTypes) {
  for(int i = 0 ; i < b.contents().size() ; i++) {
    b.contents().get(i);
  }
}

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文