Jump to content

Transferring properties between objects


FoodEngFAAB

Recommended Posts

Hello everyone:
I am modeling a packaging system by means of a combiner. 12 equal members are grouped in a box (parent). Before leaving the respective source, members are assigned a value (0, 1, 2) as a state variable (ESV_P) to distinguish them by product type. I want the box to have the value of the products state variable. For example, if the box contains 12 type 1 products, the box should be assigned with a state variable ESV_B equal to 1. Any suggestions?

Best regards.

Link to comment
Share on other sites

Hi Fabian,

I see two (or more) possible alternatives for solving this.

Assuming that the box only receives one type of entity you can:

1. Create a state variable (for example st_CurrentBoxType) and every time an entity enters the combiner you assign the entity type to this state variable. This way, one the box is completed and exits the combiner you will be able to assign it the st_CurrentBoxType.

2. The other way is to execute a search step once the box is full. You can use "ModelEntity.BatchMembers.FirstItem" as match condition to locate the first batched entity, then in the found branch use an assing step to assign the ProdType from the found entity

I'm sure there are a lot of ways of doing that... hope this helps

saludos

Link to comment
Share on other sites

×
×
  • Create New...