Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!


Alberto Debes

Seach smallest value in a queue

Recommended Posts


I have a model with a set of servers that start with a set number of entities in each of their respective input buffers. The model entity has a real-valued state variable called "TimeUntilShipping", in units of hours and is 1 by default, that represents the number of hours the entity should be in the input buffer for before it gets processed. I am trying to create an add-on process in the "Before Processing" trigger that looks for the entity in the queue with the smallest value of TimeUntilShipping and compares this number to the TimeInSystem of that entity. If the entity's TimeInSystem >= TimeUntilShipping, the entity should be allowed to go into processing. Else, it should remain in the buffer.

My approach was to use a Search step to find the entity with smallest TimeUntilShipping and a Scan step hold the process until TimeInSystem >= TimeUntilShipping, but this is not working as intended, and entities keep flowing into processing.

The Search and Scan steps parameters are below:




Share this post

Link to post
Share on other sites

  • Create New...