Anylogic:如何在Anylogic 8.0中同时将多个代理(作业)添加到一个资源中?

huangapple go评论59阅读模式
英文:

Anylogic: How can I add multiple agents (jobs) to one resource at the same time in Anylogic 8.0?

问题

我正在尝试将不同的任务添加到一台机器上,而我不能使用批处理,因为这些任务是根据不同的条件分组的。因此,我希望根据条件将任务添加到一个资源,然后再将它们添加到机器上,这就要求该资源能够同时接受多个任务。

英文:

I am trying to add different jobs to one machine and I cannot use batch because the jobs are grouped based on different conditions. So I want to add the jobs to a resource based on the conditions and then add them to machines, which requires the resource to accept multiple jobs at the same time.

答案1

得分: 0

这不是 AnyLogic 中资源工作的方式。单独的作业(=代理)会独自占用资源。因此,一个代理可以占用多个资源,但一个资源在同一时间内只能为一个代理工作!

因此,您可以手动预先将代理根据条件分组在一起(无需使用批处理,您可以根据条件自行手动分组)。

或者,您可以使用自定义资源代理以及自己的调度/分配/计划逻辑来替换资源(以及所有相关的占用、释放、服务块)。

英文:

this is not how resources work in AnyLogic. Individual jobs (=agents) seize resources for themselves. So 1 agent can seize several resources but 1 resource always works on 1 agent only at the same time!

So either you pre-group your agents together manually (no need to use batch, you can group them manually yourself based on your conditions).

Or you replace resources (and all related seize,release,service blocks) with your own custom resource agents and your own scheduling/assignment/planning logic.

huangapple
  • 本文由 发表于 2020年10月17日 00:37:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/64393151.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定