Open djordon opened 1 year ago
Sorry for the delay @saman-lagzi, but here is a rough outline of what I think should happen.
QueueServer
needs to know when each agent left the queue-server. Without abandonment, this always happens after service, but with abandonment it can happen while in the queue.QueueServer
assumes no abandonment, so we'll need to modify the data we collect.There are a few ways to accomplish this, but none of them are particularly easy/elegant since you'll need to create a new class and overwrite a few functions in QueueServer
. This is because an arriving caller/agent (I'll use agent from here on) cannot know up-front how long it needs to wait before it receives service. This is because, most of the time, the random numbers necessary to know your waiting time have not been generated by the time the agent needs them in order to know its departure time. You could get around this by estimating the wait time, but you still need to implement functions that estimate the waiting time and handle abandonment.
Here is one approach to do this:
AbandonAgent
that subclasses Agent
. This agent caries a distribution function for its patience.
AbandonAgent.queue_action
functions needs to note it's arrival time and patience when it arrives to the queue. Or maybe we create a separate function for this step, but either way the agent should note the arrival time.AbandonQueue
that subclasses QueueServer
. You should probably re-implement
QueueServer.next_event
to handle abandonment upon arrival or service start. If it's upon arrival, you'll need to tell the AbandonAgent
an estimate of the service start time and then have it abandon given its patience. If it's at service start time then you can just compare the current time with the agent's (internal) abandonment time and proceed accordingly. You'll also want to store some abandonment time in the AbandonQueue.data
list.QueueServer.fetch_data
to accommodate the extra data we want to know about.The hard part is understanding QueueServer.next_event
and how it should be modified. Let me know if what I said helps/makes sense. I know it's probably quite a bit to digest, hopefully I was moderately clear.
Hi Daniel.
Thank you so much for your help. This is going to be incredibly helpful.
Best, Saman Lagzi Assistant Professor | Operations & Decision Sciences Wilfrid Laurier University | Lazaridis School of Business & Economics
From: Daniel Jordon @.> Sent: July 26, 2023 11:43 AM To: djordon/queueing-tool @.> Cc: Saman Lagzi @.>; Mention @.> Subject: Re: [djordon/queueing-tool] Queues with abandonment (Issue #98)
Sorry for the delay, but here is a rough outline of what I think should happen.
There are a few ways to accomplish this, but none of them are particularly easy/elegant since you'll need to create a new class and overwrite a few functions in QueueServer. This is because an arriving caller/agent (I'll use agent from here on) cannot know up-front how long it needs to wait before it receives service. This is because, most of the time, the random numbers necessary to know your waiting time have not been generated by the time the agent needs them in order to know its departure time. You could get around this by estimating the wait time, but you still need to implement functions that estimate the waiting time and handle abandonment.
Here is one approach to do this:
The hard part is understanding QueueServer.next_event and how it should be modified. Let me know if what I said helps/makes sense. I know it's probably quite a bit to digest, hopefully I was moderately clear.
— Reply to this email directly, view it on GitHubhttps://github.com/djordon/queueing-tool/issues/98#issuecomment-1652076195, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3AOH7YKMIPQ2GCZSH6775DXSE3JNANCNFSM6AAAAAA2YWNG4I. You are receiving this because you were mentioned.Message ID: @.***>
Is abandonment in this context the same thing as reneging? Reneging is where an agent leaves the wait list before getting served. Sometimes this is more specifically interpreted as leaving the wait list before getting served because they have waited too long.
Yeah, I understand them to be the same thing.
Yeah, I understand them to be the same thing.
Okay, thank you! :)
Hi Daniel,
Sorry for the late response.
I am trying to simulate the settings in this paper. Here they assume the customer patience time has a general distribution, where customers would not wait longer than a random variable she draws from the assumed distribution. In other words (quote from the paper):
Associated with each arriving caller there is a generally distributed patience time τ with a common distribution G. An arriving customer encounters an offered waiting time V, defined as the time that this customer would have to wait given that her or his patience is infinite. If the offered wait exceeds the customer’s patience time, the call is then abandoned, otherwise, the customer awaits service. In both cases, the actual waiting time W is equal to min(V, τ).
To answer your questions I would thus say:
Please do let me know if I can be of any help with improving the package to take care of this issues.
Best, Saman Lagzi Assistant Professor | Operations & Decision Sciences Wilfrid Laurier University | Lazaridis School of Business & Economics
Originally posted by @saman-lagzi in https://github.com/djordon/queueing-tool/issues/95#issuecomment-1648764697