Switching different batch names through a switch
古いコメントを表示
Hi
I would like to connect three batches with different properties in Simulink/Simevents in parallel and then unite them with a switch.
The problem is that different batch names must be used for different properties, which cannot be combined at the input switch, as only one name is allowed there.
The problem description says:
This message is related to a hidden MsgSvcAdapter block.
Consider manually inserting such a block to debug the problem.
Unfortunately, I can't find any information about a MsgSvcAdapter.
Can you help me with my problem and explain how an input switch can switch different batch names?
回答 (1 件)
Abdolkarim Mohammadi
2021 年 9 月 8 日
編集済み: Abdolkarim Mohammadi
2021 年 9 月 8 日
0 投票
Your description of the problem is a bit confusing for me. Are you talking about something like this?

4 件のコメント
Dennis Kimmich
2021 年 9 月 8 日
Abdolkarim Mohammadi
2021 年 9 月 8 日
編集済み: Abdolkarim Mohammadi
2021 年 9 月 8 日
In such situations you should create a general entity type. For example, if you have three products and you want them to have different attributes, you can create an attribute named ProductType and set it to 1, 2, or 3. Other attributes are the union of all of the attributes of the three types of products. The processing block, for example Entity Server or Entity Terminator, then processes the entities like the following:
switch entity.ProductType
case 1
% Attribute1 is only used when entity.ProductType == 1
entity.Attribute1 = 1;
case 2
% Attribute2 is only used when entity.ProductType == 2
entity.Attribute2 = 2;
case 3
% Attribute3 is only used when entity.ProductType == 3
entity.Attribute3 = 3;
end
Dennis Kimmich
2021 年 9 月 9 日
Abdolkarim Mohammadi
2021 年 9 月 10 日
You are right. It seems that in addition to the type and attribute names for normal entities, the batch size is part of the structure of the batch entities. I don't have solutions for you right now. But in such situations where there is no ready-to-use block, the only solution would be to use MATLAB Discrete-Event System block, which enables you to author a customized block, using a syntax similar to MATLAB.
カテゴリ
ヘルプ センター および File Exchange で Discrete-Event System Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

