ATTENTIONThis 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 |
#1
|
|||
|
|||
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! |
#3
|
|||
|
|||
Quote:
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? |
#4
|
||||
|
||||
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) |
#6
|
|||
|
|||
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. |
#7
|
||||
|
||||
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? |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Sung Kim (08-25-2015) |
#8
|
|||
|
|||
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. |
The Following User Says Thank You to Sung Kim For This Useful Post: | ||
Jing Chen (08-25-2015) |
#9
|
||||
|
||||
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
|
|||
|
|||
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
|
||||
|
||||
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. |
The Following 5 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Sung Kim (08-27-2015) |
#12
|
|||
|
|||
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 |