您可以将 2 个单独的流程图与一个限制区域连接起来吗? [英] Can you connect 2 separate flowcharts with one restricted area?

查看:32
本文介绍了您可以将 2 个单独的流程图与一个限制区域连接起来吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的模型有一个 ProductionOrder 抓住一些 Operator.占领区有一个准备流程图,供操作员通过气闸 (PAL) 进入房间.在 ProductionOrder 操作(一个延迟块)之后,操作员被释放并有一个总结流程图,通过同一个气闸将他们送出房间.因为这个气闸只能有2人,所以我们需要将Prepare和Wrap-up流程图中的组合操作员限制在气闸中的2人,无论他们进出还是最多2人(即任何时候最多2人).

Our model has a ProductionOrder seize some Operators. The seize block has a Prepare flowchart for the Operators to move through an airlock (PAL) into a room. After the ProductionOrder operation (a delay block), the Operators are released and have a Wrap-Up flowchart that sends them out of the room through the same airlock. Because this airlock can only have 2 people, we need to restrict the combined Operators in the Prepare and Wrap-up flowcharts to 2 people in the airlock regardless of them coming in or going out (i.e. max 2 at any time).

如果我们通过将块与连接器连接来做到这一点,则会出现一个错误,基本上是说您无法将准备流程图连接到总结流程图.

If we do this by connecting the blocks with connectors, an error comes up basically saying you can't connect a Prepare flowchart to a Wrap-up flowchart.

有没有办法把圈起来的队列和禁区起跑区联系起来?

Is there a way to link the circled queues and restricted area start blocks?

推荐答案

使用等待块代替队列 (PALqueue)(在两个流中)

Instead of using a queue (PALqueue) use a wait block there (in both flows)

而且你可以在每个等待块 PALqueue 的 on enter 中做:

And you can do in the on enter of each wait block PALqueue:

if(PALCapacityLimit.entitiesInside()+PALCapacityLimit1.entitiesInside()<2){
    self.free(agent);
}

并且在 PalInLimit 的上面(两者)

And in the on onter of the PalInLimit (both)

if(PALqueue.size()>0)
PALqueue.free(PALqueue.get(0)); //remember now PALqueue is a wait block
else if(PALqueue1.size()>0)
PALqueue1.free(PALqueue1.get(0));

然后你去:)

这篇关于您可以将 2 个单独的流程图与一个限制区域连接起来吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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