Jump to content


Photo

Jumbe model PML syntax

Jumbe PML

  • Please log in to reply
2 replies to this topic

#1 lukeutley

lukeutley

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 19 June 2019 - 06:59 PM

In a recent review by Gabrielsson and Hjorth (AAPS Jan 2016), it was suggested to rewrite the effect function in the Jumbe model as:

if C> 0, then S© = 1 + kkill,max * (C/KC50 + C);  if C=0, then S© = 1. 

I'm having trouble with the PML syntax to implement this.  My current code below brings back an error "assignment only allowed at top level.    Suggestions?

Thanks,

Luke

 

if(C > 0) {Inh = 1+ Kmax * (C^delta / ( KC50^delta + C^delta))} else{if(C = 0) {Inh = 1}}



#2 bwendt@certara.com

bwendt@certara.com

    Advanced Member

  • Administrators
  • 282 posts

Posted 19 June 2019 - 07:27 PM

Hi Luke,

 

two things: get rid of else statement and change the assignment symbol for 'equals', e.g. '==' instead of '=''

Here is an example PML:

 

if(C > 0){Inh=(1+ Kmax * (C /(KC50+ C)))}
if(C == 0){Inh = 1}

 

Bernd



#3 smouksassi1

smouksassi1

    Advanced Member

  • Val_Members
  • PipPipPip
  • 232 posts
  • LocationMontreal

Posted 20 June 2019 - 08:28 AM

and PML support the  C language way of telling it what you want:

 

Inh = C > 0 ? (1+ Kmax * (C /(KC50+ C))) : 1   
 
This reads when C> 0 inh is = to  (1+ Kmax * (C /(KC50+ C))) , otherwise it is 1
you can nest have mutliple conditions this way it is just a matter of style and readability
 
 
both ways does not  handle when C < 0 so you need to make sure that this is impossible to happen in your model.
testing for equality can be numerically tricky what is really 0 is 0 .0000001 zero ? you need to thing about tolerance and precision in these settings






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

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users