Cameo Simulation Toolkit 18.5 Documentation

Skip to end of metadata
Go to start of metadata

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). 

PropertyFunction
FixedTime LengthTo 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 LocationTo 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. 
TitleTo specify the title of a Timeline Chart. 
Plot ColorTo specify a plot color. 
Context PlotTo show or hide a context plot. 
Timeline ModeTo select whether to show the Timeline of a state or an activity.


Using Timeline chart

To display a Timeline chart



  1. Open the context menu of the Variables pane in the Simulation window.
  2. 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


  1. Create a Timeline chart element to represent a classifier.

  2. 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.

  3. Select the values and click . The selected values of the Timeline chart appear in the Value tag field of the Specification dialog.


  4. Double-click the Simulation Config Flashlight on the diagram pane to open its Specification dialog.
  5. Click  next to the UI property field. The Select UI dialog will open.

  6. Select the Timeline component and click  to add it to the UI of the Simulation Config.

     


  7. Click . The added Timeline component appears as one of the Simulation Config UI properties in the Specification dialog.


  8. 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..




  9. 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


  1. On the Timeline chart pane, e.g., System, click the Export Data button on the Timeline Chart dialog.

    The Export Data Button of the Timeline Chart


  2. 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.
On this page


Sample model

The models used in the figures on this page are the FlashingLight and OntologicalBehaviorModeling sample models that come with your modeling tool. To open the sample, either:

Glossary

 

 Context plot

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.

 CSV

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.

 Oscilloscope

A piece of equipment showing oscillations in an electric current as waves on a screen.

 Timeline chart

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.

 TSV

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