Modelica CombiTimeTable

Background

    Modelica CombiTimeTable ASCII format data files.
    File format used by Modelica.
    Exported files can be read by Modelica component "Modelica.Blocks.Sources.CombiTimeTable".

Import and Export

  • Import["file.txt","MCTT"] imports table data from the ASCII file and returns {"n1"->data1,}, where datai are lists of lists.
  • Export["file.txt",data,"MCTT"] writes data in an ASCII file readable by SystemModel["Modelica.Blocks.Sources.CombiTimeTable"].

Elements

  • Import element:
  • "MCTT" list of rules with {"n1"->datai,}
  • Export data formats:
  • {{"n1",{{t1,v1},}},}time-value pairs {ti,vi} for variable names "ni"
    {{"n1",{v1,}},}values vi for variable names "ni"
    {{"n1",ts1},}TimeSeries tsi for variable names "ni"
    {{"n1",f1},}samples of functions fi

Options

  • Option for exporting values {v1,}:
  • SamplingPeriod1distance between samples
  • Options for exporting sampled functions fi:
  • SamplingPeriodAutomaticdistance between samples
    "StartTime"0start time for sampling
    "StopTime"Automaticstop time for sampling

Examples

open allclose all

Basic Examples  (3)

Export already-sampled data for two variables:

In[1]:=
Click for copyable input
Out[1]=

Export a TimeSeries:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Import data as arrays:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Export Options  (1)

Properties & Relations  (1)

See Also

CreateDataSystemModel  SystemModelSimulate  "MO"

Introduced in 2018
(11.3)