SimEvents: How to set a resource acquirer amount using a Bus Entity parameter?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Renato SL
2020-2-3
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resource Allocation Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!