SIMEVENT predefined attribute generation
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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
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
댓글 수: 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!