question

Michael O'Connell avatar image
0 Likes"
Michael O'Connell asked Michael O'Connell commented

How can I get the next CP on an AGV's path

I believed the agvinfo command would provide me with the next CP using the AGV_DEST_CP or AGV_INTERMEDIATE_DEST_CP parameter, but it doesn't.

In the attached model, the TE has a reset point/origin of CP2 and a destination of CP5. Upon reaching CP3, I would expect agvinfo would give me CP4 as next CP, but it doesn't. It returns the final destination, CP5.

CP4 does show as nextCPArrivalPoint, but I don't know how to access it. Am I missing a command or parameter?

agv-nextcp.fsm

FlexSim 16.1.0
agv path
tjozf.png (230.6 KiB)
agv-nextcp.fsm (18.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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Michael O'Connell commented

It doesn't appear that there is an aginfo value that returns the next CP easily. However, you can directly reference that variable in the AGV network in the agv that points to the next CP. I'd be careful using it, since directly influencing the tree can create problems in your model. But just for reference sake you can get that reference by executing code something along the lines of:

  1. treenode agv = node("TaskExecuter10", model());
  2. treenode nextCP = getsdtvalue(node(">variables/navigator/1+",agv),"nextCPArrivalPoint");
  3. return nextCP;

This is what we put into the command line, and it seemed to return the correct CP.

· 3
5 |100000

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