gives a representation of the model "model", usable as input to other functions.


gives the specified "property" for the model "model".

Details and Options

  • SystemModel[]["property"] is equivalent to SystemModel[, "property"].
  • SystemModel["model"]["Properties"] gives a list of possible properties.
  • A shortened name "model" can be used if SystemModels["*.model"] gives a unique match.
  • SystemModel[model,<|"property"->|>] creates a new SystemModel by modifying property of model.
  • Properties related to the whole model: »
  • "Description"top-level description of model
    "Summary"model summary data
    "ModelName"fully qualified path of model
    "Diagram"diagram view of model
    "ModelicaIcon"icon view of model
    "ModelicaDisplay"show Modelica model code
    "ModelicaString"Modelica model code as a string
    "SourceFile"file where the model is saved
    "Documentation"link to model documentation
    "OnlineDocumentation"link to online documentation for libraries
    "Domain"association describing modeling domain
    "DomainChart"chart describing modeling domain
    "Balanced"if the model is balanced in equations and variables
    "SimulationModel"if the model is a simulation model
    "Specialization"specialization "model", "package", "function",
    "Version"version information of model
  • "ModelicaDisplay" creates a cell with style "Program" containing the textual form of "model".
  • "ModelicaString" returns the textual form of "model" as a string.
  • SystemModel["model"]["Diagram","c1","c2",] shows the diagram for component "" in "model".
  • SystemModel["model",{property,options}] accepts the following options for property "Diagram" and "ModelicaIcon":
  • FrameTrueshow frame
    FrameTicksFalseshow frame ticks
    GridLinesNonewhat grid lines to show
    PlotRangeAutomaticplot range in mm
    PlotRangePaddingAutomaticpadding in mm
  • GridLines->Inherited inherits the grid defined in the model diagram. »
  • PlotRange->Automatic specifies a plot range that encloses the primitives drawn in the diagram.
  • PlotRange->Inherited inherits the page size specified in the model diagram. »
  • Properties related to stored plots:
  • "PlotNames"names of plots in model
    "LocalPlotNames"names of plots stored locally in model
    "InheritedPlotNames"names of plots inherited from "ExtendsModels"
    "Plots"stored plot specifications
    "LocalPlots"plot specifications stored locally in model
    "InheritedPlots"plot specifications stored in "ExtendsModels"
  • Stored plots from "Plots" and "LocalPlots" are a list of plotspec.
  • Each plotspec is an Association with the following keys:
  • "Variables"{"v1","v2",}list of variables (required)
    "Interval"Automatictime interval
    "AxesLabel"Automaticaxes label
    "PlotLegends"Automaticlegends for curves
    "PlotRange"Automaticrange of values to include
    "Name"Automaticname of the plot
    "Group"Nonegroup name
    "Preferred"Falsewhether the plot is a preferred one
  • Stored plot "Variables" can take the following forms:
  • {"v1","v2",}variables vi
    {{"v1,x","v1,y"},}parametric plot of vi,x vs vi,y
    {{"v1","p1",d1},}sensitivity bounds around vi for pi varying 100 di%
  • Stored plot "Interval" can be given as {tmin,tmax} or tmax.
  • Stored plot "AxesLabel" can be Automatic, None, a string label for the y axis or {"xlabel","ylabel"}.
  • Possible "PlotLegends" are Automatic, None or a list of one string per variable in the plot.
  • "PlotRange" is Automatic, {ymin,ymax} or y, which is interpreted as {-y,y}.
  • If "Preferred" is True, the plot will be included in SystemModelPlot[model].
  • A list of associations in plotspec creates multiple subplots in the stored plot. Common elements are taken from the first subplot.
  • Properties related to equations and variables: »
  • "SystemEquations"differential and algebraic equations
    "InitialEquations"initial value equations
    "InitialSeedings"guess values for initialization
    "StateVariables"differentiated variables
    "AlgebraicVariables"non-differentiated variables
    "SystemVariables"state and algebraic variables
    "InputVariables"variables specified as inputs
    "OutputVariables"variables specified as outputs
    "DiscreteVariables"variables changing only at events
  • "SystemEquations" gives equations depending on t.
  • SystemModel["model"]["SystemEquations",t] gives equations depending on t.
  • SystemModel[] contains Missing[type,content] for any parts of equations that cannot be represented.
  • "InputVariables" are distinct from "SystemVariables", and "OutputVariables" are a subset of "SystemVariables".
  • "DiscreteVariables" are a subset of "SystemVariables" and are given in a form suitable as a setting for the DiscreteVariables option to NDSolve.
  • Properties related to values: »
  • "ParameterValues"parameter rules {p1->val1,}
    "InitialValues"initial value rules {v1->val1,}
    "GroupedInitialValues"initial values grouped by state, input and output
  • For variable and parameter lists, SystemModel["model"][{prop,patt}] returns the elements of prop whose Modelica form matches the string pattern patt.
  • Properties related to the structure of the model:
  • "ExtendsModels"models this model extends
    "Components"model components
    "Connections"model connections
    "Connectors"model connector components
    "LocalComponents"components defined locally in model
    "LocalConnections"connections defined locally in model
    "LocalConnectors"connectors defined locally in model
    "InheritedComponents"components defined in "ExtendsModels"
    "InheritedConnections"connections defined in "ExtendsModels"
    "InheritedConnectors"connectors defined in "ExtendsModels"
  • Properties related to relations with other models:
  • "ModelsExtending"models that extend this model
    "ModelsContaining"models that use this model as a component
    "Parent"the parent model in a package hierarchy
    "Children"child models in a package hierarchy
    "Siblings"sibling models in a package hierarchy
  • The following options can be given:
  • MethodAutomaticmethods for equation processing
  • Possible settings for "opti" in Method->{"opt1"->val1} include:
  • "Elimination"Noneeliminate simple equations
    "ReduceIndex"Automaticreduced index of DAEs in balanced models
    "StartTime"0simulation start time
  • The properties "PropertyAssociation" and "PropertyDataset" return computable forms of all properties.


open all close all

Basic Examples  (4)

Get the representation of a model:

Click for copyable input

Retrieve a property using the model representation:

Click for copyable input

Show a summary of a model:

Click for copyable input

Get the differential equations for a model:

Click for copyable input

Pick a random included example model using SystemModelExamples:

Click for copyable input

Show the full model name and description for the model:

Click for copyable input
Click for copyable input

Scope  (57)

Options  (3)

Applications  (5)

Properties & Relations  (9)

Introduced in 2018