({{, (RefLink[SetSystemModel, paclet:ref/SetSystemModel])[model,spec] 
changes model parameters, initializations or other properties in place.}})

OpenersNotesSection(Spacer1)Details

The model can be a (RefLink[SystemModel, paclet:ref/SystemModel]) object, a full model name string or a shortened model name accepted by (RefLink[SystemModel, paclet:ref/SystemModel]).

(RefLink[SetSystemModel, paclet:ref/SetSystemModel])[model,spec] takes the same arguments as (RefLink[SystemModel, paclet:ref/SystemModel])[model,spec] but modifies model in place.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Set the value of a parameter a in a model:

model=CreateSystemModel[(StateSpaceModel[a, 0, 1, 0, 0, b, 0, 1, 1, 1, 0, 0, ])];

SetSystemModel[model,<|"ParameterValues"->{"a"->10}|>];

The parameter value has changed in the model:

model[{"ParameterValues","a"}]

Rename a model by giving it a name:

model=CreateSystemModel[(StateSpaceModel[a, 0, 1, 0, 0, b, 0, 1, 1, 1, 0, 0, ])];

SetSystemModel[model,<|"ModelName"->"MyStateSpaceModel"|>];

The model now has the new name:

model["ModelName"]

OpenersExampleSection1(Spacer1)Properties & Relations  (1)

(RefLink[SystemModel, paclet:ref/SystemModel]) generates a new model with applied changes:

model=;

model["ParameterValues"]

model2=SystemModel[model,{"a"->10}];

{model["ParameterValues"],model2["ParameterValues"]}

(RefLink[SetSystemModel, paclet:ref/SetSystemModel]) makes changes in place:

SetSystemModel[model2,{"a"->14}];

model2["ParameterValues"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[SystemModel, paclet:ref/SystemModel])  ▪  (RefLink[SystemModelExamples, paclet:ref/SystemModelExamples])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[System Model Creation, paclet:guide/SystemModelCreation])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(Spacer1)▪(WebLink[(Spacer1)Wolfram SystemModeler Documentation, http://reference.wolfram.com/system-modeler/])}})}})