does anybody please explain how to use 'tomlab' in Simbiology?

5 views (last 30 days)
Hello, does anybody please explain how to use 'tomlab' in Simbiology? previously I used sundial, ode15s etc. Now I want to use tomlab instead of those.
Thanks in advance.
Emran

Accepted Answer

protein
protein on 20 Sep 2012
Hi Arthur,
Thanks a lot. I use the same outline as you have given. Now I only want to use the 'solvers of tomlab'.
In Simbiology normally I use:
configsetObj = getconfigset(model);
set(configsetObj, 'StopTime', 86400, 'SolverType', 'ode15s'); % for 'ode15s'solver
now is it possible to follow same procedure:??
set(configsetObj, 'StopTime', 86400, 'SolverType', *'SNOPT'*); % a TOMLAb solver
or, what will be the actual code for 'SNOPT' , 'NPSOL' etc.
Regards,
Emran

More Answers (1)

Arthur Goldsipe
Arthur Goldsipe on 20 Sep 2012
Hi Emran,
TOMLAB and SimBiology are two separate products and are not integrated. Furthermore, TOMLAB is used for optimizing some objective function, while the SimBiology solvers ode15s and sundials are used for solving ordinary differential equations. Therefore, it does not really make sense to replace sundials with TOMLAB.
Perhaps you mean that you want to use TOMLAB for optimization of a SimBiology model? For example, you might want to determine the set of model parameters that best fit some experimental data. You should be able to do this by writing your own objective function to pass to TOMLAB. Here's a brief outline of what that function might look like:
  • Accept parameter values as inputs
  • Apply these parameter values to your SimBiology model
  • Set the OutputTimes of the model's configset to the experimental times
  • Simulate your model
  • Calculate the sum of the squares of the errors (the difference between simulated and measured results)
  • Return this sum as the output of the function
-Arthur
  4 Comments
protein
protein on 21 Sep 2012
Hi Arthur,
Thanks again. I've understood that now. Just please tell me, I have to apply 'any' tomlab solver to the following code instead of 'ode15s' :
set(configsetObj, 'StopTime', 86400, 'SolverType', 'ode15s');
How can it be possible?
Regards,
Emran
Arthur Goldsipe
Arthur Goldsipe on 23 Sep 2012
Edited: Arthur Goldsipe on 24 Sep 2012
Hi Emran,
SimBiology currently only allows you to set the SolverType to one of the built-in solvers (as of R2012b, that includes 'ode15s', 'ode23t', 'ode45', 'sundials', 'ssa', 'expltau', and 'impltau'):
-Arthur

Sign in to comment.

Categories

Find more on Scan Parameter Ranges in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!