Romain,
Yes. What you do is you create the block you need (maybe by using the assert() keyword in Modelica), and then use that block in this type of construct:
Needs["WSMLink`"]
WSMConnectComponents["newmodel",{"c1"\[Element]"RealExpression","c2"\[Element]"RealOutput"},{"c1.y"->"c2"}];
WSMSetValues["newmodel",{"c1.y"->RandomReal[]}]
Now you can change the input to be different random real for each model. You can use WSMConnectComponents with any components, here I'm using the Modelica.Blocks.Sources.RealExpression
and Modelica.Blocks.Interfaces.RealOutput
, but can be anything you like. You can use all the Wolfram Language symbols to generate a large set of these models, just wrap the two commands here with Table
, For
or any such construct.