SystemModeler Link >

WSMInitialValues


is an option for WSMSimulate and WSMSimulateSensitivity that specifies initial values for variables.
  • Setting sets initial values to in the simulation.
  • corresponds to the start property in the model.
  • Using does not recompile the model.
  • Setting runs simulations in parallel, with taking initial values .
Load Wolfram SystemModeler Link:
Simulate with default initial values:
Modify to have initial value :
Simulate with a range of initial values:
Vary the initial angles of the balls in the cradle:
The angles of the first and last ball in the cradle for different initial angles:
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 to have initial value :
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]=
is used to set initial values for variables in simulation:
can be used together with WSMParameterValues:
If a list is given for , multiple simulations are run in parallel:
Sweeps with multiple initial values changing can be done with lists of equal length:
Simulate all combinations of a parameter and an initial value:
can also be given as list pairs:
Variables can be given on the form returned from WSMModelData:
Find initial values to satisfy a condition on a final value:
Simulate a bouncing ball with a range of initial heights:
Pick out the simulations where the ball bounced 18 times:
Find initial heights of successful simulations:
Show drops in a plot:
Parameters can be set with the option WSMParameterValues:
Initial values are only guesses for solving the initial value equations:
The initial value of is not the one given in :
WSMSimulate does not know if a variable is a parameter:
No message is generated when setting a parameter with :
Use WSMParameterValues to set parameters:
Show height plots of balls dropped from different heights: