Create entity type and define attributes in custom entity generator using Matlab discrete event system
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I want to create a custom entity generator using Matlab discrete event system but I can't find any documentation of how you define which attributes the entity generated in a MDES has?
Example: I want to generate entities which have attributes x and y in a MDES and then define their respective value in a generate event.
댓글 수: 0
답변 (1개)
Abdolkarim Mohammadi
2022년 4월 7일
편집: Abdolkarim Mohammadi
2022년 4월 7일
You must set the attribute in the Generate event action.
function [entity,events] = generate(obj,storage,entity,tag)
entity.data.Attribute1 = 1;
events = [];
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!