question

Lorenz N avatar image
0 Likes"
Lorenz N asked Benjamin W2 answered

How do you get the current max dwell time of an item(s) in a process or queue?

After a certain trigger, I need to pull what the max dwell time is from a list of lab samples in my queue. Is there a command for this? I know it should probably look like this:

  1. maxof(getlistofcurrentdwelltimes("NameOfQueue"));

I just don't know the correct syntax. This question is related to another question I have just for context.

How do you create a dynamic batch size with a min and max

FlexSim HC 5.3.10
queueprocesshealthcare hc 5dwell timemaximum dwell time
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Benjamin W2 avatar image
1 Like"
Benjamin W2 answered

Hi @Lorenz N,

I don't think there is a command that directly accesses what you are looking for. You might be able to create some script that will accomplish the same thing though:

  1. int maxwait = 0;
  2. int maxindex = 0;
  3.  
  4.  
  5. for (int i=1; i <= batchsize; i++)
  6. {
  7. int enterTime = getlabel(rank(current,i),"Time_EnterSystem");
  8. int waitTime = time() - enterTime;
  9. if (waitTime >= maxwait)
  10. {
  11. maxwait = waitTime;
  12. maxindex = i;
  13. }
  14.  
  15. }
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.