simevents entity generation with attributes

2 visualizzazioni (ultimi 30 giorni)
Mats
Mats il 6 Apr 2022
Commentato: Mats il 9 Apr 2022
How do I using MDES create an entity and set it's attributes based on an input signal?

Risposte (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi il 7 Apr 2022
Modificato: Abdolkarim Mohammadi il 7 Apr 2022
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 Commento
Mats
Mats il 9 Apr 2022
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?

Accedi per commentare.

Categorie

Scopri di più su Discrete-Event Simulation in Help Center e File Exchange

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by