You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for a really nice and flexible environment for sys-bio modelling & simulations.
I want to report a small "bug" that caused some headache re compartments. I'm unsure whether it relates to tellurium or roadrunner. Nevertheless, if I write up the same reactions for a standard 2-compartment PK model and load in models with without declaration of species in compartments, I get the same return when I ask for return of ODEs, but I also get different simulations!
s_pk = """
species Aabs = 0.0; # drug SC
species Ac = 0.0; # drug central
species Ap = 0.0; # drug peripheral
compartment Vc = 1.34
compartment Vp = 0.35
compartment SC = 1
const ka = 1.23
const Q = 0.15 # L/h
const Cl = 0.62
const F = 1.0
Aabs -> Ac; ka * Aabs # [nmol/h] absorption
Ac -> Ap ; Q * (Ac - Ap) # [nmol/h]
Ac -> ; Cl * Ac
"""
pk_comp = """
species Ac in Vc;
species Ap in Vp;
species Aabs in SC;
"""
dose = 5
r = te.loada(s_pk + pk_comp)
r.Aabs += r.F * dose # SC dosis
y = r.simulate(0, 15, 151)
r2 = te.loada(s_pk )
r2.Aabs += r2.F * dose # SC dosis
y2 = r2.simulate(0, 15, 151)
A plot of the two simulations, however, shows the difference. This is troubling. I can deduce that declaration of species in compartments makes tellurium divide the ODE of the relevant species with the volume of the compartment. But I cannot find info in the documentation.
Is there a way of handling dosing without having to write up reactions as amount/time?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Thanks for a really nice and flexible environment for sys-bio modelling & simulations.
I want to report a small "bug" that caused some headache re compartments. I'm unsure whether it relates to tellurium or roadrunner. Nevertheless, if I write up the same reactions for a standard 2-compartment PK model and load in models with without declaration of species in compartments, I get the same return when I ask for return of ODEs, but I also get different simulations!
If I then ask for the ODEs
both yields
A plot of the two simulations, however, shows the difference. This is troubling. I can deduce that declaration of species in compartments makes tellurium divide the ODE of the relevant species with the volume of the compartment. But I cannot find info in the documentation.
![image](https://private-user-images.githubusercontent.com/26871049/354191823-3ac3b8b5-fbe3-4549-9d80-9ab9a2cc9daf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODI5MzYsIm5iZiI6MTczOTI4MjYzNiwicGF0aCI6Ii8yNjg3MTA0OS8zNTQxOTE4MjMtM2FjM2I4YjUtZmJlMy00NTQ5LTlkODAtOWFiOWEyY2M5ZGFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE0MDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjYmIyZWIxZTk4YmZkZWI2NzFjZmI0YzFlZjcxMmU5MjFmZTc0ZTdjZTliMTEyZjI1NGQ1MWQ1NTIxZGZmZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.y-UMgDKBQ00aZn0flQ3qsfjwbscEG1iN7uN_qaJC7qY)
Is there a way of handling dosing without having to write up reactions as amount/time?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions