Skip to content

Commit

Permalink
Fixes #152 Update to SimModel 4.0.0.52 causes a PK-Sim test to fail (#…
Browse files Browse the repository at this point in the history
…2357)

Co-authored-by: Yuri05 <[email protected]>
  • Loading branch information
Yuri05 and Yuri05 authored Oct 4, 2022
1 parent 2f8d869 commit 25d6c9f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
18 changes: 12 additions & 6 deletions src/Db/Diff/PKSimDB_diff.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CREATE TABLE [tab_active_transport_types]([transport_type] TEXT PRIMARY KEY NOT NULL REFERENCES [tab_process_types]([process_type]) ON UPDATE CASCADE) WITHOUT ROWID;
INSERT INTO tab_active_transport_types(transport_type) VALUES('BiDirectional');
INSERT INTO tab_active_transport_types(transport_type) VALUES('Efflux');
INSERT INTO tab_active_transport_types(transport_type) VALUES('Influx');
INSERT INTO tab_active_transport_types(transport_type) VALUES('PgpLike');
UPDATE tab_transport_directions SET display_name='Influx Lumen to Mucosa/Intracellular' WHERE transport_direction='InfluxLumenToMucosaIntracellular';
UPDATE tab_calculation_method_rates SET formula='V>0 ? Liquid/V : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_FillLevel';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_Caecum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_ColonAscendens';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_ColonDescendens';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_ColonSigmoid';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_ColonTransversum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_Duodenum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_LowerIleum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_LowerJejunum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_Rectum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_UpperIleum';
UPDATE tab_calculation_method_rates SET formula='alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0' WHERE calculation_method='Lumen_PKSim' AND formula_rate='PARAM_Outflow_UpperJejunum';
24 changes: 12 additions & 12 deletions src/Db/Dump/PKSimDB_dump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_FillLevelFlagFlag','(FillLevel<0.9?1:1/(1+exp((FillLevel-1)/0.01)))','Dimensionless');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Inflow_Caecum','0*V','Flow');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Inflow_ColonAscendens','0.00098426*V','Flow');
Expand Down Expand Up @@ -3945,18 +3945,18 @@ INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_OralMassAbs
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_OralMassAbsorbed_RHS_rect','PassiveRates_para+PassiveRates_trans-(ActiveRates_para_IN+ActiveRates_trans_IN)+ActiveRates_para_OUT+ActiveRates_trans_OUT','Amount per time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_OralMassAbsorbed_RHS_uil','PassiveRates_para+PassiveRates_trans-(ActiveRates_para_IN+ActiveRates_trans_IN)+ActiveRates_para_OUT+ActiveRates_trans_OUT','Amount per time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_OralMassAbsorbed_RHS_uje','PassiveRates_para+PassiveRates_trans-(ActiveRates_para_IN+ActiveRates_trans_IN)+ActiveRates_para_OUT+ActiveRates_trans_OUT','Amount per time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Caecum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonAscendens','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonDescendens','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonSigmoid','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonTransversum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Duodenum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_LowerIleum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_LowerJejunum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Rectum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Caecum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonAscendens','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonDescendens','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonSigmoid','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_ColonTransversum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Duodenum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_LowerIleum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_LowerJejunum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Rectum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_Stomach','0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_UpperIleum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_UpperJejunum','(k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V)','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_UpperIleum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_Outflow_UpperJejunum','alpha*V > 0 ? (k_p*alpha_p*V_p+inflow-k*alpha*V)/(alpha*V) : 0','Inversed time');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_pH_from_pH_fasted','pH_fasted','Dimensionless');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_SITT_Factor','P1*SITT+P2','Dimensionless');
INSERT INTO tab_calculation_method_rates VALUES('Lumen_PKSim','PARAM_VolumeGut','V_duo + V_uje + V_lje + V_uil + V_lil + V_cae','Volume');
Expand Down
Binary file modified src/Db/PKSimDB.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/PKSim.Tests/IntegrationTests/SimulationSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public override void GlobalContext()
_allPopulations = populationsRepo.All().ToList();
}

[Observation, Ignore("To be un-ignored when SimModel is updated")]
[Observation]
public async Task should_be_able_to_simulate_the_simulation()
{
var errors = new List<string>();
Expand Down

0 comments on commit 25d6c9f

Please sign in to comment.