Modeling dynamical processes with differential equations (ODE's) and parameter fitting by using the
Excel® Solver
Example demonstration
We start with a simple straightforward, pharmacokinetically orientated, but arbitrary example, a three compartment model with three non-linear fluxes, the content of compartment I (Infusion) with an
initial value of 100% decays with the rate rd, the 2nd compartment D (Digestion) is filled up by the rate rd and depleted by a rate rk and additionally a loss term
rl, compartment 3 B (Blood concentration) is filled up with the rate rk.
The VBA Code of the model is straightforward, the array y contain the ODE's: Sub ODE(y#(), dy#())
dy(1) = -rd * y(1)
dy(2) = rd * y(1) - rk * y(2) - 0.01 * y(2)
dy(3) = rk * y(2)
End Sub
The model above has been added to the VBA code of the numerical ODE integrator (RKF method). The following example demonstrate how the parameter estimation problem is handled by simply varying
the related parameter manually:
The following example demonstrate how the parameter estimation problem is handled by the Excel Solver.
The last example demonstrate the advantage of adding the Solver functions to the VBA code.
The examples demonstrate one possibility , how to realize both the calculations of ODE's and their parameter estimations in an Excel sheet
by the combination of a numerical integrator and Excel Solver. As the chosen ODE's have an analytical solution, the fitting would be
possible even without the RKF.
Nemaplot uses cookies to provide its services. By continuing to browse the site you are agreeing to our use of cookies.
More information (in German only)