Simulate different dosing amounts with a schedule dose

12 views (last 30 days)
Does anybody know if there is a way to perform a parameter scan of a dose amount if the dose object is a schedule dose? Or do I need to create one dose object manually for each dose level that I want to simulate.

Accepted Answer

Florian Augustin
Florian Augustin on 28 Oct 2021
parameterized schedule doses are currently not supported (Matlab release R2021b), only repeat doses can be parameterized. As you already mentioned, in order to scan over schedule doses you have to create separate dose objects. Here is an example how you could do it on the MATLAB command line:
% Load example model
modelObj = sbmlimport("radiodecay.xml");
% Define dose amounts to scan over
doseAmountValues = [50, 100, 200];
numAmountValues = numel(doseAmountValues);
% Schedule times
scheduleTimes = [1, 2, 3, 4];
% Create schedule doses
for idx = 1:numAmountValues
scheduleDoses(idx) = sbiodose("dose amount " + doseAmountValues(idx), "schedule"); %#ok<*SAGROW>
scheduleDoses(idx).TargetName = "x";
scheduleDoses(idx).Time = scheduleTimes;
% Here the same dose amount is applied at every scheduled time,
% but the actual dose schedule and parameterization may be more complex.
scheduleDoses(idx).Amount = [1, 1, 1, 1] * doseAmountValues(idx);
% Create scenarios to scan over the doses
scenarios = SimBiology.Scenarios("doses to scan over", scheduleDoses);
% Create a simulation function for the model
simFun = createSimFunction(modelObj, scenarios, "x", [], "AutoAccelerate", false);
% Simulate the model for every dosing scenario
simData = simFun(scenarios, 10);
% Plot the results
Here is a list of references to the documentation that may be helpful
If your schedule doses are regular enough, you could use repeat doses instead; but I assume this is not the case in your application? If this was the case, you could just create one repeat dose, parameterize the Amount property, and then scan over the parameter used for the parameterization of the amount. For repeat doses, you could also use a "Run Scan" program in the SimBiology Model Analyzer app to perform the parameter scan over different dose amounts.

Sign in to comment.

More Answers (0)


Find more on Simulate Responses to Biological Variability and Doses in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by