FlexSim Simulation Software

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
FAQ Downloads Calendar Search Mark Forums Read vBExperience Register

Tips and Tricks Share helpful modeling ideas

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 621
Downloads: 101
Uploads: 18
Thanks: 332
Thanked 1,024 Times in 415 Posts
Rep Power: 823
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default Virtual Queue Content

You can use flowitem recycling to speed up a model. Flowitem recycling uses more memory in order to store flowitem objects instead of destroying and recreating them. This helps increase the speed of a model run.

Conversely, a model may have too many flowitems and run out of memory. For this case, you could do the opposite of flowitem recycling: destroy flowitems when they are in queue and recreate them when they need to move downstream. This could be helpful if you have queues with so many flowitems that you run out of memory on your system.

Attached is an example model that has "virtual" content on a queue. OnEntry of the queue, it sends a delayed message in 0 time to check if the item is still in the queue. If it is, then it destroys that item and increments a label. When the downstream object (a processor in this model) becomes available, it sends a message to the queue to turn a virtual item back into a real item.

The itemtype and labels on the items are not preserved in this sample. If you want to preserve that data, you would need to store it somewhere else. This isn't a silver bullet for all memory problems, but it might give you an idea on how to minimize memory usage if you have queues with high content.

For fun, this model also custom draw code to draw a stack of boxes in the queue for its virtual content. Also, text visual tools are shown to display the actual number of flowitems in the model and the virtual queue content.
Attached Thumbnails
Click image for larger version

Name:	virtual_queue_content.jpg
Views:	153
Size:	11.5 KB
ID:	1759  
Attached Files
File Type: fsm virtual_queue_content.fsm (32.1 KB, 154 views)
Reply With Quote
The Following User Says Thank You to Phil BoBo For This Useful Post:
LINWEIXU (04-22-2012)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Flexsim on a Virtual machine Kenny Macleod Pre-sales Questions 5 08-30-2013 01:24 AM
Constant content of queue (or CONWIP) Stefan Trabut Q&A 4 05-04-2011 06:16 AM
Merge Sort Virtual Length John Behrends Q&A 1 12-13-2010 01:30 AM
Starting content in the Queue Bartosz Misiurek Q&A 4 10-04-2009 02:25 PM
How to get interval average,max,etc of a queue content ? qin tian Q&A 5 02-14-2008 09:11 PM


All times are GMT -6. The time now is 01:45 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright 1993-2014 FlexSim Software Products, Inc.

Powered by NuWiki v1.3 RC1 Copyright ©2006-2007, NuHit, LLC