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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2012
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 113
mearjun will become famous soon enough
Default How to change the output strategy of a queue ?

Normally a queue releases the items on a first come first go basis. Is there a way that this decision can be taken on the basis of a label value on the item instead of first come first go.
Is there a possibility in Flexsim to add a dynamic label on an item. One whose value keeps on changing. I know its a discrete event based simulation package but still .. ??
Reply With Quote
  #2  
Old 10-15-2012
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: 445
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

No dynamic attributes. As you said, it is discrete event simulation so you have to find the event where the state of the items change one-by-one. Although in the real world an attribute may be constantly changing, there are usually certain thresholds that trigger a change in state. Also, sometimes this state change may only be observed upon an independent re-evaluation event that is periodic or scheduled.

You can try to sort the items as they enter the queue (OnEntry: Sort By Expression), however if the items are there to await their state change in order to leave then this will not suffice. Consider using a rack object as it has a dwell time function.

The approach with the most control is to manually release the items. Choose Do Not Release Item in the Send To Port of the queue (or just return -1), then it is up to you to determine when you want to release each item at a later time. A message trigger is usually used to hold evaluation logic that gets executed every time the state of an item changes, or when a downstream destination becomes available to receive again. It would have at least one for loop to evaluate all possible candidate items, using getitemstate() to make sure that you have not already released the candidate item (it could be waiting for a transport), then finally releaseitem(itemyouwanttorelease, portnum) once you have evaluated all candidates and found the best choice.
Attached Files
File Type: fsm manually releasing items v6.0.2.fsm (32.7 KB, 124 views)
File Type: fsm manually releasing items v5.1.2.fsm (32.7 KB, 92 views)

Last edited by Kris Geisberger; 10-20-2012 at 08:55 PM. Reason: added model
Reply With Quote
The Following 5 Users Say Thank You to Kris Geisberger For This Useful Post:
Jörg Vogel (10-16-2012), mearjun (10-20-2012), Sebastian Hemmann (10-16-2012), Steven Hamoen (10-16-2012), Veronique Dossogne (10-19-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 Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mix Pull and Push Strategy MoserGaudenz Q&A 1 06-23-2011 03:29 AM
RE: Change the rank of output ports of a object using flexscript gadirajus Q&A 3 04-21-2011 02:44 PM
output order of objects juan alberto Q&A 4 06-21-2010 05:15 AM
Pulling from a Queue vs Sorting the Queue Brandon Peterson Tips and Tricks 3 03-03-2010 01:27 AM
Problem with Processor Output avinash Q&A 2 03-26-2008 09:19 AM


All times are GMT -6. The time now is 04:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.