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

2020-05-12 tc1518_M4SS TLAG incorrectly computed #240

Closed
TomTensfeldt opened this issue May 12, 2020 · 3 comments
Closed

2020-05-12 tc1518_M4SS TLAG incorrectly computed #240

TomTensfeldt opened this issue May 12, 2020 · 3 comments

Comments

@TomTensfeldt
Copy link
Collaborator

TLAG isn't correct for this M4 SS model execution. Reported as 6 hours but should be "0". Note, as per the Definitions of TLAG in Sections Section 8.2.1 and 8.2.2, "If all concentrations have a value greater than 0 then TLAG is 0." .

@jhhughes256
Copy link
Collaborator

jhhughes256 commented May 12, 2020

Linking this to #199, #220, #221

@TomTensfeldt
Copy link
Collaborator Author

This also occurs with test case tc1572_M4SS.

@jhhughes256
Copy link
Collaborator

As of commit cca452d this issue has been resolved. This issue can now be closed.

The following is an excerpt from tc1518_M4SS_cca452d.html

Add and compare TLAG parameter

Note, as per the Definitions of TLAG in Sections Section 8.2.1 and 8.2.2, “If all concentrations have a value greater than 0 then TLAG is 0.”

for(i in unique(refparams[,mct$SDEID])) {
  k <- refparams[,mct$SDEID]==i
  # this won't work if there are "trailing" zeros ######################################################################
  m <- (refparams[k,rateincrements]==0)
  maxnz <- max(refparams[k,paste0("MIDPT", 1:ntimepoints)][!m])
  print(maxnz)
  if(any(m)) {
    refparams$TLAG[k] <- max(refparams[k,paste0("MIDPT", 1:ntimepoints)][m])
  }
  else {
    refparams$TLAG[k] <- 0
  }
}
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18
## [1] 18

Compare TLAG parameter

clist <- compare_parameters("TLAG$", alist=assessedparameters, ref.params=refparams, tst.params=results, tol=tolerance)
## testing TLAG vs TLAG 
## Equal
if(length(clist$n.ref)>0 & length(clist$n.tst)>0) assessedparameters <- remove1(assessedparameters, clist$rname)

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

No branches or pull requests

2 participants