Create entity type and define attributes in custom entity generator using Matlab discrete event system
3 次查看(过去 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!