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
|
||||
|
||||
Recorder function
Hello
I am a student of flexsim I was just wondering how do I record the amount of time my queue quantity goes over a certain value. and then it stops as soon as the queue quantity goes below that value. Thank you |
#2
|
|||
|
|||
One Try Using Q label
There might be a better way, but here is one way I can try. It capture the time duration of over Q limit period. (The limit is not your Q maximum content. It should be less than the Q maximum content... I hope I understand your logic correctly, though)
In your queue, OnEntry Trigger if(content(current) >= gvQLimit && gvRecordStarted == 0){ //gvQLimit and gvRecordStarted are global variables or any reference you can make gvRecordStarted = 1; setlabelnum(current, "StartOverTime", time()); } OnExit Trigger double myTimeDurationOfOverTheLimit = 0; if(content(current) <= gvQLimit && gvRecordStarted == 1){ // Use <= because OnExit still includes item for its content() gvRecordStarted = 0; myTimeDurationOfOverTheLimit = time() - getlabelnum(current, "StartOverTime"); pt("myTimeDurationOfOverTheLimit: ");pf(myTimeDurationOfOverTheLimit);pr(); } |
Tags |
queue capacity |
Thread | Thread Starter | Forum | Replies | Last Post |
Recorder | David Chan | Q&A | 1 | 02-04-2010 09:42 AM |
Recorder? | zhang xin | Q&A | 4 | 11-02-2009 07:38 AM |
problem of recorder | qin tian | Q&A | 5 | 09-27-2008 10:42 PM |
Recorder Histogram Problem | Bennett Foster | Gripes and Goodies | 2 | 07-18-2008 07:40 AM |
Recorder automatic export | Stephanie Giovannini | Q&A | 3 | 03-19-2008 04:52 PM |