SystemModeler Link >

WSMParameterValues


is an option for WSMSimulate and WSMSimulateSensitivity that specifies values for parameters.
  • Setting sets parameters to in the simulation.
  • Using does not recompile the model.
  • Setting runs simulations in parallel, with taking values .
Load Wolfram SystemModeler Link:
Simulate with default parameters:
Change the offset to :
Simulate with a range of parameters:
Vary the part of the momentum that is transferred to the next ball in the cradle:
The angles of the first and last ball in the cradle for different parameters:
Load Wolfram SystemModeler Link:
In[1]:=
Click for copyable input
 
Simulate with default parameters:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Change the offset to :
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
 
Simulate with a range of parameters:
In[1]:=
Click for copyable input
Vary the part of the momentum that is transferred to the next ball in the cradle:
In[2]:=
Click for copyable input
The angles of the first and last ball in the cradle for different parameters:
In[3]:=
Click for copyable input
Out[3]=
is used to set values for parameters in simulation:
can be used together with WSMInitialValues:
If a list is given for , multiple simulations are run in parallel:
Sweeps with multiple parameters 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:
Parameters can also be given on the form returned from WSMModelData:
Study a pendulum model:
A real pendulum with length 10 and starting angle is measured to follow this function:
Simulate for a range of different gravitational constants:
Save the angles of the pendulum in the simulations:
Define a difference function:
The constant 9.82 is closest, so reiterate around that point:
A gravitational constant of 9.82 is closest to the measured one:
Initial values for variables can be set with the WSMInitialValues option: