From 405e65a096faf174c0b9093479dd25574228de34 Mon Sep 17 00:00:00 2001 From: Simon Beyer <64092903+simonbeyer1@users.noreply.github.com> Date: Thu, 3 Dec 2026 10:53:53 +0100 Subject: [PATCH] feat(symmetry): symident >= 0.18.3, msolveWork in place of msolveEntries, the level checked and the premises of the certificate; dMod2 0.18.2 Co-Authored-By: Claude Opus 5.5 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ R/symmetryDetection.R | 18 ++++++++++-------- man/discreteSymmetries.Rd | 12 +++++++----- man/symmetryDetection.Rd | 2 +- tests/testthat/test-symmetry.R | 4 ++-- 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 92de2fa7..c158cdcb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", diff --git a/NEWS.md b/NEWS.md index 215b27ee..6dd1ef8d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/R/symmetryDetection.R b/R/symmetryDetection.R index 13a03dcd..fcc39007 100644 --- a/R/symmetryDetection.R +++ b/R/symmetryDetection.R @@ -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`. #' @@ -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. @@ -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. @@ -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) @@ -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) { @@ -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 diff --git a/man/discreteSymmetries.Rd b/man/discreteSymmetries.Rd index d17277be..160bdc8c 100644 --- a/man/discreteSymmetries.Rd +++ b/man/discreteSymmetries.Rd @@ -11,7 +11,7 @@ discreteSymmetries( cores = 1, memory = NULL, experiments = NULL, - msolveEntries = NULL, + msolveWork = NULL, msolveTerms = NULL, searchEntries = NULL, eliminationTerms = NULL @@ -37,7 +37,8 @@ integral: \code{NULL} (default) where a short count of one experiment finds none first with the number of experiments from the rank criterion, a number \code{K} with \code{K} experiments, \code{FALSE} never.} -\item{msolveEntries}{Nonzero entries of the F4 matrices one call of msolve may reduce.} +\item{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.} \item{msolveTerms}{Terms of the largest system given to msolve.} @@ -60,8 +61,9 @@ domain, where that number is final), \code{counts} per point (\code{complex}, \c \code{inDomain}, \code{undecided}), \code{closedForms}, \code{countFinal} (every solution is the image of a proven \eqn{\sigma}), \code{fundamentalDomain} (inequalities that keep one point of each orbit), \code{certificate} (what the result rests on, with \code{complete}: \code{"exact"}, -\code{"verified"}, \code{"axiom"}, \code{"no"} or \code{"open"}), \code{experiments} (the count on several -experiments, or why it does not apply), \code{limits} and, where they apply, \code{reduced} (for +\code{"verified"}, \code{"checked"}, \code{"no"} or \code{"open"}, and \code{premises}, the properties of the model +the count rests on), \code{experiments} (the count on several experiments, or why it does not +apply), \code{limits} and, where they apply, \code{reduced} (for a model with directions), \code{eliminated} (under \code{reduceCQ}, the species solved through the totals), \code{relaxed} (the model with non-rational terms of the states as new states) and \code{unsupported}. @@ -83,7 +85,7 @@ certificate. } \details{ The search needs msolve; \code{\link[=symmetryDetection]{symmetryDetection()}} says where it is searched. -The defaults of \code{msolveEntries}, \code{msolveTerms}, \code{searchEntries} and \code{eliminationTerms} +The defaults of \code{msolveWork}, \code{msolveTerms}, \code{searchEntries} and \code{eliminationTerms} (\code{NULL}) keep the values of symident. } \examples{ diff --git a/man/symmetryDetection.Rd b/man/symmetryDetection.Rd index d7f7c8fb..a8a2cbc9 100644 --- a/man/symmetryDetection.Rd +++ b/man/symmetryDetection.Rd @@ -123,7 +123,7 @@ output of a generic one and reconstructs the maps between them, as \code{\link[= gets the reason in \code{info$discrete$unsupported} and a warning.} \item{globalOptions}{A list of arguments of the global analysis: \code{order}, \code{points}, -\code{memory}, \code{experiments}, \code{msolveEntries}, \code{msolveTerms}, \code{searchEntries} and +\code{memory}, \code{experiments}, \code{msolveWork}, \code{msolveTerms}, \code{searchEntries} and \code{eliminationTerms} as in \code{\link[=discreteSymmetries]{discreteSymmetries()}}.} \item{verbose}{Logical. Print the result. Defaults to \code{FALSE}.} diff --git a/tests/testthat/test-symmetry.R b/tests/testthat/test-symmetry.R index 38372718..363aa56a 100644 --- a/tests/testthat/test-symmetry.R +++ b/tests/testthat/test-symmetry.R @@ -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")) })