Create entity type and define attributes in custom entity generator using Matlab discrete event system

1 Ansicht (letzte 30 Tage)
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.

Antworten (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi am 7 Apr. 2022
Bearbeitet: Abdolkarim Mohammadi am 7 Apr. 2022
You must set the attribute in the Generate event action.
function [entity,events] = generate(obj,storage,entity,tag)
entity.data.Attribute1 = 1;
events = [];
end

Kategorien

Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by