SIMEVENT predefined attribute generation

2 ビュー (過去 30 日間)
luca
luca 2019 年 9 月 9 日
回答済み: Zenin Easa Panthakkalakath 2019 年 10 月 16 日
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 件のコメント
Renato SL
Renato SL 2019 年 9 月 9 日
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.

サインインしてコメントする。

回答 (1 件)

Zenin Easa Panthakkalakath
Zenin Easa Panthakkalakath 2019 年 10 月 16 日
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

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by