Simulating a Model in SimBiology | SimBiology Tutorials for QSP, PBPK, and PK/PD Modeling and Analysis - MATLAB
Video Player is loading.
Current Time 0:00
Duration 7:17
Loaded: 2.27%
Stream Type LIVE
Remaining Time 7:17
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 7:17

    Simulating a Model in SimBiology | SimBiology Tutorials for QSP, PBPK, and PK/PD Modeling and Analysis

    From the series: SimBiology Tutorials for QSP, PBPK, and PK/PD Modeling and Analysis

    This video demonstrates how to simulate a model in SimBiology in the SimBiology Model Analyzer app. The video introduces the steps in analysis programs, the use of doses and variants, ODE solver and simulation settings, creating sliders to explore parameter values, and calculating statistics (e.g., AUC, Cmax). Lastly, the video shows how to run simulations programmatically from MATLAB® rather than through the Model Analyzer app.

    Published: 13 Nov 2019

    In this video, we will be simulating the target-mediated drug disposition model that you are familiar with from the model building video. We will be using the SimBiology model analyzer app that you can find in the Apps tab. First, we need to open the SimBiology project that contains the target-mediated drug disposition model. On the left-hand side, you see the browser, which shows the contents of the SimBiology project, including models, observational data, and simulation programs. It also contains a documents section that lists each of the programs, as well as plots that you might have set up for those programs and any data sheets. Data sheets are a way to inspect and post-process observational or simulation data.

    Now we will create a new program to simulate the TMDD model. Programs are a central concept in the SimBiology model analyzer app, because they can contain multiple steps, where the output of one step is used as input for the subsequent step. An example would be that you run your model to steady state first and then start your simulation from that steady state. Once you have multiple steps, at the top of the program, you can see how each step feeds into the other. And you can add or remove steps by clicking on the plus sign and selecting or deselecting a step.

    When we simulate the model, we can choose to apply variance or doses to the model when it is being simulated. You can add variance in this section and apply them by making sure the tick box is selected. You can add them by either pressing the down arrow or just by starting typing. For the doses, we will just apply a single dose.

    Each SimBiology project has its own simulation as settings associated with it. In the Simulation Settings pane, you can select which solver you would like to use. You can specify output times or a stop time for your simulation. And you can set the tolerances for your solver.

    In addition, there is dimensional analysis. And dimensional analysis makes sure that all the dimensions in your model are consistent. For example, to make sure that reaction rate are defined in units of 1 over time.

    Then there is unit conversion. And unit conversion takes the idea of dimensional analysis one step further and will convert units to a unified system in order to avoid making order of magnitude mistakes. An example here would be that you might have defined some reaction rates in 1 over hour and some in 1 over minute. Unit conversion will convert the units to a consistent unit system to avoid making order of magnitude mistakes.

    In this case, the only change we will make is to reduce the stop time to 48 hours. The simulation settings are automatically saved when you close the pane. Now we are ready to simulate the model. And you can do this by pressing the Run button.

    The simulation automatically generates a plot that shows the time course for the species and non-constant parameters in your model, such as the target occupancy, T0 in this case. To the right of the plot, you have the Property Editor that allows you to select which species or non-constant parameters to show in the plot. In this case, for example, I could select the target occupancy. I can also change the scale to a log scale.

    There is a separate video on how to visualize multi-dimensional data. Now we can explore how the parameter values affect the model response. You can select parameters, compartments, and species initial conditions to explore by dragging and dropping them from the module section in the browser to the Explorer section. For example, I can drag the plasma compartment volume, as well as the elimination rate, kel, over to the Explorer section to create sliders.

    Every time you move a slider, the model will be simulated with that particular slider's value applied. You can also overlay results from each simulation to more clearly see the effect of changing the parameter value on the model response. Note that you can also explore doses and variants in your model in the same way as we've just done with the compartment volume and kel.

    After we have simulated the model, we can also calculate statistics on the simulation results, such as the AUC or the Cmax. This is achieved by adding a post-processing step after the simulation step in your program. At the bottom of the program, a new step will have appeared, where you can define statistics you would like to calculate. We can calculate the AUC by using the trapz function with time and drug as input arguments, and the Cmax by using the max function in MATLAB.

    You can now run this step. And it will take the output results from the simulations you've done earlier to calculate these statistics. I recommend turning Overlay Results off before you run this step. This matrix of plots shows the AUC and Cmax for each of the values of kel that we have simulated the model with. You can also inspect the numerical data by creating a data sheet and dragging and dropping the statistics table onto the worksheet.

    Another way that you can run your simulations in SimBiology is programmatically. A good way to get started with that is to export your model to the MATLAB workspace, for example calling it m1. And also, you can have a look at the specific code associated with the program that you just created by viewing the program code. If you view this code for the simulations, you'll see that primarily, it relies on this function, sbiosimulate, with input arguments for model, the configuration sets, and any variance and doses that you created.

    You'll also see that your model is now present in the MATLAB workspace. So if I create the config set and I pull out a dose from my model, for example, the first dose in my model, I can then create a simulation by calling sbiosimulate on my model, the configuration set, and the dose. And I can plot that data using as sbioplot. And here, we have the results from that simulation.

    In this video, I've shown you how to create a program to simulate a model in the SimBiology model analyzer app, how to use doses and variants for those simulations, how to use the simulation settings to set the solver type tolerances, output times, and other settings, and then also how steps are part of programs and how subsequent steps use the outputs from previous steps, such as what we saw when post-processing the simulation results to calculate AUC and Cmax. And lastly, I showed you how to programmatically simulate your model using the sbiosimulate function. Other resources that you can refer to are other short videos, such as the one on using SimBiology scenarios, as well as how to visualize your model simulations.

    Related Products