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 08-24-2015
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default AGV travel distance

Is there a way to measure the distance between two vehicles on the network path on the fly?
I found getnetworkdistance command, but it seems to return only the distance between nodes, not vehicles. (At measuring point, two vehicles are not necessarily on the nodes but on the path)


Appreciate much for your advice and help in advance.
Thanks!
  #2  
Old 08-24-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Try using distancetotravel() command.It returns the distance that traveller has to travel to reach the destination
  #3  
Old 08-25-2015
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

Quote:
Originally Posted by sagar bolisetti View Post
Try using distancetotravel() command.It returns the distance that traveller has to travel to reach the destination
Hi sagar,
I have tried to use distancetotravel() to get the distance between 2 TaskExecuters in network, but it didn't work. And it will return -1 (as the pic attached).
While it works well without using network.

Do you have any ideas to solve that?
Attached Thumbnails
Click image for larger version
Name:	QQ截图20150825143803.png
Views:	832
Size:	89.3 KB
ID:	2992  
  #4  
Old 08-25-2015
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Yes that is true, but you can make a detour. You can get the distance to travel to a single destination of both travelers and compute the distance between them.
Jörg
The Following 5 Users Say Thank You to Jörg Vogel For This Useful Post:
Sung Kim (08-25-2015)
  #5  
Old 08-25-2015
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

It's awesome!
such a brillant and simple idea!
Thank you Jörg!
  #6  
Old 08-25-2015
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default

Hi, Jorg,

Thank you for the tip. I tried to test out your approach, and it seemed to work in the beginning. However, as shown in the attached pic, the return value of distancetotravel made me puzzled..

I triggered the distancetotravel for Operator7 and 9 several times while they are moving. (manually clicking the script.. )
In the output console, the 1st column = simulation time, 2nd column = distancetotravel of Operator 7, 3rd column = distancetotravel of Operator 9, 4th col = difference of two distance.

If you look at the distance of "Operator 7", it increases when the model starts. It makes sense since the operator moves away from the destination to pick a flowitem at Source2.

Once it picks the flowitem, the distance decreases until it reaches to the first NN1. - Totally makes sense so far.

After passing the NN1, I expect the distance continues to be decreased since it approaches to the destination (Queue3). However, it gives opposite way... increased as it approaches to the destination.

Did I miss something??


*** 2ND COMMENT ***
I tested out the same logic on the "new AGV path". It returns only one distance value until it reaches to the destination. Not updated based on the vehicle/operator's current location.
Any thought??

Thanks.
Attached Thumbnails
Click image for larger version
Name:	Presentation1.png
Views:	902
Size:	416.8 KB
ID:	2995  
  #7  
Old 08-25-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

distancetotravel() isn't returning an exact value that is always correct while the operator is traveling. It is correct at the points when the navigator needs it to be for making decisions, such as when you are starting a new travel task or executing the triggers on a network node.

The value that is being calculated in your example is shown in the attached image.

To get a better answer as to how to do what you are trying to do, you should post more specifics and a sample model that demonstrates what you are trying.

You say "measure the distance between two vehicles on the network path on the fly," but what does that mean? From what code exactly do you need this measurement and why? What are you trying to accomplish with this measurement?
Attached Thumbnails
Click image for larger version
Name:	distance_to_travel.png
Views:	854
Size:	59.1 KB
ID:	2996  
The Following User Says Thank You to Phil BoBo For This Useful Post:
Sung Kim (08-25-2015)
  #8  
Old 08-25-2015
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default Specific AGV process

Thank you for the explanation. I think I have an answer from PhilBoBo, “distancetotravel() isn't returning an exact value that is always correct while the operator is traveling.” I might need to find a work-around method.

Hopefully, following description would provide better picture for everyone about what I am trying to accomplish, so that I can get more help / advice.
My client has a process module in which a closed loop agv travel path is defined as shown in the attached simplified diagram.
AGV picks its work assignment at “start/end” location, and travels along the path to do the job. The work stations an AGV needs to visit varies each time. For example, AGV A needs to visit/stops at 1, 3, 4. AGV B needs to visit/stops 2, 4. AGV C needs to visit/stops at 2, 3 etc. Once AGV stops at a location, it stays until the process is done (time delay). No passing is allowed by succeeding AGVs.

Client wants to study about congestion and here are two major KPIs for client wants to have.
Blocking time and Average gap (distance) from preceding AGV.

Blocking time is not quite related to this thread, let’s not consider it.
The gap from preceding AGV in this study is defined as a distance between two AGVs, measured when the succeeding AGV starts to move. In other words, whenever an AGV starts move, it wants to know how far it is to its preceding AGV, (not destination). For example, The AGV A is just about to move from station 1 to its next station 3. Its preceding AGV B is traveling to its destination 4. This moment, the gap for AGV A is captured as the red arrow line in the picture.

Overall, in long run, I understand that the average gap should be “Total length of path divided by number of AGVs”. It was asked to measure it anyhow. It might be useful information to find out when the vehicles are stabilized, distance-wise, through time progress chart. (Or, at least validation?? )

Can I still use the distancetotravel() for this purpose?? Distance using two vehicles location coordinates (Euclidean distance) would not always work due to the path shape between them…

I hope this illustration can give better picture, and any advice would be much appreciated.
Attached Thumbnails
Click image for larger version
Name:	TravelDistance2.PNG
Views:	757
Size:	13.8 KB
ID:	2997  
The Following User Says Thank You to Sung Kim For This Useful Post:
Jing Chen (08-25-2015)
  #9  
Old 08-25-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Is your path really a square or is it a more complicated shape? If it is a square, the logic to calculate the distance based on their physical locations wouldn't be too difficult.

The distancetotravel() command has the same quirks with the AGV network: it doesn't work exactly as you would hope unless they are on control points.
The Following User Says Thank You to Phil BoBo For This Useful Post:
Sung Kim (08-26-2015)
  #10  
Old 08-26-2015
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default Any further advice?

Yes, I agree, and I wish I have the path as simple square as the diagram. Unfortunately, there are some curved paths.
Any further suggestions? specially for the new AGV path?

Otherwise, I feel really bad to do this, but I might need to propose the assumption to use only straight path for the system...(?)

I would much appreciate if you give me more thought/tip to avoid straight path only assumption.

Thanks.
  #11  
Old 08-27-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Attached is a model with some user commands that can be used to calculate the distance between any 2 AGVs in a closed-loop AGV network.

To use this method, you need to copy the 4 user commands into your model, create a global table named PathData, and then execute the rebuildPathData() command to fill the PathData table with information from your AGVNetwork (NOTE: this will only work correctly with a closed-loop AGV network).

You can then use the getDistanceBetweenAGVs() command to get the distance between 2 AGVs in your network.


An explanation of what is in this example model:

It has a PathData table that contains a list of the paths in the loop and their distances. The rebuildPathData() user command fills out this table so that it is in order and the lengths are updated. If you change your network, execute this command again.

getPathAndDistance() returns the Path that the passed AGV is on and how far along that path the AGV is.

getDistanceBetweenPoints() takes 2 paths and distances (from the above command) to calculate the distance between those two points on the network.

getDistanceBetweenAGVs() calls the commands above to calculate the distance between the AGVs.
Attached Thumbnails
Click image for larger version
Name:	distance_between_agvs.png
Views:	829
Size:	105.3 KB
ID:	3005  
Attached Files
File Type: fsm distance_between_agvs.fsm (23.5 KB, 728 views)
The Following 5 Users Say Thank You to Phil BoBo For This Useful Post:
Sung Kim (08-27-2015)
  #12  
Old 08-27-2015
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default Millions Thanks

Thank you millions PhilBoBo!!
I didn't have a chance to apply the commands and logic to my model yet, but it seems quite promising from your demo model! (It even has curved paths at corners - sweet!)


Thank you again for your time and help!
The Following User Says Thank You to Sung Kim For This Useful Post:
mefhsmflexsimbr (09-11-2015)

Tags
agv, path, travel distance, vehicle


Thread Thread Starter Forum Replies Last Post
how to find the distance when using coordinate ts ex 2 sravan kumar Q&A 10 07-03-2015 09:44 PM
difference between offset travel and travel? zhang xin Q&A 2 08-20-2012 07:11 AM
Travel Offset Distance shafizad Q&A 2 05-23-2012 05:48 AM
Where can I find or get the information about the travel distance of each yard truck? syseo Container Terminal (CT) Library 0 02-12-2011 12:24 AM
Keeps a distance Li Chin Q&A 3 12-18-2008 02:09 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.