Skip to content

Commit

Permalink
fix: PMcore only supports eqs in the form XP(..)=X(..)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siel committed Mar 15, 2024
1 parent 82a2cd9 commit 77c4c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/PM_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ PM_model_list <- R6::R6Class("PM_model_list",
content <- gsub("</parameter_definition>", parameter_definition %>% paste(collapse = "\n"), content)

eqs <- self$model_list$eqn %>% tolower()
neqs <- sum(sapply(stringr::str_extract_all(eqs, "xp\\[(\\d)\\]"), function(x) length(x) > 0))
neqs <- sum(sapply(stringr::str_extract_all(eqs, "xp\\((\\d)\\)"), function(x) length(x) > 0))
if (neqs == 0) {stop("Error: PMcore does not support analytic equations, provide a eqn block.")}
content <- gsub("</neqs>", neqs, content)

Expand Down

0 comments on commit 77c4c6a

Please sign in to comment.