I wan to monitor the agv/vehicle speed. Is there a way to plot the speed vs time so that i can get the instantaneous speed of the vehicle.
The agv/vehicle would be running on the AGV network.
Thank You!
I wan to monitor the agv/vehicle speed. Is there a way to plot the speed vs time so that i can get the instantaneous speed of the vehicle.
The agv/vehicle would be running on the AGV network.
Thank You!
Seeing Tanner's approach I think I may have misunderstood the question, but here goes anyway.
The AGV class provides a speed property which (as far as I can tell) reflects the current speed of the AGV at any given moment : https://docs.flexsim.com/en/20.1/Reference/CodingInFlexSim/FlexScriptAPIReference/AGV/#Property-speed
You can record the value of that property at whatever interval you want using a statistics collector.
In the attached example, I sampled the AGV's speed every 0.5 seconds :
@Allister Wilson Thank you for your response. I am aware of this method, but i was looking more for the instantaneous speed rather than the speed at a specified time interval. @tanner.p's response makes more sense.
Allister's answer is getting the instantaneous speed of the AGV. That's what the speed property gives you.
The difference between Allister's answer and Tanner's is that Tanner is trying to calculate the speed based on its position every 0.1 seconds because he didn't realize you can just use the speed property to get this data directly.
Allister's example is querying the speed directly using the AGV API every X seconds, where you can specify what value for X you want to use. Allister specified 0.5 in his example, but if you changed that to 0.1, then it will do what Tanner's example is doing but more accurately.
Hi @Pinakin K,
Due to FlexSim's nature as a discrete-event simulation software, I don't think calculating instantaneous speed is going to be easy. If you think about how this software works, everything is done in microsecond increments, so that at any given time, the AGV's speed is technically 0. What gives an AGV the appearance of having "speed" is the rate at which the AGV updates its location vs time. Hopefully that makes sense.
Now, if I had to calculate "instantaneous" speed, I think I would use a Statistics Collector that constantly checks the AGV's location and then calculates how far it has traveled in the last time unit.
On a large scale, this would mean that if an AGV traveled from (0,0) on an (x,y) grid to (3,4) in 10 seconds, it covered sqrt(3^2 + 4^2) meters, or 25 meters, in 10 seconds, which is 2.5 m/s. I could then graph a data point that says that the AGV had a "speed" of 2.5 m/s at 10 seconds. Does that make sense? It's a pretty ugly way to do things, but I think it's the only possible think to do. All of the other speed and acceleration calculations happen in the background and only determine the rate at which the AGV object should change its 3D location, not the actual "speed" at which its traveling.
I've tried to create the Statistics Collector in the example model attached. You'll still have to use a calculated table to get the "speed" by using the formula explained above. The data is shown below. Maybe it will spark an idea of what you could do, though. But you'll have to decide if it's worth the effort.
The alternative is to assume that the AGV is moving at its top speed when it's in its "Traveling" state and then other states like "Loading" or "Idle" would indicate a speed of 0. This would be simpler, but it wouldn't have the resolution of an "instantaneous" speed.
Hopefully this helps. Others might have better ideas that I missed, I just couldn't think of one.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved