Simulation stops after processing one reference entity by Entity Selector when the number of entities to select is greater than 1.

3 ビュー (過去 30 日間)
In Match Entities Based on Attributes example when I set the Number of Entities to Select parameter to greater than 1 then there is only one entity output by Assemble Bicycle block even though Bicycle Frame block and Raw Wheel Material block generate several entities.

回答 (1 件)

Altaïr
Altaïr 2024 年 12 月 31 日
The Match Entities Based on Attributes example demonstrates matching two entities, Frames and Wheels, based on their attributes. When the Number of entities to select parameter is set to 2, the first output port of the Match Wheels to Frames block provides a single Frame, while the second port outputs two Wheel entities, totalling three entities to be combined. To manage this, set the Number of input ports parameter in the Assemble Bicycle block to 3. An Entity Output Switch with the Switching criterion set to Round robin can be used to split the pair of Wheel entities into two separate signals.
Additionally, the Assemble Bicycle block requires the entities to arrive simultaneously. Since there would be a time delay between the arrival of the two Wheel entities, adding Entity Server blocks to each input of the Assemble Bicycle block and setting the Service time value to 0 will address this issue. The resulting simulation output would appear as shown below.
Here, the link to the reference example:
For more information of the Composite Entity Creator block kindly refer the following documentation page.

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by