WSMLink`
WSMLink`

WSMInitialValues

WSMInitialValues is being phased out in favor of the association key "InitialValues" in functions introduced experimentally in Version 11.3.

WSMInitialValues

is an option for functions such as WSMSimulate that specifies initial values for variables.

Details

  • Setting WSMInitialValues->{v1->a1,} sets initial values vi to ai in the simulation or model.
  • WSMInitialValues corresponds to the start property in the model.
  • Using WSMInitialValues for a simulation does not recompile the model.
  • WSMInitialValues takes the following values:
  • {v1a1,}set initial values for vi to ai
    {v1{a1,a2,},}run simulations in parallel, with initial values aj for vi
  • Each vi can be either a string or DotName.

Examples

open allclose all

Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Simulate with default initial values:

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

Modify x to have initial value 3:

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

Simulate with a range of initial values:

In[1]:=
Click for copyable input

Vary the initial angles of the balls in the cradle:

In[2]:=
Click for copyable input

The angles of the first and last ball in the cradle for different initial angles:

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

Create a model with a start value for a variable:

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

Scope  (8)

Applications  (2)

Properties & Relations  (1)

Possible Issues  (2)

Neat Examples  (1)

See Also

WSMParameterValues  WSMSimulate  WSMSimulateSensitivity  WSMCreateModel  WSMConnectComponents

Tutorials