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 |
#2
|
|||
|
|||
Many I also know is there any function to control the waiting time of a item in the queue?? For example, it will generate a random waiting time (eg: uniform(1,3) ) for a item when it entry the queue, and then the item wait until the time and pass to the next port. I tried the code on the OnEntry tigger of the queue:
Code:
delayeventofobjects(item,uniform(1,3)); |
#3
|
||||
|
||||
Since you have already saved you data in a global table, you can extract the whole table to excel file by:
Code:
excelopen(" /*your already existed excel file path*/ "); excelsetsheet("Sheet1"); excelexporttable("contentVStime",1,1,gettablerows("contentVStime"),gettablecols("contentVStime")); excelsave(); excelclose(1); |
#4
|
||||
|
||||
For waiting in a queue object, you can write code in OnEntry trigger to close output by closeoutput(). And send delay message to itself in this trigger with you expected waiting time.
And write code in OnMessage trigger to open output by openoutput(). |
#5
|
|||
|
|||
Let me explain more detail, I hope the item leave the queue base on a random time, not FIFO or LIFO.
For example, start with item A,B,C,D and their entry time is 1,2,3,4 respectively. Item |Entry time | Stay time in queue | Leave time A 1 10 11 B 2 3 5 C 3 1 4 D 4 5 9 So the item will leave base the leave time, when the time arrived, the related item leave the queue. |
#7
|
|||
|
|||
Hi Jack,
I would use a processor instead of a queue for your problem. Change the maximum content in the processor and then under process time you set the delay time. Lars-Olof |
The Following 3 Users Say Thank You to Lars-Olof Leven For This Useful Post: | ||
Steven Hamoen (02-24-2012) |
#8
|
||||
|
||||
Hi Jack,
another way can be the combination of Do Not Release Item in the function Send To Port (Flow Tab), send delayed message and the command releaseitem( obj item, num output port) Message parameters are numbers. Therefore the object item must be converted to a number and later back to a node. Commands are tonum(obj) and tonode(num) Jörg |
Thread | Thread Starter | Forum | Replies | Last Post |
How to extract data?? | Jack Lai | Flexsim Student Forum | 1 | 12-13-2011 03:54 AM |
3 queue problem | shafizad | Q&A | 4 | 08-06-2010 01:51 PM |
Pulling from a Queue vs Sorting the Queue | Brandon Peterson | Tips and Tricks | 3 | 03-03-2010 01:27 AM |
How to export the result of Perfoormace Measures | Vic Li | Q&A | 0 | 11-11-2008 11:56 PM |
Queue Sorting | Jeff Nordgren | Q&A | 12 | 05-22-2008 03:21 PM |