필터 지우기
필터 지우기

Is it possible to delay an entity until another entity arrive in Simevents?

조회 수: 4 (최근 30일)
Ho Jung Kim
Ho Jung Kim 2022년 7월 27일
답변: Vidip Jain 2023년 8월 31일
Is it possible to delay an entity until another entity arrive in Simevents? I am sending two entities from two servers with different service time, and want the first entity arrived to wait for the other one to be done processing, and send both entity to the next server. Is there a way to do this not using the Matlab Discrete-Event System and using Simevents blocks? If not, how should I do it in Matlab Discrete-Event System? The image below is easier to understand. I am trying to send two entities from server 2 and 3 to server 4 when both entities are done processing.

답변 (1개)

Vidip Jain
Vidip Jain 2023년 8월 31일
I understand you want to delay an entity until another entity arrive in “Simevents”, but there is not a direct way to implement synchronization based on the completion of processing in multiple entities. To achieve entity synchronization and delay until another entity arrives, you can use custom event-based logic.
Here's how you could approach this using the Discrete-Event System (DES) framework:
  1. Entity Definition: Define your entities using the event class. Each entity can have properties that store information about its source server and processing time.
  2. Event Definitions: Define custom events that represent the arrival of entities and the synchronization condition.
  3. Custom Event Logic: Implement the event handling logic using the DES framework's eventHandler method. You can specify conditions that must be met before an entity can be released from the synchronization point.
You can also refer to this documentation to get some idea about creating Custom Blocks Using MATLAB Discrete-Event System Block - https://www.mathworks.com/help/simevents/ug/create-custom-blocks-using-matlab-discrete-event-system-block.html

카테고리

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