This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at 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.

Go Back   FlexSim Community Forum > FlexSim Software > Q&A

Q&A Using Flexsim and building models

Old 03-25-2010
mawajed's Avatar
mawajed mawajed is offline
Flexsim User
Join Date: Feb 2009
Posts: 1
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mawajed is on a distinguished road
Default Recorder function

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
Old 03-26-2010
Sung Kim Sung Kim is offline
Flexsim User
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default 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();

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

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.