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:

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:

int maxwait = 0;
int maxindex = 0;


for (int i=1; i <= batchsize; i++)
{
	int enterTime = getlabel(rank(current,i),"Time_EnterSystem");
	int waitTime = time() - enterTime;
	
	if (waitTime >= maxwait)
	{
		maxwait = waitTime;
		maxindex = i;
	}

}
5 |100000

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