On this page
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. If a Timeline chart represents an Activity, the x-axis of the chart shows time and the y-axis shows Call Behavior Action, Activity, Call Operation Action, and Operation names. If a Timeline chart represents a State, the x-axis of the chart shows time and the y-axis shows object State names in different values. Timeline charts identify the changes in object States or executed Activities and plot them along a timeline. The States are grouped by region. Magic Model Analyst records changes in the active States or Activities and allows you to export them to a CSV or TSV file. You can then import the CSV file into an Excel file and analyze the exported Timeline chart, e.g., calculate the simulation duration, see what object is in a particular State, and how long it is busy or idle.
We use the sample project FlashingLight.mdzip throughout this section to demonstrate how to use a Timeline chart in your model.
The Magic Model Analyst's Timeline chart can also serve as a predefined subtype of a UI Config. You can use it as a UI mockup of the SimulationConfig element just like an ImageSwitcher. The Specification window of the Timeline chart is shown below:
You can change the Timeline chart's display by modifying its properties, as shown in the following table.
Property | Function |
---|---|
Annotate Failures | To annotate a Requirement and constraint failures as the chart plot area in red (true by default). |
Context Plot | To show or hide a context plot. |
Dynamic | If true, the chart shows only States or Actions actually used and sorted by occurrence. Otherwise, the list of static Behaviors is shown, and the chart contains information when open. |
Fixed Time 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 the 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, Magic Model Analyst 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, Magic Model Analyst uses the millisecond as the default unit. |
Ignored Elements | A list of elements (States, Actions, and Activities) which will be ignored and not displayed in the Timeline chart. This list takes priority over the Value list. |
Keep Open After Termination | To keep the Timeline chart open after the termination of the simulation. |
Linear Interpolation | If true, the plot will connect 2 dots in a non-rectangular line at a time. |
Plot Color | To specify a plot color. |
Record Plot Data As | To specify the selected format of the file to be saved if Result File is specified. |
Result File | To specify the file name to be saved from the results in the selected file format specified in the Record Plot Data As property. Otherwise, the results will be saved into model elements. |
Timeline Mode | To select whether to show the Timeline of a State or an Activity. |
Title | To specify the title of a Timeline Chart. |
To display a Timeline chart
To use a Timeline chart
Create a Timeline chart element to represent a Classifier.
Select the values and click . The selected values of the Timeline chart appear in the Value tag property of the Specification window.
Click next to the UI property field. The Select UI dialog opens.
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 window.
The following figure shows the Timeline chart output when the Context Plot option in the Specification window is set to True.
10. Optionally, you can specify in the Ignored Elements property what State will be ignored and not be recorded in the Timeline chart if the user does not want to see them. The following figure shows the Timeline chart output when the Ignored Elements property is set to ignore the ticking State and the off State of the timer, and the on State of the system.
A Timeline chart shows only States and Actions that are actually used, e.g., Actions with duration constraints and signaled States. The used elements will be displayed in the chart and sorted in time order. |
You can reorder the values monitored on a Timeline Chart as described below.
To reorder Timeline Chart values
To show the duration of empty/dummy Actions as duration constraints
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.
To represent value properties as separated Time series charts in a Timeline chart
Open the Specification window of a Timeline chart and click the Value tag. Boolean, Enumeration, and Numeric primitive value types (e.g., Number, Real, or Integer), are supported as shown in the following figure.
Run the simulation with the Timeline chart. The selected value properties will be included in the Timeline chart and represented as the Time series chart with fixed height, as separate bars for individual properties (shown in the figure below).
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, do either of the following