question

Jouky D avatar image
0 Likes"
Jouky D asked Jeanette F answered

Expression Field on List has not the same result as on a Script.

Hello everyone,
I am trying to make a List with an Expression Field called Distance. However, when I pull it using Order By distance DESC or ASC, it always return the same value. I printed the results of each element on the list of the distance value, and it results the same value, however they are not in the same position. I ran a script with the same code at that time, and the distance value is correct on the script while is not on the Expression Field on List.


1684162663635.png



1684162693474.png

1684162738048.png


FlexSim 23.1.2
listsdistancetotravelexpression field
1684162663635.png (32.0 KiB)
1684162693474.png (16.9 KiB)
1684162738048.png (16.5 KiB)
· 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.

1 Answer

Jeanette F avatar image
1 Like"
Jeanette F answered

Rather than pointing to an AGV class can you point to the object class of the agv? In line 10, it could be like the following

  1. double distance = distancetotravel(agv.object, 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.