<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AGV control based on distances in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/agv-control-based-on-distances/m-p/14049227#M100338</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;How can I control the AGV fleet in order to assign a task to the nearest AGV?&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;I tried modifying the AGV list by creating the “distance2” criterion, but it does not behave as expected.&lt;/P&gt;&lt;P&gt;To identify the different distances I used the script :&amp;nbsp;cpdistance(CPX,CPY);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will find the model attached.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 10 Mar 2026 12:32:17 GMT</pubDate>
    <dc:creator>don_masmoudi</dc:creator>
    <dc:date>2026-03-10T12:32:17Z</dc:date>
    <item>
      <title>AGV control based on distances</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/agv-control-based-on-distances/m-p/14049227#M100338</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;How can I control the AGV fleet in order to assign a task to the nearest AGV?&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;I tried modifying the AGV list by creating the “distance2” criterion, but it does not behave as expected.&lt;/P&gt;&lt;P&gt;To identify the different distances I used the script :&amp;nbsp;cpdistance(CPX,CPY);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will find the model attached.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Mar 2026 12:32:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/agv-control-based-on-distances/m-p/14049227#M100338</guid>
      <dc:creator>don_masmoudi</dc:creator>
      <dc:date>2026-03-10T12:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: AGV control based on distances</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/agv-control-based-on-distances/m-p/14050312#M100352</link>
      <description>&lt;P&gt;You defined the expression on a global list that is not used anywhere.&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 09:19:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/agv-control-based-on-distances/m-p/14050312#M100352</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2026-03-11T09:19:27Z</dc:date>
    </item>
  </channel>
</rss>

