MATLAB: App to convert Simbiology models to .sbproj files

MATLAB CompilerSimBiology

Hi, I frequently need to convert Simbiology models to .sbproj files using simple script with 'sbiosaveproject' function. I am inerested to build .exe out of this script using Matlab Compiler. However I am not sure if sbiosaveproject is supported by the Compiler. https://www.mathworks.com/products/compiler/supported/compiler_support.html Is there a way to do it?

Best Answer

Hi Ivan,
The key questions are (1) why do you want to create an EXE app, and (2) what do you really need to accomplish with the app?
If your goal is to create .sbproj files without a full license and installation of MATLAB and SimBiology, that is not currently possible due to licensing restrictions. The compiler support page lists the restrictions on apps created with MATLAB Compiler. For SimBiology apps, we do not support .sbproj files or the models stored in such files. Instead, you must use SimBiology.export.Model objects or SimFunction objects, which must be saved in .mat files. Both of these provide the ability to simulate a model. However, you cannot build new models or change the structure of such models. (What I mean by that is you can't add or remove things like species or reactions in an app.)
If your goal is to use SimBiology functionality in an environment that does not require a license of MATLAB or SimBiology, you must write an app that uses SimBiology.export.Model objects or SimFunction objects. Here's an example .
If you goal is to automate the creation of sbproj files, you have several options for doing that, but all the options would require full license and installation of both MATLAB and SimBiology. Then, you could create an app using the App Designer. You could also create an .exe that communicates with the installation of MATLAB to run your script that create .sbproj files. You can see a list of APIs for various languages in the documentation for MATLAB Engine Applications.
Does that clear things up?