WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMSetValues

WSMSetValues["mmodel",{p1->c1,}]
sets pi to ci in the Modelica model "mmodel".

WSMSetValues["mmodel",{p1->c1,},"InitialValues"]
sets the initial values for pi to ci in the Modelica model "mmodel".

DetailsDetails

  • WSMSetValues sets values for the Wolfram SystemModeler kernel.
  • WSMSetValues allows you to set parameter values and input variables.
  • Current parameter values can be found using WSMModelData["mmodel","ParameterValues"].
  • With WSMSetValues["mmodel",{},"InitialValues"], initial values can be set for all variables and parameters.
  • Current initial values can be found using WSMModelData["mmodel","InitialValues"].
  • The shortest unique model name mmodel can be used where WSMNames["*.mmodel"] gives a unique match.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Make a copy, and change the value for the parameter a from 3 to 10:

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

Set the start value of the variable x to 3:

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

Use the diagram representation of a model as input:

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

Copy and paste the output above:

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