simevents entity generation with attributes

2 ビュー (過去 30 日間)
Mats
Mats 2022 年 4 月 6 日
コメント済み: Mats 2022 年 4 月 9 日
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 日
編集済み: 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 Center および File ExchangeDiscrete-Event Simulation についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by