SIMEVENT predefined attribute generation
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi given a matrix A
A = [1 2 7 5 6 6 7 8 5 3 4 2 1 3 5 6; 1 6 1 1 1 2 7 9 5 3 2 2 3 3 4 6; 3 1 3 6 8 2 7 9 5 3 4 2 2 5 5 6]
I want to generate 3 different simulation where the entitities at each simulation acquire the attribute given by each row. So the in the first simulation the entities should acquire attribute values equal to the first raw: the first entity generated must have attibute=1, the second entity generated must have attribute=2, the third entity generated must have attribute = 7, the fourth entity generated must have attribute= 5 and so on...
Does someone know how can I obtain this in SIMEVENT, starting from a predefined matrix in matlab ?
1 Commento
Renato SL
il 9 Set 2019
I have tried something with an example that I'm working on.
I put a vector of values defined in the workspace as the Vector of output values of a Repeating Sequence Stair block. Then, the output of the block is connected to a Simulink function (say, assign_attribute() ). Then inside the Entity Generator, I set the entities to have the attribute attr1, and in the Event Actions tab -> Generate, I put entity.attr1 = assign_attribute().
Maybe Repeating Sequence Stair is not the right block for what you want, but I think the overall method should be similar.
Risposte (1)
Zenin Easa Panthakkalakath
il 16 Ott 2019
Hello Luca,
Have you tried Simulation Manager? I find that the content in the following blog post aligns with the described requirement.
As you can see in the blog, you can programmatically assign the block parameters and run the simulations parallely using 'parsim'. Best part is that you can open up the model with different sets of parameters from Simulation Manager UI whenever required.
Regards,
Zenin
0 Commenti
Vedere anche
Categorie
Scopri di più su Discrete-Event Simulation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!