ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-22-2016
Xing Zhang
Guest
 
Posts: n/a
Downloads: 13
Uploads: 0
Default how to make AGV decrease speed

Could someone provide a solution to this issue:
There are 2 AGVs, travelling on 2 parallel paths, but their direction are opposite.
I want to make both AGVs start to decrease their speed when their distance less than 5m,
until they have passed away each other.
How to build this kind model?

I once tried to use collision spheres,but failed.
Attached Thumbnails
Click image for larger version
Name:	2016-04-22 15_18_35-FlexSim 2016 - 418.jpg
Views:	650
Size:	17.8 KB
ID:	3235   Click image for larger version
Name:	2016-04-22 15_24_28-FlexSim 2016 - 418.jpg
Views:	655
Size:	18.7 KB
ID:	3236  
  #2  
Old 04-22-2016
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

OK, I'm going to first give you the way I would do it in the current version, and then I'll tell you how I would do it in the next version (due out in June), which in my opinion will be much easier.

In the current version I would put some object in the middle that is there to hold a label containing the number of AGVs in the area. Then I'd use way points to increment and decrement the label, and track the set of AGVs currently in the area. Then when the label gets to 2 or above, I would preempt all the AGVs in the area and get them to restart their travel again, and use the initialize travel field to set their load type to something that says they need to travel slower.

In the next version I would do the same thing in regards to preempting the AGVs, but I would track it all through process flow. In the next version, control areas and control points will have several events that can be subscribed to through process flow. Specifically, I would listen to a control area's OnAllocated and OnDeallocated events to track who is in the control area. And I would listen to the control area's OnAllocationCountChange event to listen for when the number of AGVs in the area gets above 1. When that happens I would preempt all the AGVs in the area, and get them to use a new load type.

The first example is doable, but would require a good amount of code. The second you could do without much code at all.
The Following 3 Users Say Thank You to Anthony Johnson For This Useful Post:
syseo (04-24-2016)
  #3  
Old 04-23-2016
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

Hi Anthony,
I think you may misunderstand what Zhang want to do.
The 2 agvs will decrease their speed "when their distance less than 5m" rather than "all in an area". So agv will slow down in any path.
I think we should detect the distance of 2 agvs in real-time.
Inspired by Anthony's post, I use preempt task to do it. Since distancetotravel() command can not work in AGV path during any running time, I try to use the xloc() to find out the distance between agv and object which only works in staright path.

Maybe collision spheres will be better to find out distance between 2 agvs.

Attached is the model (Version2016) I made and hope it helps.

BTW, I'm looking for a command like distancetotravel() can easily get the distance in AGV path, can anyone help me? or distancetotravel() can work in next version?
Attached Files
File Type: fsm agv_slowdown_by_distanceV16.fsm (21.7 KB, 574 views)
The Following User Says Thank You to Jing Chen For This Useful Post:
Anthony Johnson (04-25-2016)
  #4  
Old 04-23-2016
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

Jing,
Careful. Your model is showing different results depending on the Run Speed (refresh rate). You need to call updatelocations() before querying the location of an object in motion.
The Following 3 Users Say Thank You to Kris Geisberger For This Useful Post:
RalfGruber (05-16-2016)
  #5  
Old 04-24-2016
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Wink

Use collision sphere to make a new model.
Much more simple and hope it helps.
Attached Files
File Type: fsm agv_slowdown_by_distance_collisionV16.fsm (19.8 KB, 574 views)
  #6  
Old 04-24-2016
Xing Zhang
Guest
 
Posts: n/a
Downloads: 13
Uploads: 0
Default

Hi,Jing
I feel confused about this line code in your model:"if(distance <= slowDown && !flag)"(model 1,line 26),don't quite understand what this mean,why need to judge condition"!flag"? What does this mean to? Is it to determine whether label"flag" exists or not, or whether the value of label"flag" is NULL?
Actually,I always feel confused about this kind of "if" condition,could you please say a little more on this? Thanks a lot.
  #7  
Old 04-25-2016
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

Hi, Xing
Try to use model2 in #5.
Model1 still has many problems unsolved and the code is also much more and complicated.

PS. label"flag" is used for judge the speed of agvs which you can find in initialize travel field.
The Following User Says Thank You to Jing Chen For This Useful Post:
SayedMohammad Ayati (05-16-2016)
  #8  
Old 05-16-2016
SayedMohammad Ayati
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Unhappy

Jing Chen,

according to your reply, unfortunately I could not open your codes, in my case I would set a condition which is returning the Task Execute to a specific object after passing a certain distance, but it does not work, could you please help me.
  #9  
Old 05-16-2016
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

Hi,SayedMohammad
I don't know why you can not open my model, my model is built by Version 2016.
I need more information or describe about your model.
Otherwise, you can check this thread https://www.flexsim.com/community/fo...ead.php?t=3147
, maybe it can help.


Thread Thread Starter Forum Replies Last Post
Decrease waiting time for taskexecuter Johanna Klietz Q&A 2 01-18-2016 08:03 AM
Need help in programmatically increase operators and decrease process time Raju Jampani Flexsim Student Forum 2 04-10-2015 12:34 PM
Set up end speed for travel Yiheng Feng Q&A 2 05-27-2013 09:36 AM
About run speed of Flexsim dalin cai Gripes and Goodies 2 01-27-2011 06:51 AM
operators working together to decrease process time Alex Christensen Tips and Tricks 4 07-14-2008 09:22 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.