Level One: Sequential Execution

This tutorial utilizes a simple, purely sequential example model to demonstrate ‘Action’ constructs being executed in sequence by the simulator. This tutorial assumes you have completed the previous Level Zero: Introduction tutorial and have the Robotic System example models already imported into your current project.

Perform the following outlined steps in Innoslate:

  1. Use ‘Diagrams View’ to navigate directly to the ‘Action Diagram’ named “Level One: Robot Root Action.” Once in the ‘Action Diagram,’ you can see this example is a model of a purely sequential process. Each ‘Action’ in the diagram must wait for the ‘Action’ before it to complete execution in order to begin its own execution.
  2. Ensure the Duration attribute specified for each ‘Action.’ To check Duration, click on an ‘Action’ to highlight it and take a look at the Duration section in the ‘Attributes’ tab of the left sidebar.

    The underlying Action entity of each of the ‘Action’ constructs has a Duration attribute which is used during simulation to calculate the length of time the ‘Action’ will take to execute. The Duration attribute requires both a value and units (seconds, minutes, hours, etc.), and the value can be fixed or one of the supported distributions. Specifying a Duration for each ‘Action’ being simulated is required for the model to execute properly.

    In this example, “Wake robot” and “Sleep robot” are both already set to fixed values of eight seconds as these ‘Actions’ are expected to take a fixed amount of time. However, when the robot receives a command from the user it is expected to take a variable amount of time. To simulate this, “Receive user command” is set to a Normal Distribution with a mean of four seconds and standard deviation of two seconds. Likewise, performing the command is expected to be variable and is set to a Normal Distribution with a mean of 30 seconds and a standard deviation of 15 seconds.

  3. Navigate to the ‘Discrete Event Simulator’ via the blue ‘Simulate’ drop-down, and set the Speed in the ‘Settings’ menu to 1x (Real Time) in order to actually be able to see the simulation’s progress while it is running since the model in this example completes execution so quickly. Remember to click the ‘Save Settings’ button to ensure your changes take effect.
  4. Once the speed has been set, run the simulator by clicking the ‘Play’ button.

    While the simulation is running, each of the panels will update to reflect the current state of the simulation. At any time, you may pause the simulator to run a report or view the panels at their current state if need be. Below is a screenshot of the simulator paused during execution of this model:

    Here is a quick summary of what can be interpreted from the above screenshot: In the ‘Status’ panel you can see the ‘Action’ named “Perform User Command” is currently executing and based on the progress bar underneath the name looks to be about 45% complete. In the ‘Action Trace 3D’ panel, ‘Actions’ which have already ran are blue, the ‘Action’ currently executing is green and ‘Actions’ which have yet to run are grey. In the ‘Total Time’ panel shows the total number of seconds the simulation has taken so far and the ‘Gantt Chart’ panel shows the ‘Actions’ which have already executed in blue.

    Once the simulator has finished executing the model, the simulator will display a result similar to the example shown below. The ‘Status’ panel will show the simulation is “100% COMPLETE.”

  5. If you recall we added distributions which will be randomly generated each time an ‘Action’ begins executing. Click the ‘Restart’ button to rerun the simulation again and you will notice the total simulation time varies per run. Continue rerunning the simulator until you are comfortable with how ‘Action’ constructs are executed in sequence.