Good afternoon, colleagues. I need help to solve a work-related task, I need to calculate the movement of an AGV (Automated Guided Vehicle) along a route. What I mean is that I need to calculate the time it will take for the AGV to reach the target point from its current location. In my specific case, the target point is a rack with a specific ID. The result of the calculation should be the time it takes for the AGV to travel to the rack, and ideally, this should match the model time.
However, while working on this task, I encountered a problem: AnyLogic has an internal algorithm for AGV movement along the route, which cannot be analyzed. I cannot calculate the travel time, travel speed, acceleration, and deceleration. Additionally, entering values into the TransporterFleet does not change the movement pattern. I have not found an answer in the instructions or AnyLogic API specifications, and I have not found an answer on Stack Overflow. Therefore, I am writing to the community and hoping for help.
Network graph images for AGV movement and the highlighted racks that I selected in the experiment.
To solve the task, I will need the following values: maximum speed, acceleration, deceleration, and travel distance.I obtain the maximum speed, acceleration, and deceleration from the unit, as we input these values into the TransporterFleet.
TransporterFleet
I obtain the route length from the network. I tried various methods to get the path, and this method was the closest to the internal logic of the program. However, when calling the method unit.getDistanceTravelled(METER)
, the obtained values do not match.
LocationNode unitLocation = (LocationNode)unit.getCurrentLocation();
lenght = network.getPlainDistance(unitLocation.getPoint(), (Point)target)
To get the time value I wrote the following method:
Public double getTimeOfPass (double length, AGV unit){
double maxSpeed = unit.getMaximumSpeed(SpeedUnits.MPS);
double accelerate = unit.getDeceleration(AccelerationUnits.MPS_SQ);
double reduce = unit.getAcceleration(AccelerationUnits.MPS_SQ);
double timePart1 = maxSpeed/accelerate;
double distanceOfAcceleration = (Math.pow(maxSpeed, 2.0) / (2 * accelerate));
double timePart2 = maxSpeed/reduce;
double distanceOfReduce = (Math.pow(maxSpeed, 2.0) / (2 * reduce));
double distanceOfMovement = lenght - (distanceOfAcceleration + distanceOfReduce);
double timePart3 = distanceOfMovement/maxSpeed;
return (timePart1 + timePart2 + timePart3);
}
Now, for self-verification, it is necessary to calculate the model time, which was recorded at the start of the movement and calculated at the moment the AGV arrived at the desired rack. After many manipulations, I found that this time can be obtained using the following method: unit.timeInState(state.GOING_TO_AGENT);
After all this, I started conducting the experiment and recorded the results in a table:
Table of AGV Travel Time Measurements
From this table, I obtained a graph of the change in time delta versus distance.
A graph of the time discrepancy according to the table
A correlation graph based on the table.
Unfortunately, the results I obtained were very inconclusive, making it impossible to draw any conclusions. I hypothesized that there might be changes in the route graph or certain patterns in the movement calculations, and I conducted a more in-depth analysis by examining the AGV cart movement graph in AnyLogic.Table with extended movement values
The results of these studies have further complicated the situation, and I cannot understand how AnyLogic moves the AGV through the network. The route length is the same, the route composition is the same (PointNodes, Path, etc.). Please help me understand how to calculate the AGV’s arrival time at the target point.
Артём Чарыков is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.