<?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 Re: Incident Detect Node = modify Incident Duration in ArcGIS Velocity Questions</title>
    <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675442#M600</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140376"&gt;@JeffSilberberg&lt;/a&gt;&amp;nbsp;not sure I am understanding your question correctly. Yes - you can add the Calculate Fields tool after any other tool in your model to adjust datetime values as desired. However this would need to occur outside/after the Detect Incidents tool.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd&lt;/A&gt;&amp;nbsp;(can add negatives)&lt;/P&gt;</description>
    <pubDate>Wed, 31 Dec 2025 15:45:34 GMT</pubDate>
    <dc:creator>PeterNasuti</dc:creator>
    <dc:date>2025-12-31T15:45:34Z</dc:date>
    <item>
      <title>Incident Detect Node = modify Incident Duration</title>
      <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1673683#M598</link>
      <description>&lt;P&gt;I have modified an RTA so that the incident detection node now uses a TrackFieldWindow("speedInMph", -3, 0) expression to look at the last three (Current, -1, and -2) transactions for vehicle speeding.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Incident starts based on this logic, and defaults to Ends when the Logic returns false.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  // $feature.speedInMph &amp;gt; 25

// Get last 3 speed observations
var speeds = TrackFieldWindow("speedInMph", -3, 0);

// Check that all 3 speeds are &amp;gt; 25 MPH
return
    Count(speeds) == 3 &amp;amp;&amp;amp;
    speeds[0] &amp;gt; 25 &amp;amp;&amp;amp;
    speeds[1] &amp;gt; 25 &amp;amp;&amp;amp;
    speeds[2] &amp;gt; 25;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;Now I am trying to decide if I can fix the IncidentDuration added to the Schema, as the reports are 30 seconds apart, so speeds[2] is actually 60 seconds old at this point.&amp;nbsp; Could I add a fieldCalculation after the Detection Node to adjust the tIncidentDuration time? If so, would I need to do it for all Started, Ended, and Ongoing states, or can I somehow impact the value in the stored state?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 17:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1673683#M598</guid>
      <dc:creator>JeffSilberberg</dc:creator>
      <dc:date>2025-12-17T17:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Incident Detect Node = modify Incident Duration</title>
      <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1674848#M599</link>
      <description>&lt;P&gt;Just thought I would bump this ---&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Dec 2025 15:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1674848#M599</guid>
      <dc:creator>JeffSilberberg</dc:creator>
      <dc:date>2025-12-24T15:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Incident Detect Node = modify Incident Duration</title>
      <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675442#M600</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140376"&gt;@JeffSilberberg&lt;/a&gt;&amp;nbsp;not sure I am understanding your question correctly. Yes - you can add the Calculate Fields tool after any other tool in your model to adjust datetime values as desired. However this would need to occur outside/after the Detect Incidents tool.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/date_functions/#dateadd&lt;/A&gt;&amp;nbsp;(can add negatives)&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 15:45:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675442#M600</guid>
      <dc:creator>PeterNasuti</dc:creator>
      <dc:date>2025-12-31T15:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incident Detect Node = modify Incident Duration</title>
      <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675445#M601</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/56766"&gt;@PeterNasuti&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;It's not a question of whether I can add the Calculate Fields; it's a question of whether I can change the Incident Duration time as it started, not at the current transaction, but two transactions before, based on the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TrackFieldWindow("speedInMph", -3, 0);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If I change it on "Started", does it keep the change, or does the change need to be applied each time a transaction passes through the logic?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 16:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675445#M601</guid>
      <dc:creator>JeffSilberberg</dc:creator>
      <dc:date>2025-12-31T16:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Incident Detect Node = modify Incident Duration</title>
      <link>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675459#M602</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/140376"&gt;@JeffSilberberg&lt;/a&gt;&amp;nbsp;Thanks for clarifying - the changes would need to be applied each time. The attribute state is maintained at the tool level and the arcade expression only evaluates to true vs false to determine whether the incident should be opened/continue/closed. We would not expect the contents of this arcade expression to change feature attribute prior state values.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 16:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-velocity-questions/incident-detect-node-modify-incident-duration/m-p/1675459#M602</guid>
      <dc:creator>PeterNasuti</dc:creator>
      <dc:date>2025-12-31T16:47:26Z</dc:date>
    </item>
  </channel>
</rss>

