Академический Документы
Профессиональный Документы
Культура Документы
1 - Simulation tutorial
Agenda
Control panel
must have at least one initial state, must have a path to reach a final node, should not contain deadlock states.
Available transitions
New position is TOP Right signal is Active / ON Left signal is still Inactive
10
10
Right click on the .uml or .di model file First dialog box : only the interactive mode works with UML Second dialog box : allow to chose instances of the model that will be used in the simulation Start the simulation Store an event in the event queue of an instance Step over : execute an event and all sub-events if any Step into : execute the selected event but not its sub event Step return : execute an event and all events that have the same father
Simulation control :
11
11
Action nodes : consume incoming tokens and produce outgoing tokens Control nodes : used to control the execution flow
Opaque action : does nothing but produce control token on output control flows. ReadSelf : return the current instance object on his outgoing pin. ReadStructuralFeature :return the value of an attribute. The target object must be received on the object pin. The feature to be read must be referenced by the property structural feature. The result is returned on the outgoing pin. AddStructuralFetureValue : modifies the content of an attribute. Works the same way as ReadStructuralFeature. The new value is received on a input pin. The property ReplaceAll should be false only if the attribute is a list. ReadVariable and AddVariableValue : works the same way bu for local variables
12
12
CreateObject : Creates a new object and put it on its outgoing pin. The type of the object is defined by the property Classifier DestroyObject : Removes the object received on its input pin from the simulation SendSignal : sends a signal to the object received on the port target BroadcastSignal : sends a signal to all active instances CallBehavior : call a behaviour, generally an activity. Parameters of the activity must correspond to pins of the call behaviour action CallOperation : works the same way as CallBehavior but the object executing the action is received on an input pin target. Initial node : creates the first token Final node : terminates the activity Decision and merge nodes : used to describe alternative paths Join and fork nodes : used to model parallel paths
13
13
When activating Step into during previous transition (Medium UP-> Top)
14 Topcased simulation tutorial 14
Step over
15 Topcased simulation tutorial 15
16
16
Step over
17 Topcased simulation tutorial 17
18
18
TurnSignalTest : Modelling of a turn signal ( move up -> turn right , move down -> turn left)
19
19
More information
http://www.topcased.org/index.php?documentsSynthesis=y&Itemid=59
20
20