Automatic generation of SimBiology code from GUI

조회 수: 1 (최근 30일)
Abed Alnaif
Abed Alnaif 2022년 6월 24일
답변: Arthur Goldsipe 2022년 6월 27일
Hello,
I have a structural model in the SimBiology GUI for which I'd like to use as a template to automate model development. I plan to do this by writing code that will build the model automatically, using functions such as addparameter, addreaction, etc. To help me do this, I was wondering whether there's a way to automatically generate this code, given that I already have a template model in the GUI?
Thank you,
Abed
  댓글 수: 2
Sietse Braakman
Sietse Braakman 2022년 6월 24일
Hi Abed,
Some of this functionality was added to 2022a, see the release notes. The model builder app is now able to generate code. However, this does require you to build the model from scratch while capturing the code.
Alternatively, you could write code that traverses your model object (i.e. go through every compartment, look at its children species/compartments etc, add all reactions and parameters) and creates each of those objects as code.
Best,
Sietse
Abed Alnaif
Abed Alnaif 2022년 6월 24일
Thank you Sietse! This is good to know. I didn't know about this new feature. But, unfortunately, it won't work for me since the model is already built.

댓글을 달려면 로그인하십시오.

채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2022년 6월 27일
There is not currently any shipping functionality to do this. However, this is something we've been thinking about for a future release. I even have a working prototype that I'm trying to get feedback on. I'll reach out via email to see if that could help you.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Perform Sensitivity Analysis에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by