Borrar filtros
Borrar filtros

SimEvents Control Entity Gate

3 visualizaciones (últimos 30 días)
Colin Krebbers
Colin Krebbers el 27 de Ag. de 2019
Respondida: Renato SL el 27 de Ag. de 2019
Hi all,
Within SimEvents I'm trying to model a system forwarding entities at a specified time by controlling an entity gate.
Up untill now, I haven't been succesfull trying several different approaches.
Basically, I'm sending an entity from the generator towards the enable gate, once the enable gate is not enabled (controlled by a step or signal editor) the entity may not be forwarded. Currently, the entity is being generated correctly but the control mechanism of the gate does not seem to work, in my idea the gate is always open.
Please see attached file.
Looking forward receiving your reply!
Kind regards,
Colin
  2 comentarios
Renato SL
Renato SL el 27 de Ag. de 2019
I'd like to help but my MATLAB version is R2017b. Can you provide the .slx file for version R2017b or below?
Colin Krebbers
Colin Krebbers el 27 de Ag. de 2019
Hi,
Thank you for your reply.
Attached you may find the file saved as R2017B.

Iniciar sesión para comentar.

Respuesta aceptada

Renato SL
Renato SL el 27 de Ag. de 2019
You implemented the Entity Gate like this,
ent_gate.png
Because you show the enable port, I found that the gate will be open once the enable port receives a positive signal (and will never close even though it receives 0 or negative value) and therefore as you put in the question, you think that "the gate is always open".
So I removed the enable port.
ent_gate2.png
The description in the Entity Gate: "(1) Enable Gate opens when the control port receives a message with a positive value," so I believe that there is no need for an enable port to get the behaviour that you want.
I tested it and voila.
ent_gate_result.png
So that's it.
Removing the enable port solved the problem.
PS.
I believe that is an appropriate result even though it seems not as the occurrence of entities are not in line with the time (first entity is not at t=1, second entity is not at t=2, third entity is not at t=4).
The reason for that is that Entity Generators in default are set to hold on to entities that cannot depart from the block. In this case the depart of entities is determined by the opening of the Entity Gate, so that in the plot:
  • the first entity in the plot is actually the one generated at t=0 (the generate entity at simulation start tickbox in Entity Generator is ticked) and has just been released because the Entity Gate has just opened at that time
  • the next entity is 1 time unit apart from the last departed entity (as period = 1 in the Entity Generator)
  • the last entity was supposed to depart 1 time unit after the second one but it was blocked because the Entity Gate is closed. Therefore, it departs as soon as the Entity Gate opens (just before t=4)

Más respuestas (0)

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by