question

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst asked Patrick Zweekhorst commented

How to control agv orientation when using agvreassigncp()

Hi,

I am simulating an AGV elevator, but I ran into a problem with the orientation of the AGV after a call of the function agvreassigncp. The agv enters the elevator on the left side and leaves the elevator on the right side. I have attached an example model (agvorientation.fsm) with two agvs. The bottom agv has the correct orientation when it continues to travel, the top agv does not. How can I control the orientation in the second part of the network. Some elevators might have an exit on both sides of the elevator, so the orientation might depend on the next destination.

@anthony.johnson the function agvreassigncp is deprecated, but the new function using the agv class does not work or is not there. Reading the manual I thought I could use agv.currentCP = .... since in the manual it says that you can get and set the current cp of an agv with this function, but when I try this ( like in the script window ) I get an error msg: "The value of property currentCP cannot be set".

Many thanks already,

Patrick

FlexSim 17.1.1
agvorientationagvreassigncp
agvorientation.fsm (21.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
anthony.johnson avatar image
1 Like"
anthony.johnson answered Patrick Zweekhorst commented

When you call agvreassigncp(), it always reassociates the agv based a "forward" orientation along the path. In your model if you uncheck Two Way on the two paths to see their "forward" orientation, you'll see that one is oriented forward one way, and the other is oriented the other way. So when reassigning agvs to a control points in an elevator, you need to define the forward orientation of the paths properly to get the desired behavior.

In our design of the AGV api, the spec was to make currentCP a writable property, but apparently that was not implemented. Still, the better way would be to allow the user to define the orientation explicitly when reassigning. I will add it to our list to add a reassignCP() method to the AGV class, which will take a parameter telling whether to orient the AGV forward or backward on the path.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

jing.c avatar image jing.c commented ·

Hi @anthony.johnson

Maybe you could consider making more orientation parameter to solve the question like this post.

0 Likes 0 ·
Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Thanks Anthony. I will have to do it with orientating the paths correct for now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.