您可以将两个单独的流程图与一个限制区域相连吗? [英] Can you connect 2 separate flowcharts with one restricted area?
问题描述
我们的模型有一个ProductionOrder抓住了一些操作员.检举模块具有准备流程图,供操作员通过气闸(PAL)进入房间.在ProductionOrder操作(延迟块)执行之后,操作员将被释放并具有总结"流程图,该流程图可通过相同的气闸室将其发送到房间外.由于此气闸只能有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));
然后就可以了:)
这篇关于您可以将两个单独的流程图与一个限制区域相连吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!