Statistics are the basic units of data that you'll use to get data from your model. The method you'll use to get the statistics you're interested in will depend on whether it's one of the standard statistics that are available by default in FlexSim or not. If it's not one of the standard statistics, you can create your own custom statistics using a statistics collector.
In this tutorial task, you'll get introduced to the basic features and functionality of statistics collectors. The following image provides an overview of the major phases of the process for collecting custom statistics from a model and which FlexSim tools you'll use during each phase:
In this tutorial task, you'll focus on the first two steps in this process: adding events and setting up the data table. You'll set up a basic statistics collector that will listen to and record the amount of time it takes a processor to process flow items.
You'll also learn how to link dashboard charts to a statistics collector's data table to visualize the data.
See Key Concepts About Getting Data and Using the Statistics Collector for more detailed information about the data-gathering process.
In this step, you'll build a basic 3D model. The 3D model itself will be fairly simple since the main focus in this tutorial will be on how to get a wide variety of data from the simulation model.
When you're finished, your 3D model should look similar to the following image:
In this tutorial task, you'll focus on collecting data about the processing times for flow items. For that reason, you'll set the processor's staytime to use a statistical distribution so that there is some randomness in the processing times. For this tutorial, you'll use the normal distribution, which is similar to a traditional bell curve.
To build this 3D model:
10.0
and the standard deviation to 2.0
.Pay particular attention to this histogram, which is a graphical representation of the normal statistical distribution. This chart displays the statistical probability of the possible processing times. Notice that most processing times will fall between 9 and 11, with the frequency of other processing times tapering off from there. When you collect data from your model about the processing times in your simulation model, the data you collect should mirror this distribution.
In this step, you'll create a new statistics collector to gather data from your model. As was mentioned in the introduction to this tutorial task, setting up a statistics collector generally has two phases: adding events and setting up the data table.
When you add events to the statistics collector, you're basically telling it which objects and events you want to gather data from (also referred to as event listening). In this model, you'll set up the collector so that it will listen to the processor and record the how long it takes to process flow items. In FlexSim, this statistic is usually referred to as the processor's staytime. Then, you'll set up a simple data table that will display the staytime for each item that is processed by the processor.
To set up the statistics collector:
data.labelName
.
Delete the text after the dot to change it to data.ItemStaytime
.Consider saving your simulation model at this point.
In this step, you'll open the data table to view the raw data being collected by the ProcessingTimes statistics collector you just created. You'll run a simulation model and watch the data table as it is populated in real time:
As the model runs, watch as the data table populates with staytime data after each flow item leaves the processor:
Notice also that the data table matches the rows and columns settings in the statistics collector you just created. Go ahead and close both the statistics collector and data table now.
In this step, you'll create a chart to visualize the data from the statistics collector. First, you'll choose a chart from the chart library that will graphically represent the data you're interested in. Then, you'll link this chart to the statistics collector to visualize the data that was collected in the data table.
Since the ProcessingTimes statistics collector is gathering data about the staytime of items in the processor, a histogram is a good way to represent this data. Histograms can display the trends in the frequency of processing times as a simulation model runs. In fact, you might recall that when you set up the statistical distribution for the processor in the first step of this tutorial task, the Distribution Chooser displayed a histogram for the normal distribution.
To create a histogram chart.
If you haven't reset your model yet, the histogram will update to display the data collected in the ProcessingTimes data table so far.
In this step, you'll run the simulation model long enough to get representative data about the processing times for the flow items.
Watch the histogram chart as the model runs:
You'll notice that gradually the Processing Times chart will begin to look more and more like the bell curve over time. Since you were using the normal statistical distribution to randomly assign processing times, that means you've successfully gathered data about overall processing times from your simulation model.
Now that you've completed this tutorial task, you've hopefully gotten a good sense of some of the basics of using the Statistics Collector. In the next tutorial task, you'll learn how to use the Statistics Collector to collect and compare data from multiple objects. Continue on to Tutorial 2.2 - Get Data from Multiple Objects.