如何使用抢占抢占块 [英] How to use preempt for seize blocks

查看:33
本文介绍了如何使用抢占抢占块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在制造生产线上构建模型.目的是创建一个具有多台机器和操作员的模型.操作员在多个点被抓获以执行各种任务.但是,我要求操作员遵循一定的工作时间表并错开时间休息.因此,我在每个代理中创建了时间表来自定义他们的休息时间.

I am currently building a model on a manufacturing process line. The intention is to create a model with multiple machines and operators. An operator is seized at multiple points for performing various taskings. However, I require operators to follow a certain work schedule and go for breaks at staggered timings. As such, I have created the schedule within each agent to customise their break times.

我面临的问题是我需要操作员在休息时间暂停他/她当前的任务.因此,我一直在探索 seize 块中的抢占功能,但未能得到我所需要的.

The problem that I am faced with is I need the operator to suspend his/her current tasking whenever its time for break. Hence, I have been exploring the preempt feature within the seize block, but have failed to get what I require.

我将在下面举例说明.假设操作员正在执行receiveLot_V"的当前任务,而在此任务中,是休息时间.到了休息时间,调度触发进入流程图抢占当前算子休息(我需要捕捉每个算子休息的持续时间,同时不允许休息的算子在资源池中可用)在别处没收).

I'll illustrate an example below. Assuming that the operator is performing the current task of "receiveLot_V", while at this task, it is time for break. Upon break time, the schedule triggers to enter the flowchart to seize the current operator for break (I need to capture the duration where each operator is at break and at the same time not allow the operator at break to be available in the resource pool to be seized elsewhere).

我已经允许break的seize block具有更高的任务优先级,但是操作员只是停留在当前位置,并且在他/她被抓住后似乎没有继续进行break的流程.

I have allowed the seize block for break to have a higher task priority, however the operator just stays at the current position and does not seem to proceed with the process flow for break after he/she is being seized.

此外,对于某些任务,我会将我的操作员发送到特定节点以执行任务.当操作员移动并且休息时间到来时,我遇到了最后一张图片中显示的错误.root.pop_DirectOperators[0].enter 指的是操作员内部的进程流被捕获以进行中断,而 root.pop_Equipments[0].seizeDO.sendTo 指的是操作员被发送到特定节点执行他的操作的过程/她的任务.

In addition, for certain taskings I am sending my operator to a particular node upon seizing to perform a tasking. While the operator is moving and the breaktime hits, I face an error as shown in the last image. root.pop_DirectOperators[0].enter refers to the process flow within the operator to be seized for break, and root.pop_Equipments[0].seizeDO.sendTo refers to the process where the operator is being sent to a particular node to perform his/her tasks.

我该如何解决这个问题?我是否错误地理解了抢占功能?我已经尝试了多种设置与抢占的组合,但它们似乎都不适用于我的情况.

How can I resolve this issue? Am I understanding the preempt feature wrongly? I've tried multiple combinations of settings with the preempt but none of them seems to work for my case.

推荐答案

听起来您正在尝试使用单独的进程来表示中断,这是一种(不常见的)替代方案(见下文).该错误表明您将资源代理发送到该进程中,而不是一个代表中断请求"的虚拟代理(然后它将抓住适当的资源代理以进行中断).

It sounds like you're trying to use a separate process to represent the breaks, which is one (uncommon) alternative (see below). The error suggests you are sending the resource agent into that process instead of a dummy agent which represents the 'break request' (and which will then seize the appropriate resource agent to take its break).

对抢占式中断进行建模的典型方法是:

The typical ways of modelling pre-empting breaks are:

  • 设置由资源池属性指定的中断(确保它们比占用这些资源的代理具有更高的优先级).如果您的休息时间有固定的时间安排,这会很好用.然后在您希望受到中断抢占影响的所有 Service/Seize 块中进行抢占.

  • Set up breaks specified by the Resource Pool properties (ensuring they have a higher priority than that for agents which seize those resources). This works fine if your breaks have a fixed schedule of occurrence. Then have pre-emption occur in all Service/Seize blocks that you want to be affected by break pre-emption.

同上,但使用停机时间块来指定休息模式.在如何指定中断方面提供了更大的灵活性,但仍仅在停机时间块可以指定的范围内.

As above but use a Downtime block to specify the pattern of breaks. Gives a bit more flexibility in how breaks are specified but still only within the limits of what a Downtime block can specify.

对于完全自定义"的情况(例如,可能需要以某种方式为单个资源单元动态确定中断),使用单独的流程来导致"中断:注入代表中断请求(例如,自定义类型 BreakRequest)进入从适当池中获取适当资源的进程(这种注入可以由各个资源单元代理本身的行为驱动),以及以任何需要的方式对随后的中断进行建模(例如,只是一个简单的延迟或更复杂的东西,以确定他们的中断何时结束).您需要确保中断请求代理具有比其他任务(即流入其他 Service/Seize 块的其他代理)更高的优先级并设置为抢占.

For a completely 'custom' situation (where, for example, breaks might need to be determined dynamically for indivividual resource units in some way), use a separate process flow to 'cause' the breaks: inject agents representing the break request (so e.g., of custom type BreakRequest) into the process which seize the appropriate resource from the appropriate pool (where this injection could be driven from behaviour within the individual resource unit agents themselves), and model the ensuing break in whatever way is needed (e.g., just a plain Delay or something more complex that determines when their break will end). You need to ensure that the break request agent has a higher priority than other tasks (i.e., other agents flowing into other Service/Seize blocks) and is set to pre-empt.

需要了解的重要事项是:

The important things to understand are:

  • 您指定任务可以抢占";在块上将抢占其他任务(如果优先级更高)发生的任务(即,您在抢占者"的服务/抢占块上指定了这一点).

  • You specify "Task may preempt" on the blocks where the tasks that will pre-empt others (if higher priority) occur (i.e., you specify this on the Service/Seize blocks of the 'pre-empters').

您指定任务抢占策略";在块 将被抢占的任务发生的地方(即,您在抢占"的服务/抢占块上指定了这一点).然后,您可以选择如何处理已被踢出"的任务(代理).如果您指定无抢占"那么即使源"任务设置为抢占并且具有更高的优先级,也不会发生抢占.

You specify "Task preemption policy" on the blocks where the tasks that will be pre-empted occur (i.e., you specify this on the Service/Seize blocks for the 'pre-empted'). And then you have the specified options in terms of what to do with the task (agent) that has been 'kicked out'. If you specify "No preemption" then the pre-emption won't happen even if the 'source' task is set to pre-empt and has a higher priority.

优先级是全局的"(例如,如果您在一个特殊的中断流程捕获块中说传入代理的优先级为 100,那么它随后发送到相关资源池的捕获请求将与这些资源代理正在执行或已被要求执行的所有其他任务的优先级,由它们最初到达的任何捕获/服务块确定).

Priorities are 'global' (e.g., if you say in a special breaks process flow Seize block that the incoming agent has priority 100, then the seize request that it then sends to the relevant resource pool will be compared against the priorities of all other tasks those resource agents are doing or have been asked to do, which are determined from whatever Seize/Service block they arrived in originally).

您的屏幕截图表明您没有在正确的块上设置抢占块选项(以及可能/很可能将错误的代理发送到您的特殊休息流中);请参阅上面的信息.

Your screenshots suggest you haven't set up the pre-emption block options on the correct blocks (as well as possibly/probably sending the wrong agent into your special breaks flow); see info above.

这篇关于如何使用抢占抢占块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆