WSMParametricSimulateValue

WSMParametricSimulateValue["mmodel",v,{p1,p2,}]
simulates "mmodel" for the variable v with parameters pi.

WSMParametricSimulateValue["mmodel",{v1,v2,},{p1,p2,}]
simulates "mmodel" for multiple variables vi.

WSMParametricSimulateValue["mmodel",vars,tmax,]
simulates from 0 to tmax.

WSMParametricSimulateValue["mmodel",vars,{tmin,tmax},]
simulates from tmin to tmax.

DetailsDetails

  • WSMParametricSimulateValue gives results in terms of WSMParametricFunction objects.
  • The "mmodel" refers to the fully qualified Modelica name.
  • The shortest unique model name mmodel can be used where WSMNames["*.mmodel"] gives a unique match.
  • WSMParametricSimulateValue takes the same options as WSMSimulate.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Get a parametric solution for z with parameter a:

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

Evaluating with a numerical value of a gives an approximate function solution for z:

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

Evaluate at a time t=10:

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

Plot the solutions for several different values of the parameter:

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

Get a parametric solution for z with respect to the initial value of y:

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

Plot the solutions for several different values of the parameter:

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

Show the sensitivity of the variable z to the parameter a:

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

The sensitivity with respect to increases with time:

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