百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术文章 > 正文

Flexsim案例十二|AGV分布模型构建

haoteby 2025-04-06 16:10 28 浏览

建立模型

1.新建一个模型。

2.使用直线路径创建工具,创建四条逆时针方向的直线路径。并确保两条直线路径之间留有创建弯曲路径的间隔。

注意:路径方向非常重要。默认状态下,创建的路径都是单向路径。如果你的模型不能正常运行,那么很可能是因为没有正确的创建路径方向导致的。在这个模型当中,我们创建了一个沿逆时针方向的闭环。您可以查看每一条路径上的箭头以明确它的方向。

3.使用衔接工具将四条直线路径平滑衔接。再一次确认路径是否沿逆时针方向。

4.在闭环路径的底部添加一个发生器,顶部添加一个吸收器,并在它们之间创建一个A连接。

5.在实体库中,在底部路径并靠近发生器的位置拖入一个决策点。使用A连接将决策点与发生器相连。

6.在顶部路径靠近吸收器的位置创建第二个决策点,并建立决策点与吸收器之间的A连接。

7.从实体库中拖入两个任务执行器。

8.向模型中拖入一个分配器,并建立分配器与任务执行器之间的A连接。

9.红选两个AGV并将它们与吸收器附近的决策点进行A连接,在弹出的菜单中选择TravelerAGV。这会使得AGV在建立好的路径上去完成行进任务。

10.在发生器中选择使用运输工具。并在发生器和分配器之间创建S连接。

运行模型

重置并运行模型

可以看到其中一个任务执行器行进至发生器,装载临时实体,然后模型就出现了一个“死锁”的消息。

决策点的分派

这个模型反映了AGV模块与传统flexsim行进网络在逻辑上的最大区别。AGV系统的前向搜索机制更加复杂。AGV在行进过程中会一直寻找该路径上的下一个决策点,去分配或请求。如果一辆AGV不能请求到下一个决策点,那么它就会停在前一个决策点。这个停止距离可能会跨越多个路径区段。

死锁

这个模型包含了一个死锁状态。第一辆AGV请求吸收器处的决策点,而这个决策点正被第二辆AGV请求。然而第二辆AGV将要请求的发生器附近的决策点却正被第一辆请求。这种类型的死锁被称之为循环等待,因为分派或者分派请求陷入了一种彼此循环等待的状态。死锁将会是构建AGV系统时常常会遇到的情况。而避免死锁正是在设计过程中去模拟的重要原因。

Flexsim提供了一个自动探测死锁的功能,而且这个功能默认处在开启状态。您可以通过右键AGV路径或决策点,选择AGVNetworkProperties,切到常规选项卡,勾选或取消检测死锁,然后单击确定关闭对话框。

检测死锁的功能在调试阶段非常有用,但是由于它需要额外的计算,您可能需要在模型建立完毕时关闭这个功能使得模型能够更流畅的运行。

如何解决死锁问题

有几种策略可以来解决AGV系统当中的死锁问题。在这个案例当中只需添加一个额外的决策点。这种做法增加了系统中的潜在停留点,可以使AGV不必去请求一个阻塞的决策点。

1.在左侧和右侧的路径上各添加一个决策点。

2.重置并运行模型

现在AGV就不会再陷入死锁了。

决策点的取消分派

由于模型具备了新的结构,AGV不再会陷入死锁。但您可能会发现它们仍然有时会彼此等待。这种情况是由于决策点分派和取消分派的机制导致的,具体说来就是决策点的取消分派类型。默认的设定是非常保守的,即在AGV到达下一个决策点时才取消上一个决策点的分派。这会从本质上导致两个决策点之间的间隔在AGV正在行进时被保留。您可以修改这个设置。

1.红选在模型中所有的决策点。如果您还红选了决策点之外的其他实体是没有影响的。所以可以简单的框选所有实体。

2.单击任意一个决策点。

3.在右侧的快捷属性窗口中,在取消分派类型中,选择DeallocateWhenPastCurrent。

4.选择下拉框相应的选项,这会在所有的决策点中应用更改。

5.重置并运行模型。

现在AGV不会再彼此等待了。

取消分派类型

基本的AGV模型默认有两种分派类型。它们是到达下一决策点时取消分派和经过当前决策点时取消分派。您可以对这些类型在AGVNetworkProperties窗口中进行重新的配置或者添加您自定义的类型

Modeling

1. Create a new model.

2. Using the Straight Path Creation Tool, create four straight, counterclockwise paths. And make sure there is space between the two straight paths to create a curved path.

Note: Path direction is very important. By default, the paths created are all one-way paths. If your model doesn't work, it's most likely caused by not creating the correct path direction. In this model, we create a closed loop in a counterclockwise direction. You can look at the arrows on each path to determine its direction.

3. Use the join tool to join the four straight paths smoothly. Again, confirm that the path is in a counter-clockwise direction.

4. Add a generator at the bottom of the closed loop path and an absorber at the top and create an A connection between them.

5. In the Entity Library, drag in a decision point on the bottom path and near the generator. Use an A connection to connect the decision point to the generator.

6. Create a second decision point on the top path close to the absorber and establish an A connection between the decision point and the absorber.

7. Drag in two task executors from the entity library.

8. Drag a dispatcher into the model and establish an A connection between the dispatcher and the task executor.

9. Red-select two AGVs and connect them with the decision point near the absorber, and select TravelerAGV in the pop-up menu. This will allow the AGV to complete the travel task on the established path.

10. Select Use Transport in the generator. And create an S connection between the generator and the distributor.

run the model

reset and run the model

You can see that one of the task executors travels to the generator, loads the flowitem, and the model has a "deadlock" message.

Assignment of decision points

This model reflects the biggest logical difference between the AGV module and the traditional flexsim traveling network. The forward search mechanism of the AGV system is more complicated. The AGV will always look for the next decision point on the path to allocate or request during the journey. If an AGV cannot request to the next decision point, it will stop at the previous decision point. This stopping distance may span multiple path segments.

deadlock

This model contains a deadlock state. The first AGV requests a decision point at the absorber that is being requested by the second AGV. However, decision points near the generator that the second AGV will be requesting are being requested by the first. This type of deadlock is called a circular wait, because dispatch or dispatch requests are stuck in a state of circular wait for each other. Deadlocks will be a common occurrence when building AGV systems. Avoiding deadlocks is an important reason to simulate in the design process.

Flexsim provides an automatic deadlock detection function, and this function is enabled by default. You can right-click on the AGV path or decision point, select AGVNetworkProperties, go to the General tab, check or uncheck Detect Deadlock, and then click OK to close the dialog.

The ability to detect deadlocks is very useful during the debugging phase, but since it requires extra computation, you may want to turn it off when the model is built to make the model run more smoothly.

How to solve deadlock problem

There are several strategies to solve the deadlock problem in AGV systems. Just add an extra decision point in this case. This practice increases the potential stop points in the system, so that the AGV does not have to request a blocked decision point.

1. Add a decision point to the path on the left and one on the right.

2. Reset and run the model

Now the AGV will no longer fall into deadlock.

Unassignment of decision points

Due to the new structure of the model, the AGV will no longer fall into deadlock. But you may find that they still sometimes wait for each other. This situation is due to the mechanism of decision point dispatch and de-assignment, specifically the decision point's de-assignment type. The default setting is very conservative, that is, the assignment of the previous decision point is only cancelled when the AGV reaches the next decision point. This essentially causes the gap between the two decision points to be preserved while the AGV is traveling. You can modify this setting.

1. Red select all decision points in the model. It doesn't matter if you also red-select entities other than the decision point. So you can simply box select all entities.

2. Click on any decision point.

3. In the shortcut properties window on the right, in the deallocation type, select DeallocateWhenPastCurrent.

4. Select the appropriate option from the drop-down box, which will apply the changes to all decision points.

5. Reset and run the model.

Now AGVs don't wait for each other anymore.

Cancel dispatch type

The basic AGV model has two dispatch types by default. They are undispatch when the next decision point is reached and undispatch when the current decision point is passed. You can reconfigure these types in the AGVNetworkProperties window or add your own custom types

注:本模型使用的是FlexSim 2019

参考资料:百度百科,Flexsim7.5.4版本中文用户手册【北京创时能公司汉化】版

翻译:Google翻译

本文由LearningYard学苑原创,文中部分图片和文字均来源于网络,如有侵权请联系删除!

相关推荐

一日一技:用Python程序将十进制转换为二进制

用Python程序将十进制转换为二进制通过将数字连续除以2并以相反顺序打印其余部分,将十进制数转换为二进制。在下面的程序中,我们将学习使用递归函数将十进制数转换为二进制数,代码如下:...

十进制转化成二进制你会吗?#数学思维

六年级奥赛起跑线:抽屉原理揭秘。同学们好,我是你们的奥耀老师。今天一起来学习奥赛起跑线第三讲二进制计数法。例一:把十进制五十三化成二进制数是多少?首先十进制就是满十进一,二进制就是满二进一。二进制每个...

二进制、十进制、八进制和十六进制,它们之间是如何转换的?

在学习进制时总会遇到多种进制转换的时候,学会它们之间的转换方法也是必须的,这里分享一下几种进制之间转换的方法,也分享两个好用的转换工具,使用它们能够大幅度的提升你的办公和学习效率,感兴趣的小伙伴记得点...

c语言-2进制转10进制_c语言 二进制转十进制

#include<stdio.h>intmain(){charch;inta=0;...

二进制、八进制、十进制和十六进制数制转换

一、数制1、什么是数制数制是计数进位的简称。也就是由低位向高位进位计数的方法。2、常用数制计算机中常用的数制有二进制、八进制、十进制和十六进制。...

二进制、十进制、八进制、十六进制间的相互转换函数

二进制、十进制、八进制、十六进制间的相互转换函数1、输入任意一个十进制的整数,将其分别转换为二进制、八进制、十六进制。2、程序代码如下:#include<iostream>usingna...

二进制、八进制、十进制和十六进制等常用数制及其相互转换

从大学开始系统的接触计算机专业,到现在已经过去十几年了,今天整理一下基础的进制转换,希望给还在上高中的表妹一个入门的引导,早日熟悉这个行业。一、二进制、八进制、十进制和十六进制是如何定义的?二进制是B...

二进制如何转换成十进制?_二进制如何转换成十进制例子图解

随着社会的发展,电器维修由继电器时代逐渐被PLC,变频器,触摸屏等工控时代所替代,特别是plc编程,其数据逻辑往往涉及到数制二进制,那么二进制到底是什么呢?它和十进制又有什么区别和联系呢?下面和朋友们...

二进制与十进制的相互转换_二进制和十进制之间转换

很多同学在刚开始接触计算机语言的时候,都会了解计算机的世界里面大多都是二进制来表达现实世界的任何事物的。当然现实世界的事务有很多很多,就拿最简单的数字,我们经常看到的数字大多都是十进制的形式,例如:我...

十进制如何转换为二进制,二进制如何转换为十进制

用十进制除以2,除的断的,商用0表示;除不断的,商用1表示余0时结束假如十进制用X表示,用十进制除以2,即x/2除以2后为整数的(除的断的),商用0表示;除以2除不断的,商用1表示除完后的商0或1...

十进制数如何转换为二进制数_十进制数如何转换为二进制数举例说明

我们经常听到十进制数和二进制数,电脑中也经常使用二进制数来进行计算,但是很多人却不清楚十进制数和二进制数是怎样进行转换的,下面就来看看,十进制数转换为二进制数的方法。正整数转二进制...

二进制转化为十进制,你会做吗?一起来试试吧

今天孩子问把二进制表示的110101改写成十进制数怎么做呀?,“二进制”简单来说就是“满二进一”,只用0和1共两个数字表示,同理我们平常接触到的“十进制”是“满十进一”,只用0-9共十个数字表示。如果...

Mac终于能正常打游戏了!苹果正逐渐淘汰Rosetta转译

Mac玩家苦转译久矣!WWDC2025苹果正式宣判Rosetta死刑,原生游戏时代终于杀到。Metal4光追和AI插帧技术直接掀桌,连Steam都连夜扛着ARM架构投诚了。看到《赛博朋克2077》...

怎么把视频的声音提出来转为音频?音频提取,11款工具实测搞定

想把视频里的声音单独保存为音频文件(MP3/AAC/WAV/FLAC)用于配音、播客、听课或二次剪辑?本文挑出10款常用工具,给出实测可复现的操作步骤、优缺点和场景推荐。1)转换猫mp3转换器(操作门...

6个mp4格式转换器测评:转换速度与质量并存!

MP4视频格式具有兼容性强、视频画质高清、文件体积较小、支持多种编码等特点,适用于网络媒体传播。如果大家想要将非MP4格式的视频转换成MP4的视频格式的话,可以使用MP4格式转换器更换格式。本文分别从...