SystemModeler Archive (.sma)

Background

    System model files that include model dependencies.
    File format created by Wolfram Research, Inc.
    Imported result data is represented as a SystemModel.

Import and Export

  • Import["file.sma","SMA"] imports the specified SystemModeler archive and makes it available as a SystemModel.
  • Export["file.sma",model,"SMA"] saves the SystemModel model and its dependencies in a single file.

Options

  • Export option:
  • "IncludedLibraries"Automaticlibraries to include in file
  • Possible values for "IncludedLibraries" are:
  • Automaticautomatically decide what to include
    Noneinclude no dependencies
    Allinclude all dependencies
    "User"include dependencies not shipped with the system
    {lib1,lib2,}include the explicit libraries libi

Examples

open allclose all

Basic Examples  (2)

Import a total model from an archive:

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

Examine the model's equations:

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

Simulate the model:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Export a model with dependencies:

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

Import the model again:

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

Simulate for 10 seconds and plot the first stored plot in the model:

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

Clean up by deleting the new file and model:

In[4]:=
Click for copyable input

Export Options  (1)

See Also

SystemModel  SystemModelSimulate  "MO"  "SME"

Introduced in 2018
(11.3)