Our organization is currently utilizing Velocity to deploy the Winter Weather Operations solution. One of our Transportation manager's goals for using this solution is to more accurately track material usage across an event and across a season. While reviewing our AVL data return, we found that all of the material values returned by the AVL system are summed values from when the device was first field deployed (day 1) making these raw material values not useful in their current form.
I currently am attempting to employ a workflow that would capture the first record for a track when an event starts and storing this information in a separate stream or feature layer. This "First Record" stream or feature layer would then be used as the "zero" or starting value for each track in which to calculate the running total of material use across an event.
I have so far attempted two separate workflows to capture this "First Record" data. Those two workflows can be seen in the attached screenshots.
- Use the "Detect Incidents" tool in a real time analytic (RTA) to determine when a vehicle has entered/exited a pre-defined static "Operational Boundary" polygon (see screenshot for configuration of "Detect Incidents" tool). Then filter the records based on the returned "Incident Status" value using a where clause of "Incident Status == 'Started'". Store filtered records in a separate stream or feature layer.
- Use the "TrackFieldWindow" Arcade function to find the first record in an RTA. Use the calculate field tool to build a new field that uses the "TrackFieldWindow" Arcade function to return a boolean (true/false) value (see screenshot for this Arcade expression). Filter subsequent records based on this boolean field, only returning the records that contain a True value for this field.
So far workflow 1 seems the most promising and works to some degree when testing during non-events, but during an actual event with many more active vehicles I am finding that while values are being calculated, they are not always accurate over long durations. I am finding that the "First Record" is being reset after a certain time frame. I am not sure if this is an issue with how I have the output Stream or Feature Layer configured or if it may be an issue with the Stateful configuration not able to handle that many records over that duration of time. I have had less time to test Workflow 2 and am less confident in it's ability to capture the "First Record", but wanted to try something different in case workflow 1 wouldn't function.
I am looking for any advice or suggestions on how to accomplish the capture of the "First Record" values as well as any additional suggestions on how to best accomplish calculating the running material total values for an event/season using the "First Record" values as the zero value.