Home   :   Other Stuff   :   xUML in Second Life   :   Model Initialisation

 

Model Initialisation

 

When an avatar clicks on the blue pyramid to start the demonstration, the previously built model collapses and then disappears.  A video of the demonstration from which all the pictures shown here have been taken can be seen on YouTube here.

The build process starts by constructing a modified Class Diagram which shows two classes Ping (PIG) and Pong (POG) plus an association between them.  Each class has a transparent section for naming the attributes, for the event pools and class operations.  It also defines a large space used to hold instance state machines.  Associations are represented as glass box "tunnels" between the classes where the actual links between instances are created and navigated.

The simulation starts by creating an Initialisation Segment which contains some Action Specification Language (ASL) statements.  The first of which is:

 

newPing = create unique Ping with Current_State = 'Activate' & count = 0

The effect of this line is to create an instance of Ping within the Ping class complete with Facts (attribute values), Event Pool and State Machine with a highlighted Current_State which is not active.  This instance's attribute value of count is set to zero.  The handle “newPing” is used later in the Initialisation Segment to refer to the newly create instance.

The second ASL statement creates an instance of Pong in the same way:

 

newPong = create unique Pong with Current_State = 'Active'

Now, a link is implemented by using the existing Association.

The next statement implements a relational link between the new instances using their handles:

 

link newPing R1 newPong

The final initialisation statement generates the "go" event that kick-starts the interaction between the instances:

 

generate PIG200:go() to newPing

Copyright 2017 Dark Matter Systems Ltd. All Rights Reserved.