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 |
#1
|
|||
|
|||
Release schedule
Hi all,
What is the best method to release all items in a queue to a queue further down the line at a specific time on a recurring basis? It's basically a order cutoff schedule that runs. I am trying the fmod() command and an if statement, but I don't seem to be winning. Any help would be appreciated. Thanks Roland |
#2
|
|||
|
|||
Roland, the sendtoport only gets fired when the flowitem is released by the object (which is as soon as it enters for the queue's case).
You can: a) Hold all items via the sentoport (return -1 always) and then create an event at scheduled times via a user event or repeated message to itself, which you use to release all the items that are in the queue via port number 1 (releaseitem(item,1) ) which may not be good enough if some items are blocked and can not leave before the next release timeor: b) Close the output of the queue on reset and schedule an event to open the output at certain times (same event process as a) ) - you'd then need to decide when the ouput closes again - could be when the queue is empty or after a zero time delay (since you are feeding another queue this would allow the downstream one to take up to its capacity in one go)Hope that helps Jason |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Roland Tainton (03-16-2009) |
#3
|
||||
|
||||
Roland
Not sure whether this helps, but I had a similar situation recently with modeling order-cut off schedule. In this case, this is what I did: 1. add two queues (Q1 and Q2) and an invisible processor (P) (basically turn off display). 2. position the processor such that the Q1's output is connected to P and P's output is connected to Q2 (basic flow through) 3. add a global table that reflects the hourly work load for orders by time of day. 3. create a user event like Jason suggested that fires every hour that does the following: a. read the global table listing the hourly work load expected for THAT hour b. create required number of flowitems into the model via insertcopy command from the recycle bin c. move the newly created flowitem into the queue Q1 d. Once the Queue Q1 gets its dump of hourly orders, meter it out to Q2 via the processor P with a process time of n seconds per order to mimic a steady stream of orders coming into Q2 at regular intervals. For example, I set the processor P process time to 12 seconds to stream 5 orders per minute to the downstream Queue. In your case you can vary it by any number that is more appropriate to your situation. Hope this helps. |
The Following User Says Thank You to Shankar Narayan For This Useful Post: | ||
Roland Tainton (03-16-2009) |
#4
|
|||
|
|||
Ended up using the repeated message to itself as suggested by Jason. Works really well.
Thanks for the help Attaching model for any other new users |
The Following User Says Thank You to Roland Tainton For This Useful Post: | ||
Kris Geisberger (03-19-2009) |
Thread | Thread Starter | Forum | Replies | Last Post |
Arrival schedule Source | Nico Zahn | Q&A | 3 | 12-15-2008 04:23 AM |
Import of data in schedule of a source | Matthias Hofmann | Q&A | 3 | 10-07-2008 09:30 AM |
Release from Network Node | Gavin Douglas | Q&A | 2 | 06-12-2008 12:39 PM |
How to use the actual date/time data in Arrival Schedule Mode of Source | syseo | Q&A | 0 | 10-12-2007 08:22 PM |