resource-agent-allocation 的正确使用

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

correct use of resource-agent-allocation

问题

我的问题是我有三种不同类型的“代理”,可以由三种不同的“资源”进行运输。

现在我不确定如何在AnyLogic中最好地实现这一点。

我的第一个想法是在“Seize”块的“Action”中分配此规则。然而,我在这个方法上没有取得进展。

第一选项

我的第二个想法是使用“Output”块进行案例区分。每个路径都是为特定资源而设的。

第二选项

函数

选择输出

然而,在这里我收到了一个错误消息:模型启动期间出现错误:

root.selectOutputOut:
未指定参数selectOutputIn(null/empty)。

这可能是因为我没有选择特定的代理而引起的问题。然而,这也是不可能的,因为我有三种不同的代理进入。

另一个考虑因素是,在代理被创建之后,为每个资源生成一个单独的任务列表,可以在分配后执行并从本地列表中删除。这似乎更加复杂,我还没有找到实现这一点的方法。

是否有人有建议的解决方案,可以告诉我如何最好地定义这个规则?

正如您所看到的,我尝试了几种方法来解决问题,但都没有成功。

英文:

My problem is that I have three different types of "agents "that can be transported by three different "resources".

Now I am not sure how best to implement this in AnyLogic.

My first thought was to assign this rule in the Seize block at "Action". However, I did not get further with this approach.

first option

My second thought was to make a case distinction using the Output block. Each path is for a specific resource.

second option

function

Select Output

However, I get an error message here: Error during model startup:

root.selectOutputOut:
Parameter selectOutputIn is not specified (null/empty).

This is probably the problem that I have not selected a specific agent. However, this is also not possible since I have three different agents coming in.

Another consideration is that after the agents are created, a separate list is generated for each resource with the tasks that can be executed and deleted from the local list after assignment. This seemed even more complicated and I have not found an approach to implement this.

Does anyone have a suggested solution as to how I best go about defining this rule?

As you can see I tried several ways to fix it but it did not work.

答案1

得分: 1

始终仔细阅读错误消息。您当前的问题就是这样:您没有定义SelectOutPutIn块。

resource-agent-allocation 的正确使用

在AnyLogic中,解决问题通常有多种正确的方法。我认为在您的情况下,正确使用这些SelectOutput块可能是其中之一。

英文:

Always read your error messages carefully. Your current problem is just that: you did not define the SelectOutPutIn block

resource-agent-allocation 的正确使用

Most of the time there are multiple correct ways to approach a problem in AnyLogic. I think in your case using these SelectOutput blocks correctly could be one of them.

huangapple
  • 本文由 发表于 2023年5月24日 22:07:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76324457.html
匿名

发表评论

匿名网友

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

确定