Page tree

Cameo Simulation Toolkit 19.0 LTR SP4 Documentation


On this page

In Cameo Simulation Toolkit, a Time series chart displays plots of runtime values with respect to simulation time. You can show a Time series chart of any runtime values during model simulation. The Time series chart measures time on the X-axis (horizontal axis) and runtime values on the Y-axis (vertical axis). The graph of the time series chart simulates the movement of the values or data over time. It allows you to evaluate trend or monitor behavior in the selected values within a specific period of time. You can use a time series chart to display real-time plotting of runtime values on the Y-axis, along with simulation time on the X-axis (as in the simulation time and clock settings). You can also customize most of the chart properties according to your preferences, including title, plot color, min and max value, and external CSV. For further information, see the built-in sample MotionAnalysis.mdzip, used throughout this page to demonstrate how to use the Time series chart in your model.

Properties of Time series charts

The Specification window of a Time series chart contains the properties you can select or modify to change the display of the Time series chart. The following figure shows the Specification dialog of the Time series chart:

The properties of Time series chart in its Specification window.

The following table describes the function of each property of the Specification dialog of Time series chart:

PropertyFunction
Annotate FailuresTo annotate a Requirement and constraint failures as the chart plot area in red (true by default).
Load CSV FileA load CSV file is a file that the Time Series chart will load as a curved line graph. You can import multiple CSV files into the Time series chart and load them as curved line graphs. They will be represented with different colors and legend names (same as the filename extension) so you can compare the differences between the actual results and the desired line graphs.
Record Plot Data AsTo specify the selected format of the file to be saved if Result File is specified.
Result FileTo 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.
Fixed Time LengthTo specify a fixed range of the time axis in a Time series chart. 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 will use the millisecond as the default unit. 
Fixed Time LocationTo specify the start time of the time axis in a Time series chart. If you specify a value for the Fixed Time Length but leave the Fixed Time Location value empty, the Time series 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 will use the millisecond as the default unit.
Y LabelTo specify the label of the y-axis of the Time series chart.
TitleTo specify the title of a Time series chart.
Fixed RangeTo specify whether a Time series chart will automatically adjust the range on the Y-axis. If the value is true, the range of the Y-axis will be fixed; otherwise, the range will automatically change. 
Grid XTo show or hide a vertical grid line
Grid YTo show or hide a horizontal grid line.

Keep Open After Termination

To keep the Time series chart open after the termination of the simulation.
Max ValueTo specify an upper bound value of the Y-axis.
Min Value To specify a lower bound value of the Y-axis.
Plot ColorTo specify a plot color.
Refresh RateTo specify a time interval to refresh a Time series chart. A refresh rate unit is specified by a time unit tag definition of the Simulation Config. If no time unit is specified, the millisecond will be used as the refresh rate unit.
Linear InterpolationIf true, the plot will connect 2 dots in a non-rectangular line at a time.

The following figure shows the configuration settings of both Time series chart and Simulation Config of the MotionAnalysis.mdzip sample project. The Time series chart has been set as the "Represents" field to the Motion Analysis block together with the "Values" field to the required properties (x, v, and a), along with other properties as needed. Also, the Simulation Config "UI" field has been set to the Time Series Chart (x-v-a plot).

TimeSeriesChart in the MotionAnalysis.mdzip Sample Project
The configuration settings of both Time series chart and Simulation Config of the MotionAnalysis.mdzip sample project.

Once the simulation begins, the Time series chart displays real-time plotting of the x, v, and a properties with time(s), as shown in the MotionAnalysis.mdzip sample.

Time Series Chart during the Simulation of Run Analysis x-v-a Simulation Configuration in the MotionAnalysis Sample
Real-time plotting of the x, v, and a property with time(s) in the MotionAnalysis.mdzip sample.

Using a Time series chart

To display a Time series chart


  1. Open the context menu of the Variables pane.
  2. Right-click the row of a runtime value, which must be shown on the Time series chart. Select Show in time series chart (see the Time series chart for more information). 

The Cameo Simulation Toolkit's Time series 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. 


To use a Time series chart


  1. Create a TimeSeriesChart element to represent a Classifier.
  2. In the Specification window, specify the value tag definition and properties whose values will be monitored in the Time series chart. These properties must be members of the Classifier represented by the Time series chart element.

Showing Requirements or constraint violations

When Simulation Toolkit annotates a failure property in red (as the selected property to be represented in the chart) on the Variables pane, the chart plot area during that period of failure will be also rendered in red. There will be the tooltip shown in the red area with the full information exactly the same as other tooltips, e.g., in the Instance table and Variables pane, when failure is shown in red.

Labels will be printed in red above the chart and at the center. The label format of a failed constraint is shown as “<Name of the constraint property typed by the constraint Block> fails”, and the label format of a failed Requirement is shown as “req <ID> fails”. However, if the name of constraint property is blank, the label will not be printed. You can also manually disable this option via the Annotate Failures property in the Time series chart Specification window for some reasons, e.g., too many failures with overlapped labels in the chart.

Time series chart shows constraint violations with multiple labels.

You can zoom in the chart to see start time and end time points marked with big dots. You can also display the time unit of each point by hovering the mouse over it as shown in the figure below. Labels of failed validation will be included in the exported image (by setting Record Plot Data As PNG and specifying Result File in the Time series chart Specification window). This feature also applies to Representing Time series charts in a Timeline chart.

Tooltip of the Time series chart shows the full information of failure, start time, and end time points.

Glossary

  • 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; each record consists of one or more fields, separated by commas.
  • Runtime value
    A runtime value refers to the value of the structural features contained in the created object during model simulation.
  • Time series chart
    A Time series chart is a graph that can simulate runtime values over a specific period of time.

Sample model

The model used in the figures on this page is the Motion Analysis sample model that comes with a modeling tool. To open this sample, do one of the following:


  • Download MotionAnalysis.mdzip.
  • Find in modeling tool <modeling tool installation directory>\samples.
  • No labels