Problems with Vensim Queue in 5.3

Use this forum to post Vensim related questions.
Post Reply
johnm
Junior Member
Posts: 6
Joined: Fri Apr 21, 2006 1:35 pm

Problems with Vensim Queue in 5.3

Post by johnm »

Hi there,

I am using v5.3 of Vensim and have just started using the Queue FIFO function, and am having strange results with QUEUE AGE OLDEST. The queue starts empty, and the flow in is stochastic with a relatively low rate (thus not all time steps have inflow). When the first job turns up, I get an oldest age that is way too old, and it seems to depend upon the age profile specified for my zero initial population. Is this a known bug? If so is there a fix?

Thanks to anyone who can help me

John
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

queue fifo

Post by LAUJJL »

Hi John

Can you make a simplistic model that illustrates your problem?
Regards.
JJ
johnm
Junior Member
Posts: 6
Joined: Fri Apr 21, 2006 1:35 pm

Post by johnm »

Hi,

I have already cut the problem down to identify that yes, there is definitely something going on. I have one queue, one arrival process - a poisson process, one server. Vensim seems to be calculating average age right, but getting maximum age wrong sometimes.

So queue starts empty, 1st arrival occurs at t=1, in queue at t=2, leaves queue at t=4, oldest age at t=2 is 4, which can't be right as there is only one thing in the queue and it just joined. The oldest age increments by one each timestep and then goes to zero when the queue empties. The next entry is two jobs at t=13. They are in the queue at t=14, with an oldest age of 10. Again, they just joined and are the only things in the queue, so I guess it is a bug, just want to know whether it has been fixed since 5.3 - unless I am doing something very dumb.

John
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

problem with queues

Post by LAUJJL »

Hi

I have had more than a year ago problems with queue attrib that had been solved. Queue functions are very tricky and the functions work sometimes very odly, but still correctly.
This is why I asked you to send a simplified model that shows concretely the problem, so that somebody, me or someone else can see if there is truly a bug.
Regards.
JJ
johnm
Junior Member
Posts: 6
Joined: Fri Apr 21, 2006 1:35 pm

Model Attached

Post by johnm »

Hi there,

The recalcitrant model is attached below. It is quite simple as I have only just started it this afternoon when I ran into this problem. A lot of it is there for multiple servers, but this version just has one (the others have subscripts but are not free from the start). No cin file required, just run it and you should get the same problem, oldest age = 4 at t=2. If not, let me know :) Do Uses table on Task Queue to see the problem.

Many thanks

John
Attachments
server model.mdl
(7.49 KiB) Downloaded 554 times
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

queue problem

Post by LAUJJL »

Hi John

The function queue age oldest seems to work correctly.
Are you sure you understand what delivers the function?
for instance if one job comes at time 1, the oldest age in the queue will be 1. At time 2, if the job stays in the queue the oldest age is 2 etc... until the job goes out of the queue and the oldest age will be the age of the second job that followed the first one.
Regards.
JJ
johnm
Junior Member
Posts: 6
Joined: Fri Apr 21, 2006 1:35 pm

Post by johnm »

Hi there,

Do you get the same result as I did,

i.e. by running the model as is, you should get, at t=2, the value of variable 'oldest job in queue' is 4.

My understanding of the function is exactly yours, however when I run the model, at t=1 the job is generated, it enters the queue at t=2, at which point its' age is 4 hours. This is not right. It then leaves the queue at t=5, the oldest age drops to 0, correctly, then when the next job arrives at t=14, the age of the 'oldest job in queue' is 10. The function QUEUE AGE OLDEST has only one input, so I can't be getting that wrong.

So, don't understand why it works correctly unless you are using a different version in which this bug has been fixed. What is your version?

Thank you

John

John
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

queue

Post by LAUJJL »

Hi

I have version 5.5C and do not get the same results.
The first job created is at time 6 and the oldest age is always correct.
May be the 5.3 is the version that was bugged. I remember the bug was about 18 months ago.
You will have to get the newest version!
Version 5 was first released in February 2002 and everybody is waiting for the version 6 that seems to be a bit long to come. There was once question of stochastic optimization!
Regards.
JJ
johnm
Junior Member
Posts: 6
Joined: Fri Apr 21, 2006 1:35 pm

Post by johnm »

OK, Thanks,

I sort of suspected this.

I will have a word with Andy and Tony about getting an upgrade.

Not sure why your first job comes at time 6 mind you, all the sequences are driven by independent random number seeds so should give the same results unless there is another random number being generated somewhere. A problem for another time though.

John
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

queuing

Post by LAUJJL »

Hi

the reason why the first job is generated at time 6, with every runs which is normal, is probably coming from a different random sequence numbers generator between the two versions 5.5 and 5.3.
Regards.
JJ
Post Reply