2
$\begingroup$

I have been using a command like the following to get models into Wolfram language:

model=SystemModel["EducationExamples.Physics.GyroscopicPrecession.HelicopterModel"]

But now I need models that don't come in the standard package but are available for free in an external library. Since I don't have SystemModeler installed on the machine I can't use its GUI interface to install the library. So what is the Wolfram language way to install this library.

model=SystemModel["BioChem.Examples.MichaelisMenten"]

I have downloaded the file:

BioChem_1.3.1_MULT.sma

So where do I put it so Wolfram language detects it?

$\endgroup$
4
  • $\begingroup$ As an exmaple, the model "IntroductoryExamples.MultiDomain.DCMotor" can be found under: "...Math12.1\SystemFiles\Components\WSMCore\L\IntroductoryExamples\MultiDomain" as file "DCMotor.mo". Therefore I guess that your model should go somewhere close. $\endgroup$ – Daniel Huber Oct 4 '20 at 13:59
  • $\begingroup$ @DanielHuber but the downloaded file is a library file with extension .sma not .mo so this might not work. $\endgroup$ – user13892 Oct 4 '20 at 16:37
  • $\begingroup$ Are you sure that this is a file for MMA? MMA help say<s that you need a file with extension ".mo". $\endgroup$ – Daniel Huber Oct 4 '20 at 20:37
  • $\begingroup$ .sma is a file format created by WRI in order to have a "flat" model file that includes all model dependencies (→Documentation). Import of such a file will give a SystemModel. $\endgroup$ – gwr Mar 22 at 11:54
1
$\begingroup$

System modeler libararies are aparently imported like follows:

Import[FileNameJoin[{...path to file...,"BioChem_1.3.1_MULT.sma"}],"SMA"];

Now this works:

model=SystemModel["BioChem.Examples.MichaelisMenten"]

If there is a better and more official way to import the system modeler libraries in WL, feel free to edit.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.