필터 지우기
필터 지우기

Multiple Queue Counting as Trigger for Gate

조회 수: 1 (최근 30일)
Chate
Chate 2012년 11월 30일
Hi,
I am trying to model a transportation system which has multiple pickup locations. I would like to count the number of customers in the queues at different locations. If there are more than 1 customer waiting in any of the queue, then the gate will allow the transporter entity (which is waiting idle in their own queue) to pass through and go to pick up the waiting customer.
How should I model this event triggering such that the transporter must wait idle in his queue until there are more than 1 waiting customer in the system (do I need to use a combination of stateflow and gate)? How do I keep track of the total number of customers waiting in every queue?
Thank you

채택된 답변

Devdatt Lad
Devdatt Lad 2012년 12월 5일
Check out the Resource Allocation demo in SimEvents. The Entity Combiner block can be used for such synchronization between a transporter entity and the waiting customer. The result is that a transporter entity can be combined with a customer entity when both are available, to create a composite (transporter+customer) entity. The Entity Splitter block can be used to split this into the component transporter and customer entities. After splitting the transporter can go back to the waiting queue to wait for the next customer's availability.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by