SimEvents: How to set a resource acquirer amount using a Bus Entity parameter?

2 visualizaciones (últimos 30 días)
My Resource Acquirer block receives as input a Bus Entity.
I would like to use one of the parameters carried by the Entity (eg entity.Parts.Wheels.Warning [yes, is a number]) to setup the amount for a certain resource.
I choosed "Amount Source" = "Attribute" and "Amount" = "entity.Parts.Wheels.Warning" but I'm receiving back the following error:
"You have configured the 'Resource Acquirer' block to require an incoming entity that has an attribute named 'entity.Parts.Wheels.Warning'. However, entities that will arrive at this block will not have such an attribute."
I'm sure that the input is correct and the entity has the correct structure.
Any ideas on how to solve?
Thanks
  3 comentarios
Simone Rosa
Simone Rosa el 31 de En. de 2020
Editada: Simone Rosa el 31 de En. de 2020
Hello Renato,
thanks for your question.
In the Entity Generator Block I just declare the Entity type as "Bus Object" and I define the structure of my object using the "Bus Editor".
Then, in the other blocks of my system, I assign values to each element of my Bus Object.
I want to use one of these values to set a resource acquirer amount (Exactly as I use them for example to select the output port in an entity output switch).
Maybe is not possible to do that and I mandatory need an structured entity type instead of a bus object, what do you think?
Thank you
Renato SL
Renato SL el 3 de Feb. de 2020
I skimmed an article about using bus object in Simulink and found that it should be possible to define an entity there (plus the priority and the attributes). Maybe you missed something in the definition of the entity or the definition of the attributes or something else, so that the error is triggered.
I am not familiar with bus object, so I can't say if what you did should be correct or not.
Unless you are obligated to use a bus object, I recommend you to use a structured entity type instead and define the entity attributes in the Entity Generator.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Resource Allocation Modeling en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by