Jump to content


Photo

Getting different answers between Graphic and Textual versions of the same model

PML Modeling

  • Please log in to reply
2 replies to this topic

#1 mjPK

mjPK

    Member

  • Val_Members
  • PipPip
  • 22 posts

Posted 21 November 2023 - 03:32 PM

Hi, 

 

I need to start leveraging the PML language to properly setup my model. I write up my equations with concentration. However, when WinNonlin  converts my model the equations use amounts. I did a small test comparing the abundance formulation with my equations noticed when i convert my graphical model to a text version. 

 

I am getting very different answers between the too models. Now the difference between the rate constants can be attributed to a difference in units. The volume should be the same though and this is what has me alarmed. 

 

I am not sure handles the number for the error term  (graphics vs text ), but that is really the only thing I can think of that could drive the difference. 

 

The reason why I want to write it in this fashion is I am looking to do something similar to the PML school lesson on metabolites. They use MM kinetics which uses concentration. This should be ok but I am a bit concerned about the difference answers using the two modes.  

 

I have attached the workbook. 

 

Any help would be great 

 

 

Attached Files


Edited by mjPK, 21 November 2023 - 03:40 PM.

  • DanielGon, AlexKawn, Austingar and 30 others like this

#2 mjPK

mjPK

    Member

  • Val_Members
  • PipPip
  • 22 posts

Posted 21 November 2023 - 04:12 PM

Slightly modified version of the file with more experimentation. I have three models, 

  1. The original graphical model
  2. The PML version where I just hit the button and run ( So it has deriv (A1= - k*A1 etc....
  3. The PML version where I switch the amounts to concentrations (A2 -> C2 which is how the PML school programed that one lesson) 

 

Models 1 and 2 are the same but 3 is different. All that was changed was switching from amount based RHS to a concentration based RHS. Clearly I break something but it is not intuitive to me where I go wrong. 

Attached Files


  • Thomasgaks likes this

#3 kniefort

kniefort

    Member

  • Val_Members
  • PipPip
  • 29 posts

Posted 21 November 2023 - 10:03 PM

Consider:  CL=k*V, C=A1/V

 

dA1 = -(CL * C) is same as dA1 = -k*V * A1/V (Volumes cancel out)

 

You have:   deriv(A1 = - (Cl * C)- (A1 * K_tissue_in- A2 * K_tissue_out))

 

You then replace A1 with C  when  A1 = C * V.    You need to multiply by V, e.g., 

 

deriv(A1 = - (Cl * C)- (C* V * K_tissue_in- C2 * V2 * K_tissue_out))  

 

Make this change and you will see the models produce the same results

 

It might be easier to read if you parameterize your whole model into either microconstants or clearance/volume, and not mix the 2 but that is up to the modelers preference!


Edited by kniefort, 21 November 2023 - 10:05 PM.

  • Stevensi likes this





Also tagged with one or more of these keywords: PML, Modeling

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users