Cameo Simulation Toolkit 18.5 Documentation
Unlike a Time Series chart, a Timeline chart allows you to see the active states of an object or a property during simulation or the activities simulated in an object. The Timeline plot allows you to see the animation of all active states while a model simulation is running, as well as which objects are active in each state or when a state starts and ends.
Similar to the Time Series chart, the Timeline chart also shows the x-axis and y-axis. The x-axis represents time while the y-axis represents object state names in different values. The Timeline chart identifies the changes in the object states and plots them along a timeline. The states are grouped by region. Cameo Simulation Toolkit records changes in the active states and allows you to export them to a CSV or TSV file. You can then import the CSV file into an Excel file to analyze the exported Timeline chart, such as calculating the simulation duration, what object is in a particular state, and how long it was busy or idle.
We use the sample project FlashingLight.mdzip throughout this section to demonstrate how to use the Timeline chart in your model.
Properties of the Timeline chart
The Cameo Simulation Toolkit's Timeline chart can also serve as a predefined subtype of UI config. You can use it as a UI mockup of the SimulationConfig element just like an ImageSwitcher. Figure 1 shows the specification dialog of the Timeline chart.
The properties of Timeline chart in its Specification dialog.
You can change the Timeline chart's display by modifying its properties (see the following table).
|FixedTime Length||To specify a fixed range of the time axis in a Timeline chart in milliseconds. If you specify a value, the time axis range will be fixed to that particular value. If you do not specify the value of Fixed Time Location, the plot(s) will move to the left if the time range is greater than the maximum value of the time axis. A fixed time length unit is specified by a time unit tag definition of the simulation config. If you do not specify the time unit, Cameo Simulation Toolkit uses 20,000 milliseconds as the default unit.|
|Fixed Time Location||To specify the start time of the time axis in a Timeline chart. If you specify a value for the Fixed Time Length, but leave the Fixed Time Location value empty, the Timeline chart will work like an oscilloscope. The plot(s) will move to the left. A fixed time location unit is specified by a time unit tag definition of the simulation config. If you do not specify the time unit, Cameo Simulation Toolkit uses the millisecond as the default unit.|
|Title||To specify the title of a Timeline Chart.|
|Plot Color||To specify a plot color.|
|Context Plot||To show or hide a context plot.|
|Timeline Mode||To select whether to show the Timeline of a state or an activity.|
Using Timeline chart
To display a Timeline chart
- Open the context menu of the Variables pane in the Simulation window.
- Right-click the row of a runtime value you want to show on the Timeline chart and select Show in Timeline Chart > State or Activity. This example uses State.
To use a Timeline chart
Create a Timeline chart element to represent a classifier.
- Open its Specification dialog and click next to the Value property to select the elements/values to be monitored in the Timeline Chart. The Select Nested Properties dialog will open.
Select the values and click . The selected values of the Timeline chart appear in the Value tag field of the Specification dialog.
- Double-click the Simulation Config Flashlight on the diagram pane to open its Specification dialog.
Click next to the UI property field. The Select UI dialog will open.
Select the Timeline component and click to add it to the UI of the Simulation Config.
Click . The added Timeline component appears as one of the Simulation Config UI properties in the Specification dialog.
- Once you specify all of the values, the Simulation Config in the diagram pane shows the Timeline chart along with the values that represent systems..
- Run the Timeline Chart. You can see animation of the active states in the Timeline Chart when the Context Plot option is set to False and True. The following figure shows the Timeline chart output when the Context Plot option in the Specification dialog is set to False.
The following figure shows the Timeline chart output when the Context Plot option in the Specification dialog is set to True.
To show the duration of empty/dummy actions as duration constraints
The Timeline Chart can show empty or dummy actions with duration constraints. The dummy action can be either an empty call behavior action with no behavior assigned or an opaque action with duration constraints, shown in the following example.
The Timeline Chart shows the Action names on the left-hand side and the duration simulation performed on the Actions (not the Activities) on the right-hand side. The same thing applies to an Action that has behaviors assigned, but it is empty and has no diagram. The following figure shows the Timeline Chart of the empty/dummy actions from the above example.
To export a Timeline chart
On the Timeline chart pane, e.g., System, click the Export Data button on the Timeline Chart dialog.
- The Timeline chart will be exported as a CSV format file. The exported Timeline chart in an Excel file is in the figure as follows.
A Context plot is a Timeline chart property that enables the plot of the context. It appears on top of the chart as a horizontal line.
A CSV is a comma-separated values file that stores tabular data (text and number) in plain text. Each line in the file is a record and each record consists of one or more fields, separated by commas.
A piece of equipment showing oscillations in an electric current as waves on a screen.
A Timeline chart is used to describe the behaviors of both individual classifiers and interactions of the classifiers, focusing attention on the time of events triggering a state change.
A TSV is a tab-separated values file that stores data in a tabular structure (e.g. database or spreadsheet data). Each line in the file is a record and each record consists of one or more fields, separated by tabs.
- No labels