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!

Click_Here_button.png

Alberto Debes

Seach smallest value in a queue

Recommended Posts

Hello,

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:

1222139762_ScreenShot2020-02-19at7_10_15PM.thumb.png.492232172721d7fb6214ab99988362b0.png

2139916517_ScreenShot2020-02-19at7_15_07PM.png.7b7500ed61cb948307b84f8dc4fd80c7.png

2145868833_ScreenShot2020-02-19at7_20_55PM.thumb.png.539ceb5bedcb55b58da89fc825a72f5d.png

Share this post


Link to post
Share on other sites

×
×
  • Create New...