Jump to content

State variable parent entity as function of state variables member entities


Christa

Recommended Posts

Hi,

Is it possible to set the state variable of the parent entity in a batch equal to the sum of state variables of all member entities in the batch?

Context of the case; a truck (parent) is loaded with x number of orders (members). These orders have a specific value for the state variable 'NumberOfRollContainers'. The truck has the state variable 'TotalRollContainers', which should equal the sum of the 'NumberOfRollContainers' in that batch. 

Kind regards,

Christa

Link to comment
Share on other sites

You can sum the "NumberOfRollContainers" whenever a member entity enters the combiner object by using "on member entering" property under "state assignments" section. Then, set this total to the "TotalRollContainers" state variable of the parent objet by using "before exiting" property of combiner object. 

  • Thanks 1
Link to comment
Share on other sites

×
×
  • Create New...