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 > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 04-20-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
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:	174
Size:	11.5 KB
ID:	1759  
Attached Files
File Type: fsm virtual_queue_content.fsm (32.1 KB, 173 views)


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 02: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 10:11 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.