Simulate different dosing amounts with a schedule dose

조회 수: 7 (최근 30일)
Zinnia Parra-Guillen
Zinnia Parra-Guillen 2021년 10월 26일
댓글: Zinnia Parra-Guillen 2021년 10월 29일
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.
Thanks,

채택된 답변

Florian Augustin
Florian Augustin 2021년 10월 28일
Hello,
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);
end
% 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
sbioplot(simData);
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.
-Florian
  댓글 수: 3
Florian Augustin
Florian Augustin 2021년 10월 28일
편집: Florian Augustin 2021년 10월 28일
Hi Zinnia,
You are right, that will work. It sounds like you may even only need two repeat doses. One for the initial treatment (days 1, 3, 5) and one for the continued treatment (days 8, 29, 50, ...). Here is an example for how you could implement this on the command line:
% Load example model
modelObj = sbmlimport("radiodecay.xml");
% Define dose amounts to scan over
doseAmountValues = [50, 100, 200];
% Add dose parameter to the model
addparameter(modelObj, "doseAmount");
% Create repeat doses
initialTreatment = sbiodose("dose days 1, 2, 3", "repeat");
initialTreatment.TargetName = "x";
initialTreatment.Amount = "doseAmount"; % parameterized amount to scan over
initialTreatment.StartTime = 1; % first dose on day one
initialTreatment.RepeatCount = 2; % repeat application of this dose twice
initialTreatment.Interval = 2; % 2 day interval
continuedTreatment = sbiodose("dose every 21 days", "repeat");
continuedTreatment.TargetName = "x";
continuedTreatment.Amount = "doseAmount"; % parameterized amount to scan over
continuedTreatment.StartTime = 8; % first dose on day eight
continuedTreatment.RepeatCount = 10; % repeat application of this dose ten times
continuedTreatment.Interval = 21; % repeat dose every 21 days
% Create scenarios to scan over the doses;
% this creates scan scenarios for you where the two doses are applied for every
% value (in doseAmountValues) you want to scan over.
% Create scenarios to scan over the doses
doseScenarios = SimBiology.Scenarios("initial treatment", initialTreatment);
add(doseScenarios, "elementwise", "continued treatment", continuedTreatment);
scanScenarios = SimBiology.Scenarios("doseAmount", doseAmountValues);
combinedScenarios = add(doseScenarios, "cartesian", scanScenarios);
% Inspect scenarios:
generate(combinedScenarios)
% Create a simulation function for the model
simFun = createSimFunction(modelObj, combinedScenarios, "x", [], "AutoAccelerate", false);
% Simulate the model for every dosing scenario
simData = simFun(scenarios, 100);
% Plot the results
sbioplot(simData);
With the two repeat doses, you can also use the "Run Scan" program in the SimBiology Model Analyzer app to do the parameter scan over the dose amounts.
I hope this helps.
Best,
-Florian
Zinnia Parra-Guillen
Zinnia Parra-Guillen 2021년 10월 29일
Helps a lot! Thank you so much :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulate Responses to Biological Variability and Doses에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by