Using queue size to permit entity creation
显示 更早的评论
I have a manufacturing model that has several queues after servers. I would like to use the number of entities in one particular queue to trigger a hold on entity creation i.e. if more than 20 entities in the queue then stop feeding in more raw materials from inventory.
I assume I'll use an event based entity generator (or time based with release gate) and know how to get queue size out of the queue but am unsure how to use this to generate the function to release or create an entity.
I can see Simulink has many logic (e.g. relational operator) functions that I can drag in but would have thought this so common that Simevents would have its own blocks.
Do I need to use logic blocks from Simulink to trigger entity creation / release or is there a more elegant or integrated way from Simevents?
Thanks
P
1 个评论
Tianhao Guo
2016-4-23
编辑:Tianhao Guo
2016-4-23
I have almost the same question. Now I think we can make an output port from queue block "number of entities in block, n". Then use it.
The question is that I don't know how to trigger a function when the "number of entities in block, n" becomes zero
https://uk.mathworks.com/matlabcentral/answers/280589-how-to-determine-whether-a-queue-is-empty-in-simevents-and-do-some-actions-based-on-this-observation
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Messages 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!