ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #21  
Old 09-09-2008
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 179
Downloads: 19
Uploads: 4
Thanks: 66
Thanked 60 Times in 32 Posts
Rep Power: 201
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Default

Hi, I wonder if your performance measures are valid. When you think of applying the results to programming a modell, you would have to initialize and define local pointers each time, which is time consuming for shure.
So when you do a performance measure for a method do you include all the prerequistes in the loop or not?
__________________
kind regards Nico.
  #22  
Old 09-09-2008
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

Hi Nico,

I believe your comments apply mostly to my comparison of math expressions vs. comparetext(), I was simply trying to isolate the equivalent of a comparetext() in math terms and not include speed difference between declaring doubles and strings. Again, I encourage you to perform the test you would like to see and post results/script.

It is also true that my test involving gettablenum()s, getlabelnum(), global variables and arrays is not an equivalent battle. I believe the value is in knowing the relative speeds of these commands in the event you have a choice of how you setup your model. For example, maybe you have a few select global parameters in your model, and you want to keep them in a Global Table but they get used a lot in various triggers in your model. Based on the speed results, you may consider creating corresponding Global Variables and setting them to the table values on a reset event. Then use the Global Variables in your model logic instead of gettablenum().

I am not sure whether Cliff declared the LocalVariablePointer before every excecution of the get... in his test. Yes, it would be interesting to see the difference. I think in many cases (like a schedule) within a given trigger you might read an entire row of data or create items/events based on numerous rows (like a day's worth of rows). In these cases the number of times you have to declare the LocalVariablePointer start to decrease significantly.

Kris
The Following User Says Thank You to Kris Geisberger For This Useful Post:
Nico Zahn (09-09-2008)
  #23  
Old 11-06-2009
Vincent Bechard Vincent Bechard is offline
Consulting in Simulation
 
Join Date: Oct 2008
Location: Montréal (Canada)
Posts: 28
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 41 Times in 13 Posts
Rep Power: 165
Vincent Bechard will become famous soon enoughVincent Bechard will become famous soon enough
Smile Flexsim 4.52: flexscript vs C++ running time

Hi,
I am currently developping a new Flexsim library which will enable me to simulated continuous processes. I need to model chemical reactors, crushers and particle separators. I had a hard time trying with the Fluid Library and I needed too many customized blocks.
To produce this new library, I wrote hundreds of lines code. It is design to be very fast if running in Flexscript, but I wanted to have the possibility to switch to C++ and compile easily. It effectively compiles without a single warning.

After a few months of development, I wanted to know if all that pain was worth something. I benchmarked an old study we have realized of a continuous process that was modeled with the Discrete objects only. This process was re-modeled but with the new library. The simulation contains 150 blocks and spreads over a full year of operations including reliability, shcedules and tasks sequences. Hardware used: Dell Precision M70 (2GHz, 2G of RAM), WinXP SP3 and Flexsim 4.52. Here are my findings:
1) The old simulation was 110 times slower (1400 seconds versus 13 seconds) than the version built with my library. This little 13 seconds also provides a complete mass balance and the handling of several chemical species and particle sizes.

2) Flexscript vs C++: numberous simulations provided a nice rule of thumb : C++ is 2.4 times faster than Flexscript (in version 4.52). The model is almost pure code with no events nor flowitems.
I found really interesting that 2.4 factor between C++ and Flexscript. For small models, it means to me that I don't need to care about compiling. For large models, compiling will be required only for repeated runs such as during optimization.

Question: what will this factor become in Flexsim 5.0? I will be very pleased if I discover it under 2...

Vincent Béchard, ing., M.Sc.A.
Simulation & optimization
__________________________
SNC-Lavalin Devonyx Inc.
360, St-Jacques O.
Montréal (Canada) H2Y 1P5
514-845-2166 #2204
  #24  
Old 11-18-2009
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default Speed up modell rum

I had same problems some time ago. Didn´t think about change query. I believe the easiest way to speed up the modellrun very much, is to set the STOP TIME and close all view windows. After the run stops I open the relevant windows and see what data has done.


Thread Thread Starter Forum Replies Last Post
Displaying the simulation time with the various date/time formats. Regan Blackett Tips and Tricks 12 11-12-2012 08:01 AM
Problems with Excel-Import tobias.biemueller Q&A 1 06-18-2008 06:17 AM
Problems with wrl file Steven Hamoen Q&A 1 01-25-2008 06:00 AM
Flexsim instance is still running for over a minute Martin Saler Q&A 1 10-04-2007 11:44 PM
Graphics problems Yaghm Installation 5 09-28-2007 02:12 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.