<?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: Speed issues in a large, complex model in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521753#M32432</link>
    <description>&lt;P&gt;If the event list view is open, the view itself will be sorting the event list each time it redraws, which will be slow.&lt;/P&gt;&lt;P&gt;You can use this code to see how many events are pending:&lt;/P&gt;&lt;PRE&gt;content(node("MAIN:/1/1/events"))&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Sep 2016 16:24:52 GMT</pubDate>
    <dc:creator>philboboADSK</dc:creator>
    <dc:date>2016-09-13T16:24:52Z</dc:date>
    <item>
      <title>Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521750#M32429</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;We are modeling a high-throughput widget factory. We would like to simulate one week of production, and have the simulation complete in a few hours or faster, but we've found that our large quantities of widgets significantly 
reduce the speed of our FlexSim model.&lt;/P&gt;&lt;P&gt;We 
have already gone through several rounds of trying to optimize the model, including incorporating all the &lt;A href="https://answers.flexsim.com/questions/25025/speeding-up-a-simulation-model.html"&gt;suggestions found on the old and new FlexSim forum&lt;/A&gt;. For our latest attempt we converted all our logic to 
Process Flow so we can completely &lt;A href="https://answers.flexsim.com/questions/ask.html?space=9"&gt;uncouple the Perspective View layer&lt;/A&gt;. 
We can essentially &lt;A href="https://answers.flexsim.com/questions/23230/hide-all-flowitems-to-speed-simulation-run.html"&gt;turn off all the flow items&lt;/A&gt; and have the model run 
only in Process Flow. Unfortunately the model is still very slow. We fear this may be a model that FlexSim won't be 
able to handle. &lt;/P&gt;&lt;P&gt;We are considering reducing the number of items 
with a factor, so that one token represents 10+ widgets. This may 
help, but could impact the model's accuracy. &lt;/P&gt;&lt;P&gt;So before we start reducing the model, is there anything else we can consider that would significantly increase the 
processing speed of the model? We submitted our model separately in a private question. The Process Flow is what runs the whole thing, and the 
global variable ShowModelVisuals, toggles the flow item generation. Keep in mind that there is supposed to be an additional production 
line in the model that is a copy of the current one, and a packing area 
after those. With those additional areas we are potentially facing a doubling of the 
item count that is already killing our model.&lt;/P&gt;&lt;P&gt;Furthermore, is seems that 
FlexSim is not utilizing the computer's processing power very well. We 
are aware that the software can only use one thread, but is also seems 
that its not fully using that thread either. CPU utilization never 
exceeds 18%.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:57:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521750#M32429</guid>
      <dc:creator>Ben_WilsonADSK</dc:creator>
      <dc:date>2016-09-13T15:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521751#M32430</link>
      <description>&lt;P&gt;
	The problem is not necessarily in the number of items
 you have in your simulation. The problem is in the size of the event 
list at any given time.&lt;/P&gt;&lt;P&gt;
	For example, when this model gets to steady-state, you have roughly 42,000 events on the event list.&lt;/P&gt;&lt;H5&gt;Testing This In Your Model&lt;/H5&gt;&lt;P&gt;
	First, I opened the Statistics view of your Process Flow's Sink activity so that I could see how many widgets get completely processed.&lt;/P&gt;&lt;P&gt;
	Then, when you run the model, you can see this value slowly increase as the model runs.&lt;/P&gt;&lt;P&gt;
	Now,
 you can compare how many widgets per real second are being processed, 
rather than comparing how many simulation minutes are being processed 
per real second.&lt;/P&gt;&lt;P&gt;
	For example, on my computer with your model, the Sink's input after 30 seconds is 2,848. So 2,848 widgets got processed in 30 seconds.&lt;/P&gt;&lt;P&gt;
	Now adjust your inter-arrival 
time in your ModelParameters table from 0.3 to 300. Run the model at max
 speed and see how many widgets get processed in 30 seconds. On my 
computer, it processed 127,739 widgets in 30 seconds.&lt;/P&gt;&lt;P&gt;
	Unless I'm 
misunderstanding how your model works, the only thing that is changing 
between these two runs is the amount of widgets in the system 
simultaneously. Thus changing how many events are queued on the event 
list at a given time. With the inter-arrival time at 300, you have 
roughly 45 events on the event list at steady-state.&lt;/P&gt;&lt;P&gt;
	With less events on the event list at once, you can process about 250,000 widgets per real minute vs 6,000 widgets per real minute.&lt;/P&gt;&lt;H5&gt;The Answer&lt;/H5&gt;&lt;P&gt;
	So
 the answer to your question is that you need to adjust how your model 
is configured so that you have less pending events on the event list at any
 given time.&lt;/P&gt;&lt;P&gt;
	Here's a general example of how you could think about solving this problem:&lt;/P&gt;&lt;P&gt;
	Imagine
 you have a conveyor with 50,000 items on it at a time, with 1 item 
coming onto the conveyor and 1 item leaving the conveyor every 1 second.&lt;/P&gt;&lt;P&gt;
	If
 you model each item individually entering the conveyor and creating an 
event to leave the conveyor after the amount of time that it takes to 
convey it across the conveyor, then you will have 50,000 events pending 
for those items.&lt;/P&gt;&lt;P&gt;
	If instead, you kept a label that shows how many 
items are on the conveyor, and you created 1 event for the first item to
 leave, then in that event, created the next event for the next item 
leaving in 1 second, and so on, then you would only have 1 event on the 
event list at a time that represents when the next item will leave that 
conveyor.&lt;/P&gt;&lt;P&gt;
	(This example is actually quite similar to how the 
Conveyor module conveyor object works; it minimizes the number of events
 that are pending on the event list. You can see that in the &lt;A href="https://answers.flexsim.com/storage/attachments/2382-giant-conveyor.fsm"&gt;attached model (giant-conveyor.fsm)&lt;/A&gt;, which shows a conveyor with 13,822 items on it at once, but only 2 
pending events on the event list at a time. The number of flow items 
going through the system per real minute is about 1,800,000 on my 
computer. FlexSim can handle simulating this system; you just need to 
adjust how you think about the problem so that you can model it 
efficiently.)&lt;/P&gt;&lt;H5&gt;How To Fix This&lt;/H5&gt;&lt;P&gt;
	So rather than having a 
token that represents each widget, that then has a pending event for each widget in your simulation, you should think about what problems you are 
actually trying to solve by running this simulation. Depending on what 
questions you are trying to answer, you should restructure your 
simulation's logic so that it is based on the actual process on the 
system and not necessarily based on processing each widget as a unique 
entity that has a pending event on the event list at all times. This is 
especially true where you have constant values and rates rather than 
stochastic values.&lt;/P&gt;&lt;H5&gt;CPU Utilization&lt;/H5&gt;&lt;P&gt;
	While FlexSim is 
running the model, the Windows task manager will show its usage at 
approximately 1 core of your processor. If you have a 1-core processor, 
it will show about 99%. If you have more cores, and if Hyper-Threading is enabled, it will show a lower 
percent.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 16:21:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521751#M32430</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-09-13T16:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521752#M32431</link>
      <description>&lt;P&gt;To view the event list go to the main menu option "Debug -&amp;gt; Event List"&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 16:24:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521752#M32431</guid>
      <dc:creator>Brandon_Peterson</dc:creator>
      <dc:date>2016-09-13T16:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521753#M32432</link>
      <description>&lt;P&gt;If the event list view is open, the view itself will be sorting the event list each time it redraws, which will be slow.&lt;/P&gt;&lt;P&gt;You can use this code to see how many events are pending:&lt;/P&gt;&lt;PRE&gt;content(node("MAIN:/1/1/events"))&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Sep 2016 16:24:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521753#M32432</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-09-13T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521754#M32433</link>
      <description>&lt;P&gt;Attached is a sample model that implements a different kind of delay, emulating
the way the conveyors work.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.flexsim.com/storage/temp/2383-conveyordelaytest-runsubflow-1.fsm"&gt;conveyordelaytest-runsubflow-1.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Rather
 than using a Create Tokens activity, it uses a Run Sub Flow activity 
without a Finish activity. That way, it doesn't release the tokens 
automatically, but rather waits for you to release them explicitly with 
releasetoken().&lt;/P&gt;&lt;P&gt;Then, the 
releasetoken() can release it out connector 1 rather than an activity 
reference on a label so that you can connect and use the Low Event Delay
 activity just like any other activity, without breaks in your process 
flow.&lt;/P&gt;&lt;P&gt;I set up the DelayFlow activities so that the first token 
doesn't get reused because when you do that, the parent token keeps its 
link to that token, and it doesn't get destroyed properly when you send 
it to a sink (Run Sub Flow doesn't create independent tokens). Instead, 
it creates a new token that continues looping through, and kills the 
token that is tied to the parent token that got released. This messed up
 the "current" reference though, so I stored it on a label at the 
beginning and access it with that label instead of current.&lt;/P&gt;&lt;P&gt;I hope that makes sense.&lt;/P&gt;&lt;P&gt;This
 model also demonstrates using a Model Documentation widget on a 
Dashboard to show the number of pending events on the event list using 
the code I wrote in my previous comment above.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 16:35:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521754#M32433</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-09-13T16:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521755#M32434</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is something that we will have to keep in mind in the future when designing all our models. It's not so much the number of items in the model that is a problem, but the number of events that they generate. If we keep this in mind we can perhaps find efficient ways to transport objects and information through the model with as few events as possible. &lt;/P&gt;&lt;P&gt;If I had such skills it would probably be cool to create this "FIFO Delay Activity" as a stand alone activity. I might be a good first foray into the making of my own Flexsim objects in C++. For now the subflow from this thread will have to do. &lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 07:14:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521755#M32434</guid>
      <dc:creator>MBJEBZSRG</dc:creator>
      <dc:date>2016-09-14T07:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521756#M32435</link>
      <description>&lt;P&gt;We've added a case to the dev list to look into optimizing the ProcessFlow activities to minimize the number of events that they create. That way, the regular delay activity could handle this optimization, and the original way you designed the process flow would be much faster.&lt;/P&gt;&lt;P&gt;We've done that with the regular FlexSim objects and the Conveyor and AGV modules, but not the ProcessFlow activities yet.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 16:17:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521756#M32435</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-09-14T16:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521757#M32436</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@phil.bobo&lt;/A&gt; This answer contains so much information that I think it shouldn't be in the help space. It is more an article or like an item of the manual or a good practice. Can you move it in another space?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 04:50:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521757#M32436</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2016-09-15T04:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521758#M32437</link>
      <description>&lt;P&gt;After discussing this internally some more, we did some more tests. The slowdown is because of the number of events, but not because of finding the next event to execute. Finding the next event to execute is actually a really fast process, even with a large event list. The actual slowdown is happening when tokens get destroyed; they are traversing the event list to destroy events that involve that token. We have updated our dev case with this new information so that we can add performance optimizations to make this much faster in a future version. For now, the best method is to indeed limit the size of the event list (and that's always a good practice), but in a coming release, we will make it so that this modeling situation will be a lot faster despite the large event list.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 16:34:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521758#M32437</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-09-16T16:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521759#M32438</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi 
 &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@Phil BoBo&lt;/A&gt; ,
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;About what you said of CPU utilization, there is any possibility of utilizing more cores from the computer processor? I also have a complex model to run for a long period of time and I'd like to do it faster.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Jun 2023 18:55:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521759#M32438</guid>
      <dc:creator>pedro_veigaZFLBT</dc:creator>
      <dc:date>2023-06-21T18:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521760#M32439</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;You can take advantage of multiple cores when running experiments with each replication using its own core.&lt;P&gt;Have you profiled your model for performance to see where it might be improved?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Jun 2023 20:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521760#M32439</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-06-21T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521761#M32440</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Hi Jason, thanks for your instructions, I've been reading 
 &lt;A rel="nofollow noopener noreferrer" href="https://answers.flexsim.com/content/kbentry/6/recommended-system-requirements.html" target="_blank"&gt;this article&lt;/A&gt; that explains to me how to speed up the simulation of a single scenario model.
&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Jun 2023 18:14:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521761#M32440</guid>
      <dc:creator>pedro_veigaZFLBT</dc:creator>
      <dc:date>2023-06-26T18:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Speed issues in a large, complex model</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521762#M32441</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Great - here's the information on the &lt;A href="https://docs.flexsim.com/en/23.1/Reference/Tools/PerformanceProfiler/PerformanceProfiler.html"&gt;Performance Profiler&lt;/A&gt;.&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Jun 2023 12:00:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/speed-issues-in-a-large-complex-model/m-p/13521762#M32441</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-06-27T12:00:50Z</dc:date>
    </item>
  </channel>
</rss>

