How to split a product unevenly and create more subproducts from its remainder using SimEvents?

조회 수: 1(최근 30일)
I would like to model the splitting up of a product into two subproducts plus some extra ammount. The split is 84% to the two smaller subproducts (42% each) and the remaining 16% is collected and combined with the next incoming product. Once the extra amount is enough to make a third subproduct I want to create a function call. The product and subproducts are entities in Simevents and the mass of the products (the determining factor for splitting) is carried as attributes.
I've been able to create a matlab function block that gets the attribute values and stores the remainder value along with creating the enable signal for the function block, however I can not seem to get the input block from simevents to work correctly with the timing of this. I split the incoming product entity into two separate entities using a replicate and then have a third path representing the remainder subproduct. I am unable to get the input block to work correctly to output the entities as they arrive since I would need to execute the ports in an order such as 1 2 1 2 3 1 2 1 2 3. Does anyone have experience with this task and a good way to approach it? I'm using Matlab 2014a with the newest SimEvent and Simulink packages.


Abdolkarim Mohammadi
Abdolkarim Mohammadi 2021년 3월 18일
SimEvent's standard block library only includes blocks with one storage. What you want requires more than one storage, thus, in the current version of SimEvents, you can implement the model you want with MATLAB Discrete-Event System.
More to read:


Find more on Discrete-Event Simulation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by