In the previous section, we have shown you how to execute the StopWatch model from the StopWatch Class. You can also use Cameo Simulation Toolkit to execute the model from an InstanceSpecification. With this feature, you can specify values to the slots of an InstanceSpecification. These values will be used as the input values for the execution such as using a ReadStructuralFeatureAction to read the values.
In this tutorial, our StopWatch contains only one value property, which is time. The time value will always reset to zero whenever the system enters the ready State. If we create an InstanceSpecification of StopWatch and use it for model execution, the result will be the same as the model execution of the StopWatch Class.
To create an InstanceSpecification of StopWatch
To create values and assign them to the slots
To start executing the stopwatch InstanceSpecification, right-click it either on the System Class diagram or in the containment browser and click Execute. A simulation session will be created in the Sessions tab of the Simulation window to execute this instance. The steps to run the execution are the same as those to execute the StopWatch Class.