separate quants by attribute in a queue

Use this forum to post Vensim related questions.
Post Reply
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

separate quants by attribute in a queue

Post by addor »

I have a queue with a random distributed attribute. There come 5 quants with attributes 4, 1, 7, 2, 9. I would like to separate those quants with low attribute (e.g. < 4) from those with high attribute, that is quants no. 2 and no. 4 flows in another stock than quants no. 1, 3 and 5 .

Is this possible?
Peter Addor
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

The attributes going into a QUEUE FIFO are all identical at a time. If you have 5 items, each with a different attribute entering you will need to average these. For example assuming the attributes at a time are subscripted you would use

quantity to high quality = SUM(IF THEN ELSE(quality[item!] >= 4,
quantity[item!],0))
avg quality to high quality = ZIDZ(SUM(IF THEN ELSE(quality[item!] >- 4, quality[item!],0)),quantity to high quality)

with similar logic for low quality.

I hope that is helpful. If I did not understand the question let me know.
addor
Senior Member
Posts: 50
Joined: Mon Oct 27, 2003 9:45 am

Post by addor »

You got it correctly. Thanks for the suggestion, it's great!

Peter
Peter Addor
Post Reply