AGV control based on distances

AGV control based on distances

don_masmoudi
Enthusiast Enthusiast
117 Views
1 Reply
Message 1 of 2

AGV control based on distances

don_masmoudi
Enthusiast
Enthusiast

Hello, 

 

How can I control the AGV fleet in order to assign a task to the nearest AGV?

When the mission consists of handling an item, it should be assigned to the closest available AGV (even if it is currently returning to the charging station).

I tried modifying the AGV list by creating the “distance2” criterion, but it does not behave as expected.

To identify the different distances I used the script : cpdistance(CPX,CPY);

 

You will find the model attached.

Thank you for your help.

0 Likes
Accepted solutions (1)
118 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Collaborator
Collaborator
Accepted solution

You defined the expression on a global list that is not used anywhere. The AGVs are currently acquired as a resource. When the Resource activity represents actual objects it uses a list internally and you can define expressions for that list.

The cpdistance() command returns the distance between two control points. For a Resource activity the puller is always the acquiring token. The values one the list are supposed to be AGVs, not control points, so that also needs to be adjusted.

Converting the value (AGV) to a CP is pretty straightforward. Cast the value as an AGV class variable and read the current CP of the vehicle. For the puller (token) you will need to write the CP to a label so you can access it in the expression.

 

0 Likes