RecordEdits Define DiscreteDistribution { DiscreteDistribution1 } Define AddTo { AddTo1 } Define Assign { howToUpdateTheChildren randomTeamAssignedtoContainer } Define EntityContainer { EntityContainer1 } Define EntityDelay { EntityDelay1 } Define EntityGenerator { EntityGenerator1 EntityGenerator2 } Define Queue { Queue1 Queue2 Queue3 } Define SimEntity { SimEntity1 } Define ColladaModel { Axis Grid100x100 } Define DisplayEntity { XY-Grid XYZ-Axis } Define OverlayClock { Clock } Define OverlayText { Title } Define View { View1 } DiscreteDistribution1 UnitType { DimensionlessUnit } EntityContainer1 AttributeDefinitionList { { team 0 } { myChildren null } } SimEntity1 AttributeDefinitionList { { team 0 } } Simulation Description { 'Simulation run control inputs' } # *** DiscreteDistribution *** DiscreteDistribution1 RandomSeed { 1 } DiscreteDistribution1 ValueList { 1 2 } DiscreteDistribution1 ProbabilityList { 0.5 0.5 } # *** AddTo *** AddTo1 NextComponent { EntityDelay1 } AddTo1 WaitQueue { Queue2 } AddTo1 NumberOfEntities { 2 } AddTo1 ServiceTime { 2 h } AddTo1 ContainerQueue { Queue1 } # *** Assign *** howToUpdateTheChildren NextComponent { Queue3 } howToUpdateTheChildren AttributeAssignmentList { { 'this.obj.myChildren = map(|c|(c),this.obj.EntityList)' } } randomTeamAssignedtoContainer NextComponent { howToUpdateTheChildren } randomTeamAssignedtoContainer AttributeAssignmentList { { this.obj.team=[DiscreteDistribution1].Value } } # *** EntityDelay *** EntityDelay1 NextComponent { randomTeamAssignedtoContainer } EntityDelay1 Duration { 2 h } # *** EntityGenerator *** EntityGenerator1 NextComponent { Queue1 } EntityGenerator1 PrototypeEntity { EntityContainer1 } EntityGenerator1 BaseName { parent } EntityGenerator1 MaxNumber { 3 } EntityGenerator1 InitialNumber { 3 } EntityGenerator2 NextComponent { Queue2 } EntityGenerator2 PrototypeEntity { SimEntity1 } EntityGenerator2 BaseName { child } EntityGenerator2 MaxNumber { 6 } EntityGenerator2 InitialNumber { 6 } # *** GRAPHICS INPUTS *** Simulation RealTime { TRUE } Simulation SnapToGrid { TRUE } Simulation RealTimeFactor { 8192 } Simulation ShowLabels { TRUE } Simulation ShowSubModels { TRUE } Simulation ShowReferences { TRUE } Simulation ShowEntityFlow { TRUE } Simulation ShowModelBuilder { TRUE } Simulation ShowObjectSelector { TRUE } Simulation ShowInputEditor { TRUE } Simulation ShowOutputViewer { TRUE } Simulation ShowPropertyViewer { FALSE } Simulation ShowLogViewer { FALSE } Simulation ModelBuilderPos { 0 135 } Simulation ModelBuilderSize { 329 442 } Simulation InputEditorPos { 197 1237 } Simulation InputEditorSize { 590 250 } Simulation OutputViewerPos { 846 1267 } Simulation OutputViewerSize { 590 250 } DiscreteDistribution1 Position { 3.4 0.2 0.0 m } AddTo1 Position { -2.8 -1.9 0.0 m } howToUpdateTheChildren Position { 7.1 -1.9 0.0 m } randomTeamAssignedtoContainer Position { 3.4 -1.9 0.0 m } EntityContainer1 Position { -6.4 2.0 0.0 m } EntityDelay1 Points { { 0.4 -1.9 0.0 m } { 1.4 -1.9 0.0 m } } EntityGenerator1 Position { -4.1 2.0 0.0 m } EntityGenerator2 Position { -1.2 2.0 0.0 m } Queue1 Position { -4.2 0.3 0.0 m } Queue2 Position { -1.4 0.3 0.0 m } Queue3 Position { 9.6 -1.9 0.0 m } SimEntity1 Position { 1.0 1.9 0.0 m } SimEntity1 Alignment { 0.0 0.0 -0.5 } # *** ColladaModel *** Axis ColladaFile { /shapes/axis_text.dae } Grid100x100 ColladaFile { /shapes/grid100x100.dae } # *** DisplayEntity *** XY-Grid Description { 'Grid for the X-Y plane (100 m x 100 m)' } XY-Grid Size { 100 100 m } XY-Grid DisplayModel { Grid100x100 } XY-Grid Movable { FALSE } XYZ-Axis Description { 'Unit vectors' } XYZ-Axis Alignment { -0.4393409 -0.4410096 -0.4394292 } XYZ-Axis Size { 1.125000 1.1568242 1.1266404 m } XYZ-Axis DisplayModel { Axis } XYZ-Axis Show { FALSE } XYZ-Axis Movable { FALSE } # *** OverlayClock *** Clock Description { 'Simulation date and time' } Clock ScreenPosition { 15 15 } Clock AlignBottom { TRUE } Clock TextHeight { 10 } Clock FontColour { gray20 } Clock FontStyle { ITALIC } Clock DateFormat { 'yyyy-MMM-dd HH:mm:ss.SSS' } # *** OverlayText *** Title Description { 'Title for the simulation model' } Title ScreenPosition { 15 15 } Title Format { 'How to Update Child Attributes of a Container?' } Title TextHeight { 18 } Title FontColour { 150 23 46 } Title FontStyle { BOLD } # *** View *** View1 Description { 'Default view window' } View1 ViewCenter { 1.71825 -0.868368 0.0 m } View1 ViewPosition { 1.71825 -0.868368 17.320508 m } View1 WindowSize { 2172 1104 } View1 ShowWindow { TRUE } View1 Lock2D { TRUE } View1 SkyboxImage { /images/sky_map_2048x1024.jpg }