article

anthony.johnson avatar image
5 Likes"
anthony.johnson posted anthony.johnson edited

Sample Model Tracking Social Distancing Metrics

Attached is a sample model that tracks social distancing metrics. I just grabbed one of our testing models, so it's not necessarily eye popping as far as visuals, but the basic concepts of social distancing metric tracking are in there.

This model is implemented in the new 20.2 beta. It uses the new Agent module to detect proximity between objects. I added a proximity system, and added each operator as an agent in the system.

I created an object that draws a "heat map" where proximity points happen. This is a visual tool called "HeatMap" in the model. If you send a message to the object it will add a "hot point" at the location of the sending object. I implemented the object's OnReset, OnMessage, and OnDraw triggers to do this.

Once the heat map is set up, I have the proximity system send a message to the HeatMap from the involved agent object as part of it OnEnterProximity trigger.

Second, I do some statistical tracking using a statistics collector named ProximityTimes. This listens to the agent proximity system's OnEnterProximity and OnExitProximity events, and collects data accordingly. The trickiest part to setting this up was sampling the actual event. For now (hopefully we'll get a better system in the future) you have to sample the event in the tree. In the Events tab of the statistics collector, press the sampler button, then in the tree navigate to the node at MODEL:/ProximitySystem>variables/behaviors/Proximity Behavior and hover the cursor over it to get the list of events.

The ProximityTimes statistics collector collects individual times. This allowed me to add the "Time In Proximity" dashboard chart. For the other charts, I needed a calculated table to aggregate the values. The ProximityAggregates table aggregates the data needed for the other three dashboard charts: Total Proximity Time, Proximity Count, and Average Time In Proximity.

SampleSocialDistancing.fsm

agent modulemodelling social distancing
· 6
5 |100000

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

Rohan V3 avatar image Rohan V3 commented ·

How can I access the model? The 20.2 beta is not available for download. I couldn't open it in 20.1 @anthony.johnson

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Rohan V3 commented ·

The 20.2 beta is available for download. You can find it by clicking the More Versions button.

https://answers.flexsim.com/articles/87831/flexsim-2020-update-2-beta-available.html

0 Likes 0 ·
Rohan V3 avatar image Rohan V3 Matthew Gillespie ♦♦ commented ·

Thanks. I was able to download it. It seems like you guys replaced the collision detection with proximity systems? Am I still able to draw a collision sphere around the object like before? I couldn't find the option anywhere. I could only change the color of the operator on proximity.

0 Likes 0 ·
Show more comments

Article

Contributors

anthony.johnson contributed to this article

Related Articles