フィルターのクリア

ODE Events In SimBiology toolbox

2 ビュー (過去 30 日間)
Alexander
Alexander 2019 年 4 月 1 日
コメント済み: Alexander 2019 年 4 月 1 日
I would like to define a custom ode stopping event for the solver of a SimBiology model. How to achieve that?
Say, I want to write some event function, like described in
and set isterminal conditioned at specific values of my concentrations, the model of which is defined by the SimBiology toolbox.
Where is the option located (or, how to export the code in the needed granularity) where I can provide my event function?
  2 件のコメント
zmi zmi
zmi zmi 2019 年 4 月 1 日
You might be interested in "addevent" method of the model object and "trigger" property of the event object in SimBiology.
Alexander
Alexander 2019 年 4 月 1 日
I'm aware of addevent. But it seems, that there is no opportunity to stop simulation by this event handler. At least, I didn't find any documentation about something analogous to the "isterminal" setting.

サインインしてコメントする。

採用された回答

Arthur Goldsipe
Arthur Goldsipe 2019 年 4 月 1 日
Currently (as of R2019a), SimBiology events cannot directly stop a simulation. I usually handle this sort of situation by post-processing simulation results that continue past the event of interest.
That said, there are 3 stop criteria: simulation stop time, maximum number of logs, and maximum (wall clock) simulation time. If you don't care about how long a simulation takes, you could use an event indirectly end the simulation by triggering the wall clock condition. For example, if you set the maximum wall clock time to 30 seconds and create an event that pauses for 30 seconds, then the simulation should stop after the event is triggered.
You also asked about export options. SimBiology supports export to SBML. You could also use the output from getequations as a starting point for converting your model to MATLAB code that can be used with ode15s or one of the other solvers in MATLAB.
  1 件のコメント
Alexander
Alexander 2019 年 4 月 1 日
yeah... somewhat unfortunate...
I'm going to use getequations for now, exporting the underlying differential equations. Luckily, the model is reproducible by them.
Thanks for the information!

サインインしてコメントする。

その他の回答 (0 件)

コミュニティ

その他の回答  SimBiology コミュニティ

カテゴリ

Help Center および File ExchangeExtend Modeling Environment についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by