From b918f4896a17651a8118fe125f0c1db8163064a0 Mon Sep 17 00:00:00 2001 From: Datseris Date: Mon, 8 Apr 2024 12:03:16 +0100 Subject: [PATCH] warn that multiplication and derivative may fail... --- CHANGELOG.md | 2 +- src/make.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9955c70..ebe74bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,4 +16,4 @@ parameters, and default processes. - New keyword `warn_default` in `processes_to_mtkmodel`. - Now `processes_to_mtkmodel` allows for `XDESystems` as elements of the input vector. - Detection of LHS-variable in `Equation` has been improved significantly. - Now, LHS can be any of: `x`, `Differential(t)(x)`, `Differential(t)(x)*p`, `p*Differential(t)(x)`. \ No newline at end of file + Now, LHS can be any of: `x`, `Differential(t)(x)`, `Differential(t)(x)*p`, `p*Differential(t)(x)`. However, the multiplication versions often fail for unknown reasons. \ No newline at end of file diff --git a/src/make.jl b/src/make.jl index 52c60dd..3ec6db1 100644 --- a/src/make.jl +++ b/src/make.jl @@ -11,7 +11,8 @@ The model/system is _not_ structurally simplified. or not having limitations on the left-hand-side (LHS) form. 1. An `Equation`. The LHS format of the equation is limited. Let `x` be a `@variable` and `p` be a `@parameter`. Then, the LHS can only be one of: - `x`, `Differential(t)(x)`, `Differential(t)(x)*p`, `p*Differential(t)(x)`. + `x`, `Differential(t)(x)`, `Differential(t)(x)*p`, `p*Differential(t)(x)`, + however, the versions with `p` may fail unexpectedly. Anything else will either error or fail unexpectedly. 2. A vector of the above two, which is then expanded. This allows the convenience of functions representing a physical process that may require many equations to be defined.