Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2356 Update to SimModel 4.0.0.52 causes a PK-Sim test to fail #2357

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

Yuri05
Copy link
Member

@Yuri05 Yuri05 commented Oct 4, 2022

Test runs again

@@ -3877,7 +3877,7 @@ INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Area','PI*(
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_DrugAbsorption_para','OralApplicationsEnabled ? P_int_para*Aeff*(EffectiveLumenConcentration-(NOT SinkCondition_para ? fu*DrugMucosa : 0)) : 0','Amount per time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_DrugAbsorption_trans','OralApplicationsEnabled ? P_int_trans*Aeff*(P_int_trans_lum_cell_factor*EffectiveLumenConcentration-(NOT SinkCondition_trans ? P_int_trans_cell_lum_factor*fu/K_cell_pls*DrugMucosa : 0)) : 0','Amount per time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_EffectiveSurfaceArea','Ageom*AeffFactor*AeffVariabilityFactor','Area');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_FillLevel','Liquid/V','Dimensionless');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_FillLevel','V>0 ? Liquid/V : 0','Dimensionless');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem was with the cattle simulation (every simulation, not just pop simulation).
Becasue the cattle GI-tract is not properly implemented yet, all GI parameters are set to zero, resulting in zero volume of all GI compartments.
This resulted in some 0/0 terms of the ODE and thus in NaNs in the RHS.

Before the SimModel fix those terms were apparently not properly evaluated (returning 0 or whatever else).

Adding the check for zero volume here and in the formulas below solves the issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crazy

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, probably not 0/0 but "Infinity" (as in the example above). Anyways :)

@Yuri05 Yuri05 requested review from rwmcintosh and msevestre October 4, 2022 12:48
@msevestre msevestre merged commit 25d6c9f into Open-Systems-Pharmacology:develop Oct 4, 2022
@Yuri05 Yuri05 deleted the 152_CattleFail branch April 5, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants