Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

New Software Release

Our latest release, Simio 11, is here!

Luu Khanh Minh

Assign different states to members of a batch

Recommended Posts

In my model, there is a combiner that generates a batch of 30 entities. After the combiner, I want to assign exactly 30% of the bach population (i.e: 9 members in a 30-member batch)  to state "A" and the remaining 70% of the batch population (i.e: 21 members in a 30-member batch) to state "B". May I have some suggestions as to how to do so? Note that the number of members in a batch is varying for different batches

Thank you! 

Share this post


Link to post
Share on other sites

you can use a search step in an appropriate process (you can create a new process or use an add-on process where needed). In the search step you should search the queustate of modelentity.batchmember. Here you can set a match condition if required. If you do not want to set a match condition the search step will search the first 9 entities in the batch (I assume that the batch quantity is 30. If it is a different value Math.Ceiling(Combiner.BatchQuantity*0.3) expression will be evaluated and will be round up the next integer. (You can use math.floor function as well.) Then in the assign step set the required statevariable of modelentity to the new value. 

Assign different states to members of a batch.PNG

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello

I would like to revive this thread. So In my model, there is a combiner that generates a batch by batching 1 parent entity and 29 member entities together. After the combiner, I want to assign exactly 30% of 30 entities(i.e: both the parent and the member entities) to state "A" and the remaining 70% of the 30 entities to state "B".

May I have some suggestions as to how to do so? 

Thank you!

 

Share this post


Link to post
Share on other sites

If I were you I made these assignments before sending modelentities to combiner object. Then combine them all... Sometimes "think different" works for simulation👌

Share this post


Link to post
Share on other sites

×
×
  • Create New...