全球FlexSim系统仿真中文论坛

搜索
查看: 3318|回复: 0
打印 上一主题 下一主题

FlexSim新技术主题3_英文论坛精华翻译1

[复制链接]
跳转到指定楼层
1#
Clay666 发表于 2019-6-17 09:00:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
CoordinatedTask Sequences in Process Flow
基于PF模块的协同任务序列
One ofthe most powerful features of Process Flow is the ability to easily define aTask Sequence. However, many real-life situations require the coordination ofmultiple workers and machines to do a single task. This article demonstratesone approach you can use with Process Flow to coordinate multiple TaskExecuters, or in other words, to create a coordinated task sequence.
PF模块一个很重要的特征就是能够非常简单的定义一个任务序列。但是实际生活中的很多情况要求协同是由很多工人和机器执行一个简单任务。本文演示了一种使用PF模块来定义多个协同任务执行器的方法,或者说创建一个协同任务序列。
Thisarticle talks about an example model (handoff.fsm). It might be easiest to openthat model, watch it run, and perhaps read this article with the model open.
本文讨论的案例为handoff.fsm。强烈建议在阅读下文前打开此模型运行并观察其机制。

1 _1 Z7 {) U7 A1 M& U. e( ]
Itemsenter the system on the left. The yellow operator must carry each item to thequeue in the middle, and then wait for the purple operator to arrive. Once thetwo operators are both at the middle queue, then the yellow operator can unloadthe box, and the purple operator can take it. After this point, the yellowoperator is free to load another item from the left queue. The purple operatortakes the item, waits for a while, and then puts the item in the sink on theright.
临时实体由左侧进入系统。黄色操作员每次搬运一个临时实体至中间的缓存区等待紫色操作员来接力搬运此货物。一旦两个操作员都位于中间的缓存区,那么黄色操作员执行卸载货物至紫色操作员,然后释放黄色操作员继续其它任务。紫色操作员拿起此货物后,等待一会后将货物搬运至右侧的沉默区。
Theinteresting part of this model is the hand off. The yellow operator must waitfor the purple operator, and vice versa. This is the synchronization point, andit requires coordination of both operators.
本模型最有趣的地方在于两个操作员之间的接力。黄色操作员必须等待紫色操作员,反之亦是如此。这就需要一个同步点以实现两个操作员之间的协同作业。
Inaddition to to the 3D layout shown previously, there are 5 process flows in theexample model. The first is a general flow, and defines the logic for eachtask. The second is a Task Executor flow, and defines the logic for the yellowoperator. The third is also a Task Executor flow, and defines the logic for thepurple operator. The remaining two flows are synchronization flows, forsynchronizing between the other three flows.
在本范例工程中,除了三维布置的模型之外,还有工艺流程图。第一个工艺流程图是一个概览,其定义了每个任务的逻辑。第二个是任务执行流程,定义了黄色操作员的逻辑。第三个工艺流程图也是任务执行流程,其定义了紫色操作员的逻辑。剩余的两个工艺流程是同步流程,用于同步前面提到的三个流程。
Synchronizing ona Task/同步任务
, Y, A2 S# J, ]: e  V' B6 Y$ C
Thebasic approach in this model uses the Synchronize activity. This activity waitsfor one token from each incoming connector, before it allows any of the tokensto move on. Here is the Yellow Purple Sync flow (a global Sub Flow) from theexample model:
' u$ Y; g  e7 x6 j
本模型中的基本方法就是使用同步流程。此流程需要等待每个token都到达,然后才能允许token的继续往下一步移动。下图所示为同步黄色和紫色操作员的流程(运用了全局子流程)。

6 j- ]! V& B- r! ]
Theflows for the yellow and purple operators each use the Run Sub Flow activity tosend a token to this flow, to their respective start activities (you can usethe sampler on the Run Sub Flow activity to sample a specific start activity ina sub flow). This is what allows both the yellow and purple operators to waitfor each other.
黄色和紫色操作员都采用子任务流程来给本流程发送token,其各自独立活动(你可以运用子流程活动中的采集器来采集子流程中的特定活动)。这也就允许了黄色和紫色操作员之间的互相等待。
In theexample model, this kind of synchronization happens between operators, and ithappens between each task and an operator. Basically, the task must wait forthe operator to finish that operator's part.

1 K- g8 i/ l4 A# g: d0 Q* b) j
在本案例模型中,这种同步不仅发生在操作员之间,还发生在每个任务和操作员之间。基本上任务需要等待操作员完成其手头现有任务。

" N) Z2 m5 i' z9 I" R: M
The Task Flow/任务流程

" w* I' ?! N8 s0 f8 D
A tasktoken is created every time an item enters the first queue. The tasks flow putsthat task on both the Yellow and Purple lists. In both cases, the task tokendoes not wait to be pulled, but keeps itself on the list. Then, the task tokenwaits for a yellow operator to finish with it, and then for the purple operatorto finish with it. There is a zone in this flow, but its only purpose it togather statistics for how long the whole task took.
当临时实体即货物每次进入第一个暂存区时就会创建一个任务token。任务流程将任务推送至黄色和紫色列表。任务token不会被拉出二十保持在列表中。然后任务token等待黄色操作员来完成它,然后紫色操作员来接力完成。在本流程中采用了区域模块,但是其仅用来采集整个任务总的完成时间。

3 Y7 y% J1 J' Q: S5 s
The Yellow andPurple Flows黄色和紫色流程
2 i% z+ `! V% ^; }8 u( }7 u
Theseflows are easiest to understand when viewed side by side:
这些流程在两者一起观察的话就非常容易理解:

, `9 g$ [! W1 {/ j
Recallthat each task is put on both the Yellow and Purple lists at the exact samemodel time. The yellow operator waits to get a task (at the Get Task activity).Then the operator travels to the first queue, gets the item, and travels to thesecond queue. At this point, the yellow operator waits.
每个任务流程都在同步模型时间启动。黄色操作员等待任务,然后其行走至第一个缓存区,拿起实体,然后走到第二个缓存区然后等待紫色操作员。
At thesame time, the purple operator is also waiting for the task. The purpleoperator just has to travel to the second queue before waiting for the yellow.Once the yellow operator arrives, the purple operator also has to wait for theyellow operator to unload the box. On the yellow side, once the purple operatorarrives, the yellow operator unloads the box, and then synchronizes with thepurple operator, allowing the purple operator to load the box.
同时,紫色操作员也在等待任务。紫色操作员首先行走至第二个缓存区等待黄色操作员。一旦黄色操作员达到,紫色操作员继续等待黄色操作员卸载货物。而对于黄色操作员,一旦紫色操作员到达,他就开始卸载货物,在与紫色操作员同步后,就允许紫色操作员装载货物。
Summary小结:
Thepurpose of this article is to show one method for synchronizing token inseparate flows. That method is as follows:
l  Have a token for each task.
l  As each task executor (or fixed resource) needs to synchronize, theyeach use a Run Sub Flow activity, putting the token in a specific Startactivity.
l  The Sub Flow (a global Sub Flow) has a synchronize activity, thatrequires a token from each participant for that task before releasing thetokens.
本文的目的是给大家演示了一个同步不同的流程中的token的方法,此方法如下:
l  每个任务有个单独的token;
l  每个任务执行器(或者固定资源)需要同步,他们独自需要一个子工艺流程,并将token放置于一个特定的启动活动;
l  子流程(全局子流程)有同步活动,他们在释放token之前需要来自每个参与者的token以执行该任务。
This is certainlynot the only way to create this model. However, there are some advantages:
l  By forcing the task to synchronize, you can gather stats on how longeach phase of the task took, as well as how long the complete task took.
l  You can add more yellow or purple operators by copy/paste. Theysimply follow their own logic
l  Each set of logic is separated; tasks, yellow operators, and purpleoperators each have their own flows, making each one much simpler.
这并不是唯一的一种实现方法,但是其优点如下:
l  通过强制任务同步,你能收集到任务在每个执行阶段的状态,以及完成任务需要的总的时间;
l  通过简单地复制粘贴能够增加更多的黄色和紫色操作员。他们都遵循自己的逻辑;
l  每套逻辑都是单独,不论是黄色或者紫色操作员,或者是相同颜色的操作员之间,使每个操作员的逻辑都很简单。
Theexact approach used in the example model will not work exactly as it is foreach model. However, you can apply the general principles, and adapt them to yourown situation.

9 S. u: O3 P( i
实例模型中所演示的案例方法也许不适用于所有的模型,但是你可以应用其通用原则,并根据自己的情况进行调整。
4 `( F6 ]; P) {
[url=]5078-handoff.fsm[/url]

2 j: V: |0 n- N0 Y

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

评分

参与人数 1威望 +10 收起 理由
shiny0801 + 10 很赞,楼主把美国论坛上的好的案例搬运并翻.

查看全部评分

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|全球FlexSim系统仿真中文论坛 ( 京ICP备14043114号-2 )

GMT+8, 2025-5-9 10:22 , Processed in 0.064216 second(s), 15 queries .

Powered by Discuz! X3.3© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表