<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FloWorks - Statistic Collector (states, basic statistic) in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531301#M40126</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; ,&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It can be that the state of the flow tank is reset after a network calculation. This makes setting your own states a bit more difficult. This looks a bit like the states of the task executer. I know this is something you wanted to discuss with Abel right?&lt;BR /&gt;&lt;BR /&gt;If you want I can take a look at your original model. If you don't want to post it in an open question here for everyone to see you can also email it to me. I can then summarize what we find under this post.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Mar 2022 09:22:40 GMT</pubDate>
    <dc:creator>patrick_zweekhorst</dc:creator>
    <dc:date>2022-03-03T09:22:40Z</dc:date>
    <item>
      <title>FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531283#M40108</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;Hello FlexSim Community!&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;I’ve faced several issues regarding the implementation of Statistic Collectors. Available tutorials are only about the standard usage of Flexsim, while I work with the FloWorks module. I’ve attached a sample of the model I am working on.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;Firstly, I wanted to add a statistic collector that records the daily state (Empty, Full, Filling, Releasing, Not Empty) of my tanks in hours during a simulation run (one year) - see Daily-States. To do so, I found this tutorial: &lt;/SPAN&gt;&lt;A rel="nofollow" href="https://answers.flexsim.com/questions/103600/statistics-collector-for-a-daily-collection-of-sta.html"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://answers.flexsim.com/questions/103600/statistics-collector-for-a-daily-collection-of-sta.html" target="test_blank"&gt;https://answers.flexsim.com/questions/103600/statistics-collector-for-a-daily-collection-of-sta.html&lt;/A&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;. However, the statistic collector generates zeros in the data table and I have no idea why. Maybe, there is a more efficient and simpler way to create such a collector. &lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;Then, I wanted to record daily statistics of my tanks: current, minimum, maximum, and average content, output, and input - see Daily_Statistics_A1. To get the idea of how to do so, I used this tutorial: &lt;/SPAN&gt;&lt;A rel="nofollow" href="https://docs.flexsim.com/en/21.2/Tutorials/AdditionalTools/Tutorial2StatsCollector/2-9OutputByHourByType/"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;-webkit-text-decoration-skip:none;text-decoration-skip-ink:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://docs.flexsim.com/en/21.2/Tutorials/AdditionalTools/Tutorial2StatsCollector/2-9OutputByHourByType/" target="test_blank"&gt;https://docs.flexsim.com/en/21.2/Tutorials/AdditionalTools/Tutorial2StatsCollector/2-9OutputByHourByType/&lt;/A&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;. But, it seems that the collector doesn’t reset some of the values for the next day (max and min) and accumulates them during a simulation run (a trigger?). Also, the collector avoids day(0), so you can see zeros &lt;SPAN style="color: rgb(0, 0, 0); font-family: Arial; font-size: 14.6667px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;in the first row&lt;/SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;In addition, it might be interesting to see how many times tanks reach their max and min volumes during a day.&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;I hope that my post will help other FloWorks users as well. &lt;/SPAN&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;PS&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;I haven't updated FlexSim to the latest version yet.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/47913-example-for-scs.fsm" target="_blank"&gt;Example_For_SCs.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Jan 2022 09:38:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531283#M40108</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-01-21T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531284#M40109</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Thank you for asking such a nice question and doing all the research. The example model also helps us for answering your question. In the attached example model I have tried to answer the first part of your question. I will update the answer later for the second part.&lt;/P&gt;&lt;P&gt;I have made a really simple and small ProcessFlow to collect all the data that you need. This little flow just saves the total amount of time spend in a state. If you know that of till the start of the current day you can calculate how much time was spend in each state at the end of the current day. This creates a table like shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1642774069960.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508731i103E45C173729E9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1642774069960.png" alt="1642774069960.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this more or less what you are looking for? If not please let me know. Also let me know if you need a little more explanation on how this works.&lt;BR /&gt;&lt;BR /&gt;Edit: &lt;BR /&gt;The second part of your question is a little bit more difficult. What I would do if I needed this information, is the following. I would create a tracked variable that exactly follows the content (or in/output) tracked variable of the tank. We can’t use the actual tracked variable because we will need to reset the tracked variable at the end of the day. To do this I again created a little ProcessFlow. The right part is just to follow the original tracked variable; the left part is to log everything at the end of the day. Please take a look at this flow and check if that makes sense. If not, we can always explain it a little more.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1642775821175.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508733i16484E7D353876B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="1642775821175.png" alt="1642775821175.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/47907-example-for-scstal.fsm" target="_blank"&gt;example-for-scsTal.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/47908-example-for-scstal-1.fsm" target="_blank"&gt;example-for-scsTal_1.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:08:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531284#M40109</guid>
      <dc:creator>patrick_zweekhorst</dc:creator>
      <dc:date>2022-01-21T14:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531285#M40110</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;Hello Patrick (&lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt;)! Thank you for your explicit answer. Firstly, I tried to “digest” the example model and check all used class references with the FlexSim Manual. The first answer is clear to me, only why did you use state(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial; color: rgb(147, 101, 184); background-color: transparent; font-weight: 700; font-style: italic; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;) in the SaveTimeState? Why do we need 1?&lt;/SPAN&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"&gt;&lt;SPAN style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"&gt;The second answer was a bit challenging to “digest” (not the logic behind it but rather the setting process), as there is not much information on tracked variables as in comparison to the Statistic Collector. I would appreciate your deeper explanation. One thing, when the Statistic Collector calculates the minimum content of each tank, it gives zeros in the Data Table. How to solve it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 11:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531285#M40110</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-01-24T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531286#M40111</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To answer your first question. The 1 is needed since you want to log the FloWorks states. The default FlexSim states are logged on the default profile. FloWorks extends on FlexSim and uses its own state profile. This is the first custom profile of the objects. Using the FloWorks dashboard templates automatically set the number 1 for the state logging. Now that we make our own statistics collector we need to do this.&lt;/P&gt;&lt;P&gt;For the second part: Tracked variables can be very useful for collecting statistics. Maybe you have seen the tracked variables in the ToolBox. In this case, since you want to track statistics per Tank you don't want to create all those tracked variables in the ToolBox. If you would do that you would need to add extra tracked variables each time you add a tank. Also linking the tank to the correct tracked variable might be a bit more work. That is why I created some tracked variables on the tokens. They work the same as the global tracked variables from the ToolBox, but just stored on a label.&lt;/P&gt;&lt;P&gt;This also automatically creates extra tracked variables if you need more tanks. For setting the event correctly you will first need to sample any of the tracked variables out of the ToolBox. This makes sure you have the correct event to listen to. You can then change the Object reference to token.ContentTrackedVar. This right part is just to copy the contents tracked variable from the tank. When this content changes we save the current content and the current rate, if the content is changing. Of the left we log and reset the log tracked variable each day. This is also where the log of the minimum content goes wrong (I forgot to save the latest model....) We don't need to reset the tracked variable to value 0 and the beginning of the day, but to the current content of the tank. This can easily be changed in the "Reset tracked var" activity. &lt;/P&gt;&lt;P&gt;Where we had contentLog.reset() we need contentLog.reset( conterVar.value ). This resets the tracked variable to the current content instead of 0. You in fact don't need the next line anymore if you do this. There is no need to set the value of the tracked variable anymore because it is already set correctly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1643049745263.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508735iE9DCF6DD31C4D7CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1643049745263.png" alt="1643049745263.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you already some steps further. If not feel free to send me an email for some more help.&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 18:42:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531286#M40111</guid>
      <dc:creator>patrick_zweekhorst</dc:creator>
      <dc:date>2022-01-24T18:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531287#M40112</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi 
 &lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt;,
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you for your explanation! I feel more knowledgeable in the topic now. &lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;A minor question. Since my tanks have initial volumes, is there a way to make the statistic collector (Daily Content) gather the data starting from the first day? I played with the Delay activity and it didn't work out. &lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jan 2022 15:36:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531287#M40112</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-01-25T15:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531288#M40113</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In that case we just need to set the initial value for the content log tracked variable. This can be done in the second SetCounters activity:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1643287173882.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508736i966EB70545AA6E11/image-size/large?v=v2&amp;amp;px=999" role="button" title="1643287173882.png" alt="1643287173882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Instead of 0 you can just put in the content of the tank.&lt;/P&gt;&lt;P&gt;Please let me know if this does not help&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jan 2022 12:39:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531288#M40113</guid>
      <dc:creator>patrick_zweekhorst</dc:creator>
      <dc:date>2022-01-27T12:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531289#M40114</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi! Sorry for such a late reply. Everything works! Thank you! Is there also a simple method to calculate daily states in percentages (24 h = 100%)?
&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Feb 2022 14:58:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531289#M40114</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-02-11T14:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531290#M40115</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I added a Calculated Table to the model to get the daily states as percentages. You just have to take each column in the DailyStatesCollector divided by 24, then display it as a percent. I also made the modifications that &lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt; pointed out in his replies to your comments above.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/48742-example-for-scstal-1-rc.fsm" target="_blank"&gt;example-for-scstal-1-rc.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I hope this helps! Let us know if you have further questions!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Feb 2022 17:30:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531290#M40115</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-02-17T17:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531291#M40116</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi 
 &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt;,
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you for your contribution in solving my issue. I've implemented your elegant solution in my current model, and it works just fine. I hadn't used Calculated Tables before, so it was a new learning experience for me :).&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:31:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531291#M40116</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-02-22T14:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531292#M40117</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;No problem! Glad to help!&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Feb 2022 21:34:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531292#M40117</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-02-22T21:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531293#M40118</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt;,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Actually, I have a pertinent question. I want add a custom state "Analysis" in my model, when a tank is being analysed (see the "Analysis_1" activity). How to do it? The purpose of it is that I can add this state to my statistic collector and collect more specific data. &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/48956-new-example-states.fsm" target="_blank"&gt;New_Example_States.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Feb 2022 15:37:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531293#M40118</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-02-23T15:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531294#M40119</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I modified your model to add the custom state you wanted. See the video below to see how I added the custom state into each tank:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="add-custom-state-demo.gif"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508742iE629D34F90D8640E/image-size/large?v=v2&amp;amp;px=999" role="button" title="add-custom-state-demo.gif" alt="add-custom-state-demo.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, I added a couple of Custom Code activities in your Process Flow to manually set the state to Analysis and then back to Full. I also added to the SaveTimeState and SetCounters activities a label for the time spent in Analysis, and I added related columns in the Statistics Collector and in the Calculated Table.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/49153-new-example-states-rc.fsm" target="_blank"&gt;new-example-states-rc.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Feb 2022 21:17:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531294#M40119</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-02-28T21:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531295#M40120</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you for answer, &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt;. How those two activities - "Set State (Analysis)" and "Set State (Full)" are actually connected? In my original model, I have multiple analyses, and two of them, for example, are conducted when a tank has received a certain amount of product. Besides, I've tried to do the same to truck multiple fillings of different products (blending), and it gives 0s.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 15:15:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531295#M40120</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-03-01T15:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531296#M40121</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Here's how those Custom Codes are set up:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="screenshot-2022-03-01-154616.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508739iF1E0845CF8B94AAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot-2022-03-01-154616.png" alt="screenshot-2022-03-01-154616.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You just reference the Object on which you want to set the state. I found that it wouldn't work well unless I included a Breathe activity before the first Set State activity, so you might want to try that. If you have multiple objects that you need to manually set the state of, then you can do that with multiple custom codes. You just need to make sure to add the custom state into each object's tree like I demonstrated in my previous post.&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 23:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531296#M40121</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-03-01T23:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531297#M40122</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt;,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Not really. Anyway, I've added to the model a new process which &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;logically&lt;/SPAN&gt; follows one of processes in my original model. There are multiple fillings and analyses (+ tech delay), and each of them has its own state. Also, I've updated SaveTimeState, SetCounters, and DailyStatesCollector (calculated table is not updated). Overall, States regarding fillings and tech delay don't work at all, while states regarding both analyses work fine. Could you check it and explain why some of them work and some of them don't work at all?&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/49214-updated-example-states1.fsm" target="_blank"&gt;Updated_Example_States1.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Mar 2022 18:53:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531297#M40122</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-03-02T18:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531298#M40123</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Sorry for the confusion! I updated your model, and it seems to work as you want now. I was able to solve most of the issues by adding in additional Breathe activities. The problems mostly seem to arise when certain events occur at the same timestamp, but still happen in a certain order. For example, the state would change from "fillingA," but then immediately change to "filling" since the tank technically hadn't started filling yet, and those states change automatically on the FlowObject. So, adding Breathe activities just helps to delay the Set State activities just enough, so they don't get overridden by the automatic state changes.&lt;/P&gt;&lt;P&gt;The only really weird thing is that the tank's state was randomly changing to "full" partway through its releasing process. This seems like it's probably a bug, so I just added a workaround by adding a Wait for Event and a couple Breathe activities to change the state back to "releasing" after it changes to "full."&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt;, would you mind taking a look at this potential bug? Thanks!&lt;/P&gt;&lt;P&gt;I also went ahead and updated the Calculated Table for the percentages. I hope this helps! Best of luck!&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/49231-updated-example-states1-rc.fsm" target="_blank"&gt;updated-example-states1-rc.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Mar 2022 20:34:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531298#M40123</guid>
      <dc:creator>ryan_c10</dc:creator>
      <dc:date>2022-03-02T20:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531299#M40124</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; , &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The problem that the tank goes into state full seems to be related to the model logic. At time 38 a token goes through the Set State (full) activity, which sets the state of tank A3. Looking at the logic I think this token should not be related to tank A3, but I am not sure about this.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1646294296426.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1508743iB59EDE4106950355/image-size/large?v=v2&amp;amp;px=999" role="button" title="1646294296426.png" alt="1646294296426.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Mar 2022 07:57:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531299#M40124</guid>
      <dc:creator>patrick_zweekhorst</dc:creator>
      <dc:date>2022-03-03T07:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531300#M40125</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/31536/ryanc10.html" nodeid="31536"&gt;@Ryan Clark&lt;/A&gt; ,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thank you for your prompt answer. It works well now in the example model, however I've faced one more issue. In my original model, both fillings (product A and B) usually takes a few days. Due to this fact, state "filling_A" (or "filling_B") changes to just "filling" after one day of operation. Is there a way to solve this (e.g., delete state "filling") ? Additional "breathe" activities doesn't do the trick. Maybe &lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt; knows the answer.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;In the updated example model I've attached to this answer&lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;, both fillings are prolonged, and &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;state "filling_A" (or "filling_B")&lt;/SPAN&gt; keeps being unchanged and works fine (see DailyStatesCollector and DailyStates_Percentages)&lt;/SPAN&gt;. Maybe my original model is too complex.&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/49271-updated11-example-states1-rc.fsm" target="_blank"&gt;updated1.1-example-states1-rc.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:16:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531300#M40125</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-03-03T09:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531301#M40126</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/32123/viktork4.html" nodeid="32123"&gt;@Viktor K4&lt;/A&gt; ,&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It can be that the state of the flow tank is reset after a network calculation. This makes setting your own states a bit more difficult. This looks a bit like the states of the task executer. I know this is something you wanted to discuss with Abel right?&lt;BR /&gt;&lt;BR /&gt;If you want I can take a look at your original model. If you don't want to post it in an open question here for everyone to see you can also email it to me. I can then summarize what we find under this post.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:22:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531301#M40126</guid>
      <dc:creator>patrick_zweekhorst</dc:creator>
      <dc:date>2022-03-03T09:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: FloWorks - Statistic Collector (states, basic statistic)</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531302#M40127</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/751/patrick.z.html" nodeid="751"&gt;@Patrick Zweekhorst&lt;/A&gt;,&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I see. It's not an urgent task for me at the moment, so I can ask about it during the last training session with Abel if he schedules the session any time soon (e.g., the first half of the next week). Thanks!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:28:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/floworks-statistic-collector-states-basic-statistic/m-p/13531302#M40127</guid>
      <dc:creator>viktor_k4</dc:creator>
      <dc:date>2022-03-03T09:28:58Z</dc:date>
    </item>
  </channel>
</rss>

