question

Zheng Yang S avatar image
0 Likes"
Zheng Yang S asked Zheng Yang S commented

Building charts for process flow models

Hi,

I have just started using FlexSim and I am currently in the midst of doing the tutorials. Tutorial 1.2 explains how certain charts can be created for 3D models. I have been unable to replicate these same charts for the process flow model in 1.4. The types of charts I am looking to replicate are:

1. A chart tracing the number of 'happy' and 'unhappy' customers. I can still get the information out in separate charts but I am not sure how I can combine them in one. Under the 3D model case, a custom statistics collector was used by sampling sink objects for 'happy' and 'unhappy'. I tried sampling the sink processes instead but it doesn't seem to work when using the process flow model.

2. A state chart which shows the service desk utilization (idle & processing). Because the service desk is now broken up into a processes instead of a single object, I am not sure how this can be done.

I will really appreciate if some assistance can be provided. Thank you!

Regards,

Zac

FlexSim 17.2.3
creating charts
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

Jordan Johnson avatar image
3 Likes"
Jordan Johnson answered Zheng Yang S commented

I made a super basic model in Process Flow that demonstrates how to get the charts you are looking for:

tutorialpfcharts.fsm

This is an excellent question! The answer is long, but it demonstrates how FlexSim can record any custom data you might need, and how you can chart that data.

Making the Time Plot

Note: Making this time plot is a much simpler process in FlexSim 2018. You can download the beta version of the software and try the new Chart Template feature.

Here are the steps I used to create the time plot:

  1. I made a new group, and put both sinks in it. To make a new group, use the plus button in the toolbox to add a group. Then, use the sampler on the group interface to add the two sinks.
  2. I made a new Statistics Collector. To make a Statistics Collector, again use the plus button in the toolbox to create a statistics collector.
  3. On the Statistics Collector Event Listening tab, I used the sampler to listen to OnInputChange of the group. To do this, click the sampler button, and hover over the new group in the toolbox.
  4. On the Data Recording tab, I added three columns (using the plus button in the columns area):
    1. Time - I added a new column, and changed its name to Time. For the value, I used the down arrow to pick Time->Model Date/Time.
    2. Object - I added a new column, and changed its name to Object. For the value, I used the down arrow to pick Event Object->Name of the event object.
    3. Input- I added a new column, and changed its name to Input. For the value, I used the down arrow to choose Event Data->Event Data Label Value. Then I changed "labelName" to "newValue" in the value field.
  5. I created a new Time Plot dashboard. For the data source, I chose the new Statistics Collector. I made sure to set the x values to the Time column, and the y values to the Input column. Then I checked the Object box, so I could split by an object as well.

Making the Utilization Plot

Here are the steps I used to create the utilization plot:

  1. I made a new Statistics Collector
  2. On the Data Recording tab, I changed the Row Mode to Enummerate.
  3. I used the sampler by the Enumerated Rows list to sample the Resource
  4. I added a column, and changed its name to Utilized. I set the update mode of this column to Always, and I set the Display Format to Percent. I set the value of this column to the following code:
    (2 - getstat(data.rowValue, "ResourceAvailable", STAT_AVERAGE)) / 2.0
  5. I added a column, and Changed its name to Idle (perhaps unutilized would be better). I set the update mode to Always, and I set the Display Format to Percent. I set the value of this column to the following code:
    getstat(data.rowValue, "ResourceAvailable", STAT_AVERAGE) / 2.0

This code gets the average amount of "ResourceAvailable" from the resource; it's a stat that the Resource object keeps. If the amount of available resource were to change during the model run, this number still stays accurate. However, in our case, the value is static. So we can then calculate the Utlization of the resource as (total - available) / total.


· 4
5 |100000

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

Zheng Yang S avatar image Zheng Yang S commented ·

Hi Jordan @jordan.johnson,

Thank you so much for the help! Really appreciate it :)

I attempted to use the statistics collector for the time plot to generate the throughput chart, which basically shows the total number of happy/unhappy customers in the sink at the present point in time. I can't seem to use the statistics collector made for the time plot as the chart adds a new row for every time the input changes. Would it be possible to use the same statistics collector to generate these throughput charts?

As for the utilization chart, may I know what the number '2' in the code [(2 - getstat(data.rowValue, "ResourceAvailable", STAT_AVERAGE) / 2.0] represents? Is it the number of service counters? Would it also be possible to track individual service counters instead of an overall average utilization rate? In the 3D model we could do that just be sampling the specific counter but it doesn't seem to be efficient when we are working with much larger models with more counters.

Zac

0 Likes 0 ·
total.jpg (45.4 KiB)
Jordan Johnson avatar image Jordan Johnson ♦♦ Zheng Yang S commented ·

Sorry about that! I didn't quite understand your original question.

Making the Bar Chart/Table

To make the bar chart and table, first you need to make a statistics collector:

  1. Add a new statistics collector
  2. On the Data Recording tab, change the row mode to Enumerate, and add both Process Flow sinks.
  3. Add two columns:
    1. Add a column. Rename it Object. For the Update, choose When Row is Added. For the Value, use data.rowValue.name. For the Storage Type, use String
    2. Add a column. Rename it Input. For the Update, choose Always. For the Value, use the down-arrow to select Object Statistics->Statistics By Object. On the resulting popup, use the down arrow to choose data.rowValue. For the Statistic, choose Input. Leave the Type at Current. Then close the popup. For the storage type, use Integer, and leave the Display Format on Raw.

Once you have made the statistics collector, you can create a bar chart and table from the same collector. For the bar chart, be sure to include the "Input" column, and set the Bar Title to the Object column. For the Table chart, just be sure to include both columns.

0 Likes 0 ·
Zheng Yang S avatar image Zheng Yang S Jordan Johnson ♦♦ commented ·

Works great now! Thank you for the help :) @jordan.johnson

0 Likes 0 ·
jing.c avatar image jing.c commented ·

Excellent demo! Thanks~

0 Likes 0 ·