フィルターのクリア

customized N server.

1 回表示 (過去 30 日間)
Bouqui
Bouqui 2016 年 3 月 24 日
回答済み: Mo Zhao 2016 年 3 月 29 日
Am not sure how to get started on writing a matlab function for a custom N server. The simevent N server service control does not work for me in that when a preemption signal is received, it disables all servers, what i want is to be able cycle through clients being served and preempt the lower priority users in the system. what i need help with is a function that stores an entity for a period of time depending on its service time. once that time is up, the entity exits the block.

採用された回答

Mo Zhao
Mo Zhao 2016 年 3 月 29 日
If you are using the new SimEvents in R2016a, the best approach to preempting N-Server differently for entities is probably to use MATLAB Discrete-Event System to write a custom block. To get started quickly, you can drag a “Selection Queue” block from the “Design Patterns” in the SimEvents library. Then you can make changes to the source MATLAB code of the MATLAB Discrete-Event System block in a copy and link it to the block. In that model, the anonymous entities into “call” input port select the “passenger entities” that previously entered “IN” input port with matching index to depart. This actually realizes a preemption tactic. You can change the preemption algorithm to make it fit your use case.
You can also find this “Selection Server” and other examples of custom blocks in http://www.mathworks.com/help/simevents/examples.html

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by