Simulate Model of Glucose-Insulin Response with Different Initial Conditions
This example shows how to simulate the glucose-insulin responses for the normal and diabetic subjects.
Load the model of glucose-insulin response. For details about the model, see the Background section in Simulate the Glucose-Insulin Response.
sbioloadproject('insulindemo', 'm1')
The model contains different initial conditions stored in various variants.
variants = getvariant(m1);
Get the initial conditions for the type 2 diabetic patient.
type2 = variants(1)
type2 = SimBiology Variant - Type 2 diabetic (inactive) ContentIndex: Type: Name: Property: Value: 1 parameter Plasma Volume ... Value 1.49 2 parameter k1 Value .042 3 parameter k2 Value .071 4 parameter Plasma Volume ... Value .04 5 parameter m1 Value .379 6 parameter m2 Value .673 7 parameter m4 Value .269 8 parameter m5 Value .0526 9 parameter m6 Value .8118 10 parameter Hepatic Extrac... Value .6 11 parameter kmax Value .0465 12 parameter kmin Value .0076 13 parameter kabs Value .023 14 parameter kgri Value .0465 15 parameter f Value .9 16 parameter a Value 6e-05 17 parameter b Value .68 18 parameter c Value .00023 19 parameter d Value .09 20 parameter kp1 Value 3.09 21 parameter kp2 Value .0007 22 parameter kp3 Value .005 23 parameter kp4 Value .0786 24 parameter ki Value .0066 25 parameter [Ins Ind Glu U... Value 1.0 26 parameter Vm0 Value 4.65 27 parameter Vmx Value .034 28 parameter Km Value 466.21 29 parameter p2U Value .084 30 parameter K Value .99 31 parameter alpha Value .013 32 parameter beta Value .05 33 parameter gamma Value .5 34 parameter ke1 Value .0007 35 parameter ke2 Value 269.0 36 parameter Basal Plasma G... Value 164.18 37 parameter Basal Plasma I... Value 54.81
Suppress an informational warning that is issued during simulations.
warnSettings = warning('off','SimBiology:DimAnalysisNotDone_MatlabFcn_Dimensionless');
Create SimFunction objects to simulate the glucose-insulin response for the normal and diabetic subjects.
Specify an empty array
{}
for the second input argument to denote that the model will be simulated using the base parameter values (that is, no parameter scanning will be performed).Specify the plasma glucose and insulin concentrations as responses (outputs of the function to be plotted).
Specify the species
Dose
as the dosed species. This species represents the initial concentration of glucose at the start of the simulation.
normSim = createSimFunction(m1,{},... {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose')
normSim = SimFunction Parameters: Name Value Type Units ____ _____ ____ _____ Observables: Name Type Units _____________________ ___________ _______________________ {'[Plasma Glu Conc]'} {'species'} {'milligram/deciliter'} {'[Plasma Ins Conc]'} {'species'} {'picomole/liter' } Dosed: TargetName TargetDimension __________ _____________________ {'Dose'} {'Mass (e.g., gram)'} TimeUnits: hour
For the diabetic patient, specify the initial conditions using the variant type2
.
diabSim = createSimFunction(m1,{},... {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose',type2)
diabSim = SimFunction Parameters: Name Value Type Units ____ _____ ____ _____ Observables: Name Type Units _____________________ ___________ _______________________ {'[Plasma Glu Conc]'} {'species'} {'milligram/deciliter'} {'[Plasma Ins Conc]'} {'species'} {'picomole/liter' } Dosed: TargetName TargetDimension __________ _____________________ {'Dose'} {'Mass (e.g., gram)'} TimeUnits: hour
Select a dose that represents a single meal of 78 grams of glucose at the start of the simulation.
singleMeal = sbioselect(m1,'Name','Single Meal');
Convert the dosing information to the table format.
mealTable = getTable(singleMeal);
Simulate the glucose-insulin response for a normal subject for 24 hours.
sbioplot(normSim([],24,mealTable));
Simulate the glucose-insulin response for a diabetic subject for 24 hours.
sbioplot(diabSim([],24,mealTable));
Perform a Scan Using Variants
Suppose you want to perform a parameter scan using an array of variants that contain different initial conditions for different insulin impairments. For example, the model m1
has variants that correspond to the low insulin sensitivity and high insulin sensitivity. You can simulate the model for both conditions via a single call to the SimFunction object.
Select the variants to scan.
varToScan = sbioselect(m1,'Name',... {'Low insulin sensitivity','High insulin sensitivity'});
Check which model parameters are being stored in each variant.
varToScan(1)
ans = SimBiology Variant - Low insulin sensitivity (inactive) ContentIndex: Type: Name: Property: Value: 1 parameter Vmx Value .0235 2 parameter kp3 Value .0045
varToScan(2)
ans = SimBiology Variant - High insulin sensitivity (inactive) ContentIndex: Type: Name: Property: Value: 1 parameter Vmx Value .094 2 parameter kp3 Value .018
Both variants store alternate values for Vmx
and kp3
parameters. You need to specify them as input parameters when you create a SimFunction object.
Create a SimFunction object to scan the variants.
variantScan = createSimFunction(m1,{'Vmx','kp3'},... {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose');
Simulate the model and plot the results. Run 1
include simulation results for the low insulin sensitivity and Run 2
for the high insulin sensitivity.
sbioplot(variantScan(varToScan,24,mealTable));
Low insulin sensitivity lead to increased and prolonged plasma glucose concentration.
Restore warning settings.
warning(warnSettings);