ATTENTIONThis 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 |
#21
|
||||
|
||||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
||||
|
||||
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 |