필터 지우기
필터 지우기

Server selecting which Queue to server

조회 수: 2 (최근 30일)
Chate
Chate 2012년 11월 27일
(SimEvents)
I would like to create a queueing system with multiple queue priorities. For example, there are 3 queues for the customers, where queue 1 has highest priority and queue 3 has lowest.
I would like to link them all the queues to the server, and the server will serve customers on the queue with highest priority first. I realize that pathcombiner would not work, as it will not provide the information to which queue the customer comes from. What other configuration can be used?

채택된 답변

Devdatt Lad
Devdatt Lad 2012년 11월 27일
Unless I'm missing something, the Path Combiner should work for your case. Connect the highest priority queue to input port 1 of Path Combiner, next highest priority queue to input port 2 etc. And set the "Input Port Precedence" parameter on the Path Combiner to be "IN1 port". Connect the output port of the Path Combiner to your single server.
The first entity to enter either of the three queues will be accepted by the Path Combiner and sent to the Server. When the server is done with that entity, the Path Combiner will first ask the block connected to its IN1 port whether an entity is available to be accepted. If so, it will send that entity to the Server. If nothing is available, then it will ask IN2 and so on. Since IN1 is connected to the highest priority queue, it will always get preference, and entities from this queue will be served first.
  댓글 수: 3
Devdatt Lad
Devdatt Lad 2012년 11월 28일
The Path Combiner's "Input Port Precedence" parameter can also be set to "From signal port p". Feed a signal value (1 to number of inputs) to this input port. If the value is 2 then the Path Combiner will first ask the queue connected to its second input port for the entity, and cycle through from there.
Chate
Chate 2012년 11월 28일
I see. I will give it a shot! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (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