Pull Min Priority Value of a Queue

130 views
Skip to first unread message

Chris Karamanos

unread,
Feb 22, 2016, 4:52:36 PM2/22/16
to Jaamsim Users Discussion Group
Hello,

Is there any way to pull the minimum value of the Entity priority values in a Queue and assign it to an attribute?

I have 5 Queues and I want to know which has the Entity with the lowest priority value.

I attached the file I was working with, I was assigning the min of the current value and the ET Time+SimTime which is obviously gonig to jsut stay as the first number it was given the entire time. Apart from somehow checking the queue length is at least 1 else assign the value some really large number and placing that object in series with the signals, I am not sure how to make the minimum value increase.

It would be preferential to use the ETT value as the priority and have the model say "Hey which of the Queues has the priority value with the lowest time?"

{  this.obj.ET=120[h]  }  {  [Queue1].ETQ=min([Queue1].ETQ,this.SimTime+this.obj.ET)  }  {  this.obj.ETT=(this.SimTime+this.obj.ET)/1[h]  }

Any help is appreciated.

Thanks,

Chris
QueueSelection.cfg

Harry King

unread,
Feb 22, 2016, 7:01:38 PM2/22/16
to Jaamsim Users Discussion Group
Chris,

The Queue output PriorityValues has the information you need, but unfortunately 'min( [Queue1].PriorityValues )' is not a valid expression yet. I will see if this is something we could add easily.

What do ET and ETT represent? I need a bit more information to answer your other question.

Harry

Chris Karamanos

unread,
Feb 23, 2016, 8:26:16 AM2/23/16
to Jaamsim Users Discussion Group
Hi Harry,

They represent the Environmental tracking time that these products can sit in a conditioning room. All Lots must sit in a room for at a minimum 2 days and they can remain there up to say 12 days (this number is what varies). If the product wasn't pulled from the Queue in that time frame it would be an ET violation so it would renege and have to go through a separate validation process to verify it is still acceptable to use. We want to minimize this occurrence. I am basically going to create parallel queues that tell me which product I need to pull next based on demand and inventory info that is attached to separate assign attributes.

Also, some sort of search and pull early from a Queue feature could be very useful or attribute based conditional pulls (Similar to the signals but only release if specific attribute(s) matched the signal) Just some thoughts :)

Thanks,

Chris

E.T.

unread,
Aug 26, 2016, 9:36:51 AM8/26/16
to Jaamsim Users Discussion Group
Since the first in the Queue is the lowest priority you don't need the min (although it would be great it worked with arrays!) but merely [Queue1].PriorityValues(1)... if it returned a float.

Harry King

unread,
Oct 12, 2016, 4:20:29 PM10/12/16
to Jaamsim Users Discussion Group
Chris,

It is now possible to obtain the min or max of an array. Use the functions maxCol and minCol that were introduced in 2016-20. The expression for your model is:
'minCol( [Queue1].PriorityValues )'

Harry
Reply all
Reply to author
Forward
0 new messages