simevents entity generation with attributes

1 次查看(过去 30 天)
How do I using MDES create an entity and set it's attributes based on an input signal?

回答(1 个)

Abdolkarim Mohammadi
编辑:Abdolkarim Mohammadi 2022-4-7
You must set the attribute in the Generate event action, using in1.
function [entity,events] = generate(obj,storage,entity,tag,in1)
entity.data.Attribute1 = in1;
events = [];
end
  1 个评论
Mats
Mats 2022-4-9
Thanks for you answer!
When I do that I get an error that the attribute datatype is set incorrectly, where and how do I specify the entities attributes?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Discrete-Event Simulation 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by