Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dMod2
Type: Package
Title: Parameter Estimation in Dynamical Models
Version: 0.18.1
Version: 0.18.2
Date: 2026-11-25
Authors@R: c(
person("Simon", "Beyer", email = "simon.beyer@fdm.uni-freiburg.de",
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# dMod2 0.18.2

* `symmetryDetection()` and `symmetryReduction()` need symident >= 0.18.3. `discreteSymmetries()` and
`globalOptions` take `msolveWork`, the work of the F4 rounds of one call of msolve, in place of
`msolveEntries`. The level `"axiom"` of `certificate$complete` is `"checked"`, and
`certificate$premises` lists the properties of the model that a count rests on.

# dMod2 0.18.1

* Needs cppDE >= 0.13.17 and compiles against the cppDE headers (`LinkingTo: cppDE`). The OpenMP regions
Expand Down
18 changes: 10 additions & 8 deletions R/symmetryDetection.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#' (needs msolve, implies `reconstruct = TRUE`). A model the global analysis does not handle
#' gets the reason in `info$discrete$unsupported` and a warning.
#' @param globalOptions A list of arguments of the global analysis: `order`, `points`,
#' `memory`, `experiments`, `msolveEntries`, `msolveTerms`, `searchEntries` and
#' `memory`, `experiments`, `msolveWork`, `msolveTerms`, `searchEntries` and
#' `eliminationTerms` as in [discreteSymmetries()].
#' @param verbose Logical. Print the result. Defaults to `FALSE`.
#'
Expand Down Expand Up @@ -226,7 +226,8 @@ symmetryDetection <- function(f, g, trafo = NULL, parameters = NULL,
#' integral: `NULL` (default) where a short count of one experiment finds none, `TRUE`
#' first with the number of experiments from the rank criterion, a number `K` with `K`
#' experiments, `FALSE` never.
#' @param msolveEntries Nonzero entries of the F4 matrices one call of msolve may reduce.
#' @param msolveWork Work of the F4 rounds one call of msolve may do, read from the output of
#' msolve; the calls of one count share twice this cap.
#' @param msolveTerms Terms of the largest system given to msolve.
#' @param searchEntries Entries of the matrices over finite fields the exact count may
#' reduce.
Expand All @@ -245,14 +246,15 @@ symmetryDetection <- function(f, g, trafo = NULL, parameters = NULL,
#' `inDomain`, `undecided`), `closedForms`, `countFinal` (every solution is the image of
#' a proven \eqn{\sigma}), `fundamentalDomain` (inequalities that keep one point of each
#' orbit), `certificate` (what the result rests on, with `complete`: `"exact"`,
#' `"verified"`, `"axiom"`, `"no"` or `"open"`), `experiments` (the count on several
#' experiments, or why it does not apply), `limits` and, where they apply, `reduced` (for
#' `"verified"`, `"checked"`, `"no"` or `"open"`, and `premises`, the properties of the model
#' the count rests on), `experiments` (the count on several experiments, or why it does not
#' apply), `limits` and, where they apply, `reduced` (for
#' a model with directions), `eliminated` (under `reduceCQ`, the species solved through
#' the totals), `relaxed` (the model with non-rational terms of the states as new states)
#' and `unsupported`.
#'
#' @details The search needs msolve; [symmetryDetection()] says where it is searched.
#' The defaults of `msolveEntries`, `msolveTerms`, `searchEntries` and `eliminationTerms`
#' The defaults of `msolveWork`, `msolveTerms`, `searchEntries` and `eliminationTerms`
#' (`NULL`) keep the values of symident.
#' @references Godfrey, K. (1983). Compartmental Models and Their Application.
#' Academic Press, London.
Expand All @@ -266,7 +268,7 @@ symmetryDetection <- function(f, g, trafo = NULL, parameters = NULL,
#' res$info$discrete$fundamentalDomain
#' @export
discreteSymmetries <- function(object, order = NULL, points = 5L, cores = 1, memory = NULL,
experiments = NULL, msolveEntries = NULL, msolveTerms = NULL,
experiments = NULL, msolveWork = NULL, msolveTerms = NULL,
searchEntries = NULL, eliminationTerms = NULL) {
if (!inherits(object, "symmetrydetection"))
stop("discreteSymmetries(): `object` must be a symmetrydetection result.", call. = FALSE)
Expand All @@ -285,7 +287,7 @@ discreteSymmetries <- function(object, order = NULL, points = 5L, cores = 1, mem
search <- function() with(rj$`_context`(env), res$discrete(
order = if (!is.null(order)) as.integer(order), cores = as.integer(cores),
points = if (is.list(points)) points else as.integer(points), memory = memory,
experiments = .symCount(experiments), msolve_entries = .symCount(msolveEntries),
experiments = .symCount(experiments), msolve_work = .symCount(msolveWork),
msolve_terms = .symCount(msolveTerms), search_entries = .symCount(searchEntries),
elimination_terms = .symCount(eliminationTerms)))
tryCatch(search(), symident.sym.msolve.MsolveMissingError = function(e) {
Expand Down Expand Up @@ -393,7 +395,7 @@ reconstControl <- function(relevanceCap = 6L, relevanceCapDir = 24L, relevanceCa

# ---- the interface to the Python package symident --------------------------------

.symidentMin <- "0.18.2"
.symidentMin <- "0.18.3"
.symidentReq <- paste0("symident>=", .symidentMin)

# whether symident is installed in version .symidentMin or later
Expand Down
12 changes: 7 additions & 5 deletions man/discreteSymmetries.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/symmetryDetection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-symmetry.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ test_that("discrete symmetries with a known input, kept by the reduction, and of
expect_setequal(s$changes, c("x1", "k01", "k12"))
expect_identical(r$info$discrete$fundamentalDomain, "k01 < k12")
expect_true(r$info$discrete$countFinal)
expect_true(r$info$discrete$certificate$complete %in% c("exact", "verified", "axiom"))
expect_true(r$info$discrete$certificate$complete %in% c("exact", "verified", "checked"))
red <- symmetryReduction(r)
expect_length(red$discrete$symmetries, 1L)
expect_identical(red$discrete$fundamentalDomain, "k01 < k12")
# a model with a scaling is reduced first, the maps in the reduced coordinates
g <- eqnvec(m = "ktx - dm*m", p = "ktl*m - dp*p")
r2 <- discreteSymmetries(symmetryDetection(g, eqnvec(y = "p"), reconstruct = TRUE), points = 2,
memory = 4, msolveEntries = 4e8)
memory = 4, msolveWork = 1e9)
expect_false(r2$identifiable)
expect_setequal(r2$discreteSymmetries[[1]]$changes, c("m", "dm", "dp"))
})
Loading