simevents entity generation with attributes

조회 수: 1 (최근 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 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