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!

Recommended Posts

Doc1.docx

 

I’m having an issue with creating a ParentID state variable. I have an add-on process that when a person is created at the source, bags also get created based on a distribution. This all works well. I got this from a post I put on the Simio forum last year. What I want to do is match my person to bag later on based on a variable ParentID, but no matching happens. I did a trace and see that the bags have a non-zero ParentID, but all the pax have ParentID=0. I assumed that in the Assign step highlighted in the first picture is assigning a ParentID to my person, no? I tried a few things, but get errors in other places. Hints? Thanks.

Share this post


Link to post
Share on other sites

It looks like both the person and bag are from the same EntityClass: ModelEntity. Assuming that is true, before the CreateStep put Assign: Variable: ModelEntity.StringStateName New Value: ModelEntity.Name On the Create Step, set Create Type:CopyAssociatedObject and EntityType:Bag. ALL the personEntity states and properties overwrite the bagEntity's. If bag entity has settings that shouldn't be overwritten then you can subclass ModelEntity to make a bagEntityClass. If the bagEntity is from a subclass of the ModelEntity, then only states and properties in common change. No additional Assign is needed. The person and bag EntityClasses could be unrelated. If so, an additional assign Step is needed after Create with Variable: BagClass.StringStateName1 & NewValue: ModelEntity.StringStateName Then only that state changes.

Share this post


Link to post
Share on other sites

×
×
  • Create New...