question

Maryam H2 avatar image
0 Likes"
Maryam H2 asked Felix Möhlmann answered

How to draw frequency of waiting times?

Hi there,

How we can visualize/calculate the frequency of waiting times for multiple locations?

@Felix Möhlmann

FlexSim 22.0.0
chartswait timehistogramfrequency
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Thank you for posting this as a follow up question - link for context:

https://answers.flexsim.com/questions/112485/frequency-of-the-chart-data.html?childToView=112858#comment-112858

The data in the person and location tables does not contain a column that specifies the group they belong to so they have to joined with the "LocationGroups" table that does.

Then you can query for entries of any of the groups by adding the condition that the location must belong to it.

waittimescalctable-2.fsm

SELECT
(([PersonWaitForLocationHistory.StatisticsCollector].[AcquireTime] - [PersonWaitForLocationHistory.StatisticsCollector].[RequestTime]) / 60) AS [WaitTime]
FROM [PersonWaitForLocationHistory.StatisticsCollector]
JOIN [LocationGroups.StatisticsCollector] ON ([LocationGroups.StatisticsCollector].[Location] = [PersonWaitForLocationHistory.StatisticsCollector].[Location])
WHERE [LocationGroups.StatisticsCollector].[LocationsGroup1] = 1

This query calculates the individual waiting times patient had for locations (the result of this is normally aggregated in the "Location" column of the PersonWaitTimes table). It then joins the table with the "LocationGroups" table, adding the columns which determine if a location belongs to a certain location-group or not. Lastly the WHERE filters for entries belonging to the group with the specified name.

5 |100000

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