我怎样根据代理属性在服务区块中拥有不同的队列位置?

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

How can I have different Queue locations in the Service Block based on the Agent property?

问题

我有一个服务块,进入该服务块的代理人有一个名为"BatteryProblem"的参数。我想要的是,如果"agent.BatteryProblem"为true,他们站在一个单独的队列中,如果"agent.BatteryProblem"为false,那些代理人站在另一个单独的队列中。挑战在于我想要只使用一个服务块来实现这一点。

我尝试过的方法:
我尝试根据代理人的"BatteryProblem"参数来设置服务块的队列位置。我提供了下面的图像,显示了我尝试过的内容,但它没有起作用。

英文:

I have a service block, and the agents entering the service block have a parameter called "BatteryProblem". What I want is, if "agent.BatteryProblem" is true, they stand in a separate queue, and if "agent.BatteryProblem" is false, those agents stand in a separate queue. The challenge is that I want to achieve this with only one service block.

What I tried:
I attempted to set the queue location of the service block based on the agent's "BatteryProblem" parameter. I have provided an image below showing what I tried, but it did not work.
我怎样根据代理属性在服务区块中拥有不同的队列位置?

答案1

得分: 1

因为该代码字段没有agent回调,始终要研究“魔术灯泡”(请参见此处)。

解决这个问题的最简单方法是在上游使用一个完整的Queue块(并将服务队列容量设置为1)。

服务块本身只是Queue、Seize、delay、release的组合。如果需要特定的功能,通常会将其分散开来。

英文:

Because that code field has no agent callback, always study the "magic lightbulb" (see here).

Easiest way to solve this is to use a full Queue block upstream (and set the service queue capacity to 1).

The Service block is itself only a combination of Queue, Seize, delay, release. You typically spread it out if you need specific capabilities

huangapple
  • 本文由 发表于 2023年6月26日 21:14:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/76557041.html
匿名

发表评论

匿名网友

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

确定