Andrew Heitman in MATLAB Answers
最後のアクティビティ: 2025 年 1 月 8 日

What is the BEST way to get the simulation data out of simbiology and into excel or some other program? I have found a brief explanation on how to export to Matlab area and then convert to XLS but its not working terrible well
grace in MATLAB Answers
最後のアクティビティ: 2024 年 8 月 14 日

Hello! I am trying to use this model "Estimating the Bioavailibility of a Drug" that I found here, to do a simultaneous fitting of my IV infusion and P.O. blood concentration time profile. I implemented a two compartment model as well. For some reason, when I am running a simulation the oral dose exhibits a bioavailbility of >= 1, even though I have the parameter F set as 0.2. I attached images of my simulation curve (green is oral dose), model diagram, ODEs, and dosing setup. I'm thinking it might have something to do with the way I set up the dosing, but please let me know if you have any advice on how I should troubleshoot this. I am using R2024a. Please let me know if I should include anything else. Thanks!
grace in MATLAB Answers
最後のアクティビティ: 2024 年 7 月 29 日

Hi! So I saved a run when I was doing fitting for my data, and put the results in a folder on the Simbiology model analzyer dashboard. I wanted to replicate that saved data but I can't seem to find where the initial parameters for that run are stored? If anyone could help or if there's any way I can further clarify please let me know!
Bhargavi Srija Ramisetty in MATLAB Answers
最後のアクティビティ: 2024 年 4 月 11 日

Hi, I built a PBPK model and fitted a few parameters to the model by using observed data. Next I created a variant of the fitted parameters and simulated the model with the variant values. Based on my previous experience, I expect to see same predcition profile as then fitted plot when using the same model, but the predcitions from "Simulate Model" program are different. On the other hand when I add sensitivity calculation in the "Simulate model" program, then the predicted curve obtained matches with the fitted curve. I am not sure of this behavior of the model in Simbiology. May I get some help on figuring out this issue? Thank you in advance
MathWorks Support Team in MATLAB Answers
最後のアクティビティ: 2024 年 3 月 31 日

I have a big and complicated model in SimBiology and when am running a simulation, it freezes. I have ran simple examples from the documentation and they run just fine. Why are my SimBiology simulations freezing in bigger and complex models? Can it be a mathematical instability in my model? kA00Z000001Dg8qSAC 000114207
Elisa in MATLAB Answers
最後のアクティビティ: 2024 年 1 月 25 日

I am having troubles installing libSBML, which I need to use GenSSI for parameter identifiability in Simbiology. I am following the instructions in this documentation, but I cannot use SBML in either case: when I add 'manually' the folder to the path and try to run the command `TranslateSBML('test.xml')`, the following error pops up: Execution of script TranslateSBML as a function is not supported: C:\Users\elisa\libsbml\src\bindings\matlab\TranslateSBML.m And if I try to run installSBML.m, the following error occurs: Error using installSBML Executables were not found.Please make sure they are in the same directory as the installSBML and other scripts. I opened an issue on github, but haven't received an answer yet.
Jesse Chao in MATLAB Answers
最後のアクティビティ: 2023 年 7 月 15 日

Hello team and community, I am currently working on a pharmacokinetic project that involves using a transit compartment model (DOI: 10.1007/s10928-007-9066-0) to describe drug absorption. I have constructed the model using the Simbiology app and have written a script for a specific function usede in the model (attached in the files). For the solver type, I have selected Sundials. However, I have encountered some strange results when carrying out simulations using the in-app model simulation functionality. I noticed that when I set the stop time from 1 to 7 hours, the simulation results appear to be fine. However, when I set the stop time to 8 hours or above, the simulation results show some unexpected behavior that I cannot comprehend. [stop time = 7 hour] [stop time = 8 hour] [stop time = 48 hour] I would greatly appreciate it if you could provide me with some insights into this problem. Thank you very much. Jesse
Puru Raj in MATLAB Answers
最後のアクティビティ: 2023 年 5 月 1 日

I want to define that a specie A is being produced given by 2 degree quardratic equation as a function of time. How to define it ?
voZnW in MATLAB Answers
最後のアクティビティ: 2022 年 10 月 11 日

Hi I used my model to do the simulation, why the curve was not a smooth curve? It shows a jagged shape near Cmax. Please see the model structure and parameters:
voZnW in MATLAB Answers
最後のアクティビティ: 2022 年 10 月 6 日

Hi, I do the simulate with my model, and compared the simulated value with observed data, and I want to adjuste the initial values of the parameters according to the comparison results. But when I compared the simulated value with observed data, I find in the Property Editor, when I select "Time" STYLE, the simulated value was very close to the observed data (figure in the left); when I selece "Percentile" STYLE, imulated value was very different with the observed data (figure in the reight). So I don't know why this is happening? This disturbs me, because when I used the model with the intial values used in the simulation step to fit my observed data, there is an error say "Optimization cannot proceed because the initial value of the negative log-likelihood is NaN. ..." In "Time" STYLE, the initial parameter looks like well, in "Percentile" STYLE, the initial parameter looks bad. How can I adjust the parameters?
Torkel Loman in MATLAB Answers
最後のアクティビティ: 2022 年 8 月 4 日

I have an .sbml model I want to simulate using ssa. It works for small timespans, and when using ode simulations. However, in this example matlab simply crashes. Why is this? is there a way of preventing this? % Load model. model_egfr_net = sbmlimport('egfr_net.xml'); % Prepare model for SSA simulations. clean_ssa_sbml_model(model_egfr_net) cs = getconfigset(model_egfr_net); cs.SolverType = 'ssa'; cs.StopTime = 100.0; % Simulate model. [t, x, names] = sbiosimulate(model_egfr_net); I have attached the model. Also, per https://uk.mathworks.com/matlabcentral/answers/1582584-simbio-running-stochastic-ssa-simulation-of-sbml-imported-model the model has to be modified to enable ssa simulations. The attached function (used in the script) is provided here: function [] = clean_ssa_sbml_model(model) parameters = sbioselect(model, 'Type', 'parameter'); for paramIndex = 1:numel(parameters) parameter = parameters(paramIndex); [~, usageTable] = findUsages(parameter); % Update any reaction that uses this parameter in its rate. if isempty(usageTable) % if check added by Torkel. continue end reactions = usageTable.Component(usageTable.Property == "ReactionRate"); for reactionIndex = 1:numel(reactions) reaction = reactions(reactionIndex); oldRate = reaction.ReactionRate; kineticLaw = reaction.KineticLaw; if isempty(kineticLaw) % Add a kinetic law kineticLaw = addkineticlaw(reaction, 'MassAction'); else % Update the existing kinetic law to mass action kineticLaw.KineticLawName = 'MassAction'; end kineticLaw.ParameterVariableNames = parameter.Name; newRate = reaction.ReactionRate; if ~strcmp(oldRate, newRate) warning("Reaction rate for reaction %s changed from %s to %s.", ... reaction.Name, oldRate, newRate); end end end end
Torkel Loman in MATLAB Answers
最後のアクティビティ: 2022 年 4 月 6 日

I have a .sbml model stored in an .xml file. It contains a couple of observables. When I plto the simulation results, these are uniformly set to "1" when I use the ssa simulation, however, observables seems to work fine with ode simulations. This is the code: % Fetch model. model = sbmlimport('multistate.xml'); % Run simulation. cs = getconfigset(model); cs.SolverType = 'sundials'; cs.StopTime = 10.0; [t_ode, x_ode, names] = sbiosimulate(model); % Plot observables. plot(t_ode, x_ode(:,end-3:end)) xlabel('Time') ylabel('States') legend(names(end-3:end)) % Prepare model for SSA simulations (see https://uk.mathworks.com/matlabcentral/answers/1582584-simbio-running-stochastic-ssa-simulation-of-sbml-imported-model). parameters = sbioselect(model, 'Type', 'parameter'); for paramIndex = 1:numel(parameters) parameter = parameters(paramIndex); [~, usageTable] = findUsages(parameter); % Update any reaction that uses this parameter in its rate. if isempty(usageTable) % if check added by Torkel. continue end reactions = usageTable.Component(usageTable.Property == "ReactionRate"); for reactionIndex = 1:numel(reactions) reaction = reactions(reactionIndex); oldRate = reaction.ReactionRate; kineticLaw = reaction.KineticLaw; if isempty(kineticLaw) % Add a kinetic law kineticLaw = addkineticlaw(reaction, 'MassAction'); else % Update the existing kinetic law to mass action kineticLaw.KineticLawName = 'MassAction'; end kineticLaw.ParameterVariableNames = parameter.Name; newRate = reaction.ReactionRate; if ~strcmp(oldRate, newRate) warning("Reaction rate for reaction %s changed from %s to %s.", ... reaction.Name, oldRate, newRate); end end end % Run simulation. cs = getconfigset(model); cs.SolverType = 'ssa'; cs.StopTime = 10.0; [t_ssa, x_ssa, names] = sbiosimulate(model); % Plot observables. plot(t_ssa, x_ssa(:,end-3:end)) xlabel('Time') ylabel('States') legend(names(end-3:end)) % Non-observables plot still work. plot(t_ssa, x_ssa(:,1:end-4)) xlabel('Time') ylabel('States') legend(names(1:end-4)) % Observable plotting still work for the modified model when using ode. cs = getconfigset(model); cs.SolverType = 'sundials'; cs.StopTime = 10.0; [t_ode_2, x_ode_2, names] = sbiosimulate(model); plot(t_ode_2, x_ode_2(:,end-3:end)) xlabel('Time') ylabel('States') legend(names(end-3:end)) Which produces these plots: The observables can be plotted when the mode is simulated via ode: The observables are all "1" when simualted via ssa: The other species can be plotted without problem though: Finnaly, plotting the observables when the system has been simualted via ode still work, even after the model have been modified. There is something wrong where the observables values are not set when the ssa algorithm is used. Finally, I have attached the model file (extension changed to .txt so that mathworks website would accept it).
Torkel Loman in MATLAB Answers
最後のアクティビティ: 2022 年 2 月 26 日

Hello, I have a biochemical reaction network model defined in the SBML format (attached). I can load the model using the sbmlimport: sbml_mod = sbmlimport('multistate.xml'); I can perform ODE simulations of this model using sbiosimulate: [time,x,names] = sbiosimulate(sbml_mod); However, if I want to perform stochastic SSA (GIllespie) simulations (https://uk.mathworks.com/help/simbio/ug/stochastic-solvers.html), I get problems. Running cs = getconfigset(sbml_mod,'active'); cs.SolverType = 'ssa'; cs.StopTime = 30; [t_ssa, x_ssa] = sbiosimulate(sbml_mod); I get errors: --> Error reported from Stochastic Compilation: Reaction named 'Reaction_2' has an empty kinetic law. For stochastic simulation all kinetic laws must be MassAction. (one for each of my 18 reactions) It turns out that when loading SBML models each reactions get no KineticLaw, which is needed for SSA simulations. E.g. sbml_mod.Reactions(1).KineticLaw simply returns []. However, all reactions in the SBML file are simple MassAction reactions, e.g. sbml_mod.Reactions(1).ReactionRate is 'kon*[R(a,l)]*[L(r)]'. I tried simply looping through all reactions and setting their KineticLaw field to 'MassAction'. But this still yields errors like --> Error reported from KineticLaw Validation: Parameter variable name on kinetic law '' is empty. The number of parameters on the kinetic law must match the number in its definition, and all parameter names must be set. So I somehow need to ftech the right parameters and att that to the MassAction kinetic law. It seems like this should be fairly straightforward (e.g. many other packages, like Copasi can do SSA simulations directly from SBML files). Is there some automatic way of setting all reactions to MassAction kinetic law, or some other way which would enable me to do an SSA simulation of the model?
Victoria Miller in MATLAB Answers
最後のアクティビティ: 2021 年 4 月 6 日

I'm trying to run a simulation of a repressilator in E. coli and get the error message above. How would you recommend I fix this issue? I have already tried messing with the simulation settings, but no luck. Thanks so much.
Daniel Bending in MATLAB Answers
最後のアクティビティ: 2020 年 6 月 5 日

Hello all, I've been using simbiology as part of an effort to run sensitivity analysis on a PDPK model as part of my masters. It's industry sponsored so the image below has the important information blurred but enough to give context. The black lines are simple mass kinetics, easily done in Simbiology. The green lines, howeever, are stimulations, i.e. there's no actual transfer of material, just its pressence causes an effect. I had thought these would be quite easily by creating a reaction from 'null -> x' and but I'm unsure on how to create that custom dependency, i.e. a null -> x where the equation is kyx*[y] -> x. It was easy to do on the GUI, however, the GUI dosn't quite have the freedom I need for sentitivity analysis. I was struggling to get a global sensitivity analysis going, basically. If anyone has any suggestions about either of these topics, that would be greatly appreciated. Many thanks, Dan
Hassan Hijazi in MATLAB Answers
最後のアクティビティ: 2020 年 5 月 22 日

When you are simulating, you have the option to vary the quantity of either species or of the rate that you already set by dragging it from the Browser section to the Explorer section. The slider automatically appears, you can edit the max and min of the scale but not its units. I want it to increase by a whole numbers and exclude decimals i.e only integers.
Eleonora Ficiarà in MATLAB Answers
最後のアクティビティ: 2020 年 3 月 6 日

I am trying to add a fixed term for a species in the diagram view, in order to have the term E (system of ODEs in attached image). Is it possible?
Frank Sommerhage in MATLAB Answers
最後のアクティビティ: 2019 年 4 月 11 日

Hi all, I would like to see the calculated rates between species for each time step. Simbiology doesn't seem to have a function/option to do that (Please correct me if I'm wrong!). How can I get to my rates anyway? Thanks, Frank
Jeremy Huard in Discussions
最後のアクティビティ: 2019 年 3 月 22 日

*What is it?* |SimFunction| allows you to _perform multiple simulations in a single line of code_ by providing an interface to execute SimBiology® models like a regular MATLAB function. Consider the following similarity: If you want to calculate the value of the sine function at multiple times defined in the variable t, you use the following syntax: >> y = sin(t) If mymodel represents a |SimFunction|, you can simulate your model with multiple parameter sets using the following syntax: >> simulationData = mymodel(parameterValues, stopTime, dose) <.> *What is it good for?* _Multiple simulations_ Because it allows you to perform multiple simulations in a single line of code by providing a matrix of parameter values or variants or a cell array of dosing tables, it is particularly suited for * parameter and dose scans * Monte Carlo simulations * customized analyses that require multiple model simulations such as a customized optimization _Performance_ SimFunctions are optimized for performance as they are automatically <https://www.mathworks.com/help/simbio/ug/accelerating-model-simulations-and-analyses.html accelerated> at the first function execution, which converts the model into compiled C code. Those simulations can be distributed to multiple cores or to a cluster and run in parallel if Parallel Computing Toolbox™ is available thanks to its <https://www.mathworks.com/help/simbio/ref/createsimfunction.html#namevaluepairarguments built-in parallelization> or within a <https://www.mathworks.com/help/distcomp/parfor.html parfor> loop. _Simulation deployment_ Since SimFunction objects cannot be changed once created, they can be shared with others without the risk of altering the model inadvertently. Also, you can use SimFunctions to integrate a SimBiology model into a customized MATLAB App and <https://es.mathworks.com/matlabcentral/answers/244644-how-can-i-use-matlab-compiler-to-make-a-stand-alone-script-including-simfunction-objects compile it as standalone application> to share with anyone without the need of a MATLAB license. <.> *How does it work?* Create a <https://www.mathworks.com/help/simbio/ref/simfunctionobject.html SimFunction object> using the <https://www.mathworks.com/help/simbio/ref/createsimfunction.html createSimFunction> method by choosing: # which parameters it should take as inputs # which targets will be dosed # which model quantities it should return # which sensitivities it should return if any <</matlabcentral/discussions/uploaded_files/60/simFunction.gif>> Have a look at the following example from the SimBiology documentation for an executable script to help you get started: <https://www.mathworks.com/help/simbio/ug/perform-a-parameter-scan.html Perform a Parameter Scan>. Tips and Tricks: Use SimFunction for easy and fast model simulations in scripts simbiology simfunction simulation
Brett Fleisher in MATLAB Answers
最後のアクティビティ: 2018 年 11 月 3 日

Hello Matlab Community, I have a question on how to overlay observed data with the model simulation that I've created. Any help on what part of the interface to do this, where in the instruction manual, or that code would be greatly appreciated. Thanks in advance for the help
Wendy Qiao in MATLAB Answers
最後のアクティビティ: 2018 年 8 月 21 日

Hi, I kept getting the following warning message in SimBiology Desktop when I perform a simulation task, "No outputs have been specified for sensitivity analysis. The RuntimeOption.StateToLog in the active configset will be used as default outputs. This default behavior will be deprecated in a future release of SimBiology". Is the warning message something that I should be worried about? How to I configure the model in SimBiology Desktop to avoid the warning message? Thank you, W
Anna Zelená in MATLAB Answers
最後のアクティビティ: 2017 年 5 月 17 日

I have been working on my model in SimBiology while the software suddenly crashed during simulation after I tried different ODE solver. Since that time, it always crashes when I try to run any simulation. I can launch SimBiology desktop, but I cannot start any task in any model. No error message appears, it simply freezes. I use MATLAB Version: 9.0.0.341360 (R2016a) and SimBiology Version 5.4 (R2016a) on Mac OS X 10.11.6.
Max Wilson in MATLAB Answers
最後のアクティビティ: 2016 年 1 月 6 日

Hi, In the Simbiology toolbox I want to know how to update the value of a variable arbitrarily on every time step of a simulation. For example, I would like to simulate the effects of having one of my model components changing as a completely random function of time. For example, every time the solver updates I would like to have a new arbitrary value for one of my model's components- be it a random function of time or sinusoidal function or some other function I define. Thanks!
Meric Ovacik in MATLAB Answers
最後のアクティビティ: 2013 年 10 月 11 日

I used fit data task and then tried to simulate the estimated parameters with simulate data task. The outputs are different. I played with different simulation setting options and found out that OutputTimes option changes my output (significantly). I also created a separate ode function file and simulate the same model; output of this file matched fit data task's output. Long story short, I cannot duplicate the results from fit data task with simulate data task in Simbiology. Any suggestion would be appreciated.
Camila Almeida in MATLAB Answers
最後のアクティビティ: 2013 年 6 月 21 日

Hi, it is a simple question. I looking at simulating a 1 comp PK model for two groups. These two groups have different dose levels, and we have multiple doses (not just a single dose) for these groups. How can I simulate that? I can't find anywhere where I can add the information about group so that I can define different dose schedules for different groups. I'm using matlab 2012b. Thanks