# Is there any example of porting an octave multi compartment PBPK ode model to Julia?

**URL:** <https://discourse.julialang.org/t/is-there-any-example-of-porting-an-octave-multi-compartment-pbpk-ode-model-to-julia/14506>\
**Category:** Modelling & Simulations\
**Created:** [September 3, 2018, 11:09pm UTC](https://discourse.julialang.org/t/is-there-any-example-of-porting-an-octave-multi-compartment-pbpk-ode-model-to-julia/14506 "2018-09-03T23:09:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmarikar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmarikar/32/5235_2.png) [@mmarikar](https://discourse.julialang.org/u/mmarikar)\
**Post date:** [September 3, 2018, 11:09pm UTC](https://discourse.julialang.org/t/is-there-any-example-of-porting-an-octave-multi-compartment-pbpk-ode-model-to-julia/14506/1 "2018-09-03T23:09:33Z")

</div>

I was able to get a single compartment model working as indicated below using Chris R’s links.  
My example can be seen at [https://github.com/mmarikar/julia/blob/master/OneCompartmentPBPKmodel.jl](https://github.com/mmarikar/julia/blob/master/OneCompartmentPBPKmodel.jl)  
Does anyone have an example for a multi-compartment PBPK model?  
Specifically I’m trying to port the following octave code to Julia  
[https://github.com/mmarikar/PBPK/blob/master/Sept3\_Simple\_Octave\_PBPK\_ODE-Copy1.ipynb](https://github.com/mmarikar/PBPK/blob/master/Sept3_Simple_Octave_PBPK_ODE-Copy1.ipynb)

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 4, 2018, 1:07am UTC](https://discourse.julialang.org/t/is-there-any-example-of-porting-an-octave-multi-compartment-pbpk-ode-model-to-julia/14506/2 "2018-09-04T01:07:42Z")

</div>

Yes there are examples. One is shown in this presentation very very briefly:

[![](https://global.discourse-cdn.com/julialang/original/3X/a/0/a09bab6f3b965fce8043e662db64d5f0ea64bb44.jpeg "JuliaCon 2018 | Pumas: Pharmaceutical Modeling and Simulation | Chris Rackauckas") ](https://www.youtube.com/watch?v=KQ4Vtsd9XNw)

Parts of PuMaS.jl will be released by ACoP (early October) along with the shown PBPK model.

In the meantime, all of this can be done directly with DifferentialEquations.jl of course. The advantage of PuMaS.jl is that it builds a DSL for handling the dosing.
