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

  #1  
Old 04-03-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Question Model Speed

What has the greatest effect on a model run speed - the number of object or the number of flow items?

I am coming to the end on the building of model which consists of 63 objects (sources, reservoirs, conveyors, processors, combiners, queues and racks) with a combined ability to hold close to 95,000 flowitems.

I have run the model several times to 1000 (model time) with object history on (90mins) and off (80mins) with the speed set at 10. At the begining of the run the speed is slow, however, by the end of the run it takes nearly 12secs to do 1 (model time). My concern is that to run the model fully through one cycle I need to do a full week which would mean going up 10,080 in the model.

Within in the model there are a label changes and counts, along with a few item type changes yet it may be the 12 global tables that are read from and written to which have the highest impact.

Can anyone suggest a way of helping speed the model up to a point of useability and allow me to keep some form of object history as once complete the model will be run with numerous scenarios.
  #2  
Old 04-03-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

He Alistair,

63 objects is nothing. 95000 flowitems is something but not enough to get the slowdown you are talking about.

Have you used the search option of the Forum?

For instance this post might of interest: http://www.flexsim.com/community/for...read.php?t=460

Another point, certainly with a large amount of object, do you recycle? (and I don't mean in the real world, but do you recycle your flowitems)

Steven
  #3  
Old 04-03-2009
tobias.biemueller tobias.biemueller is offline
Flexsim User
 
Join Date: Aug 2007
Location: Bielefeld, Germany
Posts: 42
Downloads: 22
Uploads: 0
Thanks: 23
Thanked 18 Times in 16 Posts
Rep Power: 164
tobias.biemueller is on a distinguished road
Default

Hello Alistair,

you should think about, if you need all the 95000 flowitems in progress. Maybe its possible to combine some or to store the data in tables or nodes.
In my experience i have learned that too many flowitems in a model decrease the runspeed, so im trying to make some previously strategies to reduce them.
Running a model without the OrthoView (close the ortho view) then the model also run faster then with the animation.

You can find also some issues/hints in this thread:
http://www.flexsim.com/community/for...read.php?t=460

Best regards.
Tobias
  #4  
Old 04-03-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default

Steven/Tobias,

Just to answer your questions:
- I did have a look at the thread and tried to convert all the code to c++ but got over 100 (well it stoppped at) errors, so I guess I'll have to go through all the flexscript and change it manually, but at present the model contains both.
- I do recycle the items that are removed from the model which is in one of the combiners.
- I have already reduced the number of flow items as originally the model was set up to run in kg's but parts could be dealt with using ton's as over 8.5mil flow items would have been to many......................
- These times are with the ortho window closed and flexsim minimised.

If this help clear the muddy water................
  #5  
Old 04-03-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Ok, it seems you have done the obvious. you are sure you don't use node() a lot?

Are you pulling from big queues?
Are there a lot of products on conveyors and in queues? Have you tried switching the animation of conveyors off and on the queue have you selected nothing for the placement of products?

Maybe use the funtion realtime to find out what pieces of code are giving you a headache. So write realtime before you execute and after and simply take a look at how long it takes to execute them. That way you can locate the ones that take the longest and maybe post them here or then you can find out yourself what is going wrong.

I recently made a model wich was a turkey slaughter machine doing between 30 - 40000 turkeys a day which are split up in different pieces but say on average 4 which means 160000 pieces and a week could be run in a few minutes (3-5) all Flexscript.

Steven
  #6  
Old 04-06-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default

Inside the model the major objects which hold the flow items have the following sizes:
2 x 20,000
1 x 8000
2 x 7000
1 x 3840
1 x 3000
With the rest ranging between 10 and 2500.

What is causing more of an issue now is that the model does seem to have an error in it somewhere (I think it has something to do with my combiners see /threads/thread553&page=8 numbers 146 and 147) which is preventing the model running properly.

Thanks
Alistair
  #7  
Old 04-06-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

What are the objects that hold 20.000? are those queues? then take real good care that the queue is not trying put the products on a location or something because that would explain why your model is getting slower, the more products are present.

Also if you are combining large amounts of products that might also slow things down.
  #8  
Old 04-06-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default

I only have two queues in the model with limits of 10 items the rest are reservoirs, I don't know if that effects anything. With regard to the combiners there are 6 of them with 3 combining up to 2500 items per cycle, the others are 110 and below.
  #9  
Old 04-06-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

2500 for a combiner is something but should not be too big a problem. You have checked "Convey Items Across Combiner Length" off?

You are also seperating them again? This combination of combining and seperating might get slow because you do a lot of moveobject where all kinds events are triggered again.

I just thought of something else to check, you can take a look at your eventlist to see what is all on there and you can probably also check what kind of things are either triggered a lot or take a long time to handle.
  #10  
Old 04-06-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default

Quote:
Originally Posted by Steven Hamoen View Post
Ok, it seems you have done the obvious. you are sure you don't use node() a lot?

Steven
This may seem like a daft reply but just to go back a minute when you say node(), that does include the treenode formally fsnode function because if so then yes it used heavily becuase I don't like using center connections.

Is there a better (more efficent) way of doing this that won't kill the model.

Ali
  #11  
Old 04-06-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

No, treenode or fsnode are variable types, so using them is only declaration and actually using those, in stead of using other pointers, is very good.

With node I meant constructions like: node( "/Queue5", model())

Those are slow because Flexsim has to search through the tree until it find this particular object.

Another thought, If you use splitters, do you also use recycle flowitems?
  #12  
Old 04-06-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default

I do have node( "/Queue5", model()) as part of the treenode function that sits in the onentry, onexit, onprocessfinish, etc functions.

Could this be the problem.

If so could I set the the pointers up in the onreset trigger and use them in other triggers or could they even be set up in a global function save putting the same pointer in multiple objects and triggers?
  #13  
Old 04-06-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

That might indeed give you problems. Better to use for instance rank, inobject or even better using global variables. See also this post/thread:
http://www.flexsim.com/community/for...speed#post2963


Using names means comparing strings and that is something you have to prevent.
  #14  
Old 04-06-2009
Alistair Smitheman Alistair Smitheman is offline
Flexsim User
 
Join Date: Aug 2007
Location: Nottingham, England
Posts: 43
Downloads: 6
Uploads: 0
Thanks: 21
Thanked 1 Time in 1 Post
Rep Power: 157
Alistair Smitheman is on a distinguished road
Default global variable

This may come across as an obvious question, but if a were to use the treenode function of a global variable then could I use the name of the global variable in any trigger on any object in the model.

The reason I ask is for my model I do several checks to see of other items are empty or if their contents are of a particular level.
  #15  
Old 04-06-2009
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Yes, you can. If you make for instance a global variable "MyQueue" and make it point to a queue in your model, you can use MyQueue in any trigger in your model.


Thread Thread Starter Forum Replies Last Post
Is the CPU usage depending on run speed? Tom David Q&A 1 07-29-2008 01:25 PM
What Slows Down Model Speed? Xavier Jackson Q&A 1 06-26-2008 09:09 AM
Standard Operator speed/ acceleration/ decelleration Paul Dowling Q&A 0 06-18-2008 09:24 PM
Increasing Run Speed Alex Christensen Tips and Tricks 3 05-14-2008 04:11 PM
TaskExecuterFlowitems rotate now! Can I change their rotation speed? Martin Kooijman Gripes and Goodies 1 02-25-2008 06:41 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.