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

More precise time output in solve_model() #18

Open
carolinering opened this issue Jun 15, 2023 · 0 comments
Open

More precise time output in solve_model() #18

carolinering opened this issue Jun 15, 2023 · 0 comments

Comments

@carolinering
Copy link
Contributor

When running one of the solve_model() functions for more than 100 days, the "time" column of the output matrix does not have sufficient numerical precision to distinguish the different time points of the output. Seems like the precision is fixed at 4 sig figs, which isn't enough for longer simulations.

Precision for time output needs to be determined based on the length of the simulation and the number of time steps.

Reproducible example:

When you run for 100 days or less, the time points are distinguishable:

tmp <- solve_pbtk(
    chem.name='Bisphenol-A',
    daily.dose=1, doses.per.day = 1,
    days=100)
tail(tmp[, "time"], 10)
tail(diff(tmp[,"time"]), 10)

When you run for more than 100 days, the time points are not distinguishable:

tmp <- solve_pbtk(
    chem.name='Bisphenol-A',
    daily.dose=1, doses.per.day = 1,
    days=101)
tail(tmp[, "time"], 10)
tail(diff(tmp[,"time"]), 10)
jfwambaugh pushed a commit that referenced this issue Feb 13, 2024
Merge in HTTK/httk-dev from HTTK-78 to patch/2.2.3

* commit '40bf86d957cef225ec9a4d1d688260829dd3676e':
  update the code comments for context of the error messages
  remove the temporary print outs and ERROR tags on error messages used for code behavior testing
  update error messages for get_clint - adding another error message to consider
  initial update - update the checks and reported error messages to be more informative
  HTTK-135 resolution, fix the logical checks by adding a check for param.val == NA
jfwambaugh pushed a commit that referenced this issue Feb 13, 2024
Merge in HTTK/httk-dev from HTTK-78 to patch/2.2.3

* commit '40bf86d957cef225ec9a4d1d688260829dd3676e':
  update the code comments for context of the error messages
  remove the temporary print outs and ERROR tags on error messages used for code behavior testing
  update error messages for get_clint - adding another error message to consider
  initial update - update the checks and reported error messages to be more informative
  HTTK-135 resolution, fix the logical checks by adding a check for param.val == NA
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

1 participant