QUEUE FIFO with ALLOCATE BY PRIORITY

Use this forum to post Vensim related questions.
Post Reply
sarah.livermore
Junior Member
Posts: 5
Joined: Fri Apr 19, 2013 10:36 am
Vensim version: DSS

QUEUE FIFO with ALLOCATE BY PRIORITY

Post by sarah.livermore »

Good morning/afternoon/evening all,
the answer to this question may be a very immediate and loud "no" but it would be really useful to have a definitive answer.

We are building a system dynamics model. Is it possible to use the ALLOCATE BY PRIORITY function in conjunction with QUEUE FIFO? By that I mean, could ALLOCATE BY PRIORITY work the oldest items first within a _single_ subscript? I would assume this would necessitate the "priority" parameter being fed a distribution of all the ages of all the items that make up the "request" parameter. As far as I understand it, the priority parameter is a (one-dimensional) number (albeit, with subscripts).

I suspect that this is even beyond the scope of system dynamics, since it appears to me that it would necessitate knowledge of individual items. Or alternatively, having numberOfSubscripts == numberOfItemsInQueue (sounds messy....). If that's correct, I assume the way to go about working the oldest (individual) items first would be a discrete event simulation perhaps? Or something else?

I'd be very grateful for a yes/no answer to my main question.... and if yes, then an idea of how would be great.
Thanks very much in advance,
Sarah
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: QUEUE FIFO with ALLOCATE BY PRIORITY

Post by tomfid »

Not 100% sure I understand the question, but I think it's not practical to manipulate queue contents at the item or even time step slat level. Also, any input to an ALLOC has to be an array - the function can't look inside a queue, unless you first somehow select the queue elements into an array. Even if you query the queue to create an array, you can't subsequently manipulate the elements in a way that would violate the FIFO assumption. So, you'd need an array of queues.

What's the underlying problem statement?

The LP_SOLVE link could potentially handle sophisticated allocation settings, but you'd still have to have some kind of item level storage.
sarah.livermore
Junior Member
Posts: 5
Joined: Fri Apr 19, 2013 10:36 am
Vensim version: DSS

Re: QUEUE FIFO with ALLOCATE BY PRIORITY

Post by sarah.livermore »

Hi there, sorry that I didn't phrase the question clearly but you essentially answered it anyway thanks. I was basically asking if the ALLOCATE BY PRIORITY function can "look inside a queue". For what we're doing at the moment, an array of queues sounds a bit complicated. LP_SOLVE doesn't seem to be in our version of Vensim (5.0a) but a new version is in the pipeline for us...
Thanks again
Sarah
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: QUEUE FIFO with ALLOCATE BY PRIORITY

Post by tomfid »

5.0a is indeed ancient.

The LP_SOLVE functionality is in an external function library (see http://vensim.com/workbench/ ) so it could potentially be adapted to 5.0, but I doubt it makes sense to do that.
Post Reply