AGV Network Customization Delegate setSpeedProfile

AGV Network Customization Delegate setSpeedProfile

iago_mf
Not applicable
105 Views
2 Replies
Message 1 of 3

AGV Network Customization Delegate setSpeedProfile

iago_mf
Not applicable

[ FlexSim 23.1.3 ]

Hi!

How can I identify the travelPath being calculated in the setSpeedProfile code? The way I was using is the following loop, but if it has to pass through the same path twice, it doesn't work. I would have to add some other condition. Is there any way to directly obtain a reference to the travel path?

AGV.TravelPathSection section;

int i;

for(i = 1; i <= agv.travelPath.length; i++)

{

if(agv.travelPath.path == path)

{

section = agv.travelPath;

break;

}

}

Thanks in advance!

0 Likes
Accepted solutions (1)
106 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

The travel path is actually passed in as a parameter. The header that is shown in the documentation seems to be an accidental duplicate of the getPathTravelWeight header.

1690963902014.png

Please take a look at this @Jordan Johnson.

By checking what values are passed in by assigning them to Variant variables, the correct header should look like below (as far as I can tell).

AGV agv = param(1);   // the travelling AGV
Object path = param(2); // The path the travel section is on treenode travelPath = param(3); // The current travel section treenode agvTyp = param(4); // The type of the travelling AGV

1690963791787.png

0 Likes
Message 3 of 3

iago_mf
Not applicable

I hadn't realized that the header was incorrect.

Thanks @Felix Möhlmann !

0 Likes