From 9a2dea6dcd84222871c18437ee8db127227401ac Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 10 Mar 2024 18:50:21 +0000 Subject: [PATCH] build based on c085e69 --- dev/.documenter-siteinfo.json | 2 +- dev/assets/Manifest.toml | 229 +++-- dev/assets/Project.toml | 2 +- dev/assets/documenter.js | 923 ++++++++++-------- dev/assets/themes/documenter-dark.css | 2 +- dev/export/export/index.html | 2 +- .../identifiability/index.html | 4 +- dev/index.html | 91 +- dev/input/input/index.html | 4 +- dev/ioequations/ioequations/index.html | 2 +- dev/objects.inv | Bin 0 -> 2939 bytes dev/search_index.js | 2 +- dev/tutorials/creating_ode/index.html | 2 +- dev/tutorials/discrete_time/index.html | 26 +- dev/tutorials/identifiability/index.html | 2 +- .../identifiable_functions/index.html | 2 +- dev/tutorials/reparametrization/index.html | 2 +- dev/utils/elimination/index.html | 2 +- dev/utils/global_identifiability/index.html | 2 +- dev/utils/local_identifiability/index.html | 2 +- dev/utils/ode/index.html | 4 +- dev/utils/power_series_utils/index.html | 2 +- dev/utils/primality/index.html | 2 +- dev/utils/reparametrization/index.html | 2 +- dev/utils/util/index.html | 4 +- dev/utils/wronskian/index.html | 2 +- 26 files changed, 739 insertions(+), 580 deletions(-) create mode 100644 dev/objects.inv diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e2da31d8e..ef7f7929d 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-24T10:52:50","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-10T18:50:14","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/assets/Manifest.toml b/dev/assets/Manifest.toml index 43824fba2..402a61b52 100644 --- a/dev/assets/Manifest.toml +++ b/dev/assets/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.1" +julia_version = "1.10.2" manifest_format = "2.0" -project_hash = "79a87c8b6351eb6b4461d22a8b16148b365aecfc" +project_hash = "a0c904cf784f28c9fa4b500928f28ab0b29b9acc" [[deps.ADTypes]] git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245" @@ -27,9 +27,9 @@ version = "0.4.5" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "0fb305e0253fd4e833d486914367a2ee2c2e78d0" +git-tree-sha1 = "cea4ac3f5b4bc4b3000aa55afb6e5626518948fa" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.1" +version = "4.0.3" weakdeps = ["StaticArrays"] [deps.Adapt.extensions] @@ -58,16 +58,17 @@ uuid = "ec485272-7323-5ecc-a04f-4719b315124d" version = "0.2.0" [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "c5aeb516a84459e0318a02507d2261edad97eb75" +deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "c85c172841acde8dcdf5d77967b14c89c33d65cc" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.7.1" +version = "7.8.1" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceReverseDiffExt = "ReverseDiff" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -76,14 +77,15 @@ version = "7.7.1" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "64d582bcb9c93ac741234789eeb4f16812413efb" +git-tree-sha1 = "e46675dbc095ddfdf2b5fba247d5a25f34e1f8a2" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.6.0" +version = "1.6.1" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -103,9 +105,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BenchmarkTools]] deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "f1f03a9fa24271160ed7e73051fba3c1a759b53f" +git-tree-sha1 = "f1dff6729bc61f4d49e140da1af55dcd1ac97b2f" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.4.0" +version = "1.5.0" [[deps.Bijections]] git-tree-sha1 = "c9b163bd832e023571e86d0b90d9de92a9879088" @@ -126,9 +128,9 @@ version = "0.2.4" [[deps.CSTParser]] deps = ["Tokenize"] -git-tree-sha1 = "b1d309487c04e92253b55c1f803b1d6f0e136920" +git-tree-sha1 = "b544d62417a99d091c569b95109bc9d8c223e9e3" uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" -version = "3.4.1" +version = "3.4.2" [[deps.Calcium_jll]] deps = ["Antic_jll", "Arb_jll", "Artifacts", "FLINT_jll", "GMP_jll", "JLLWrappers", "Libdl", "MPFR_jll", "Pkg"] @@ -144,9 +146,9 @@ version = "0.5.1" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "aef70bb349b20aa81a82a19704c3ef339d4ee494" +git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.22.1" +version = "1.23.0" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -158,6 +160,12 @@ git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.12" +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.4" + [[deps.Combinatorics]] git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" @@ -182,9 +190,9 @@ version = "0.3.0" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "d2c021fbdde94f6cdaa799639adfeeaa17fd67f5" +git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.13.0" +version = "4.14.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -234,9 +242,9 @@ version = "1.16.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "1fb174f0d48fe7d142e1109a10636bc1d14f5ac2" +git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.17" +version = "0.18.18" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -249,9 +257,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] -git-tree-sha1 = "3089c8295ab6d7c728cd6929121c1b4567457306" +git-tree-sha1 = "b19b2bb1ecd1271334e4b25d605e50f75e68fcae" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.147.0" +version = "6.148.0" [deps.DiffEqBase.extensions] DiffEqBaseChainRulesCoreExt = "ChainRulesCore" @@ -278,10 +286,10 @@ version = "6.147.0" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqCallbacks]] -deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "ee954c8b9d348b7a8a6aec5f28288bf5adecd4ee" +deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NonlinearSolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "32b4359949681e76eb09f9b7a4536cb664172980" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "2.37.0" +version = "3.3.0" [deps.DiffEqCallbacks.weakdeps] OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" @@ -299,17 +307,6 @@ git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" version = "1.15.1" -[[deps.Distances]] -deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "66c4c81f259586e8f002eacebc177e1fb06363b0" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.11" -weakdeps = ["ChainRulesCore", "SparseArrays"] - - [deps.Distances.extensions] - DistancesChainRulesCoreExt = "ChainRulesCore" - DistancesSparseArraysExt = "SparseArrays" - [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" @@ -337,16 +334,16 @@ uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" version = "0.9.3" [[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"] -git-tree-sha1 = "2613dbec8f4748273bbe30ba71fd5cb369966bac" +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] +git-tree-sha1 = "4a40af50e8b24333b9ec6892546d9ca5724228eb" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.2.1" +version = "1.3.0" [[deps.DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays", "Statistics"] -git-tree-sha1 = "51b4b84d33ec5e0955b55ff4b748b99ce2c3faa9" +deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "9f9e38f361c9a72eeb28e515d3e0328f2d50076e" uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.6.7" +version = "0.7.9" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -365,6 +362,24 @@ git-tree-sha1 = "0bb0a6f812213ecc8fbbcf472f4a993036858971" uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" version = "0.5.5" +[[deps.DynamicQuantities]] +deps = ["Compat", "PackageExtensionCompat", "Tricks"] +git-tree-sha1 = "bd77385a0fc00ca65d69f55e41955b07ff0dd366" +uuid = "06fc5a27-2a28-4c7c-a15d-362465fb6821" +version = "0.12.3" + + [deps.DynamicQuantities.extensions] + DynamicQuantitiesLinearAlgebraExt = "LinearAlgebra" + DynamicQuantitiesMeasurementsExt = "Measurements" + DynamicQuantitiesScientificTypesExt = "ScientificTypes" + DynamicQuantitiesUnitfulExt = "Unitful" + + [deps.DynamicQuantities.weakdeps] + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.EnumX]] git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" @@ -415,9 +430,9 @@ version = "0.3.2" [[deps.FastLapackInterface]] deps = ["LinearAlgebra"] -git-tree-sha1 = "d576a29bf8bcabf4b1deb9abe88a3d7f78306ab5" +git-tree-sha1 = "0a59c7d1002f3131de53dc4568a47d15a44daef7" uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.1" +version = "2.0.2" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" @@ -434,6 +449,11 @@ weakdeps = ["PDMats", "SparseArrays", "Statistics"] FillArraysSparseArraysExt = "SparseArrays" FillArraysStatisticsExt = "Statistics" +[[deps.FindFirstFunctions]] +git-tree-sha1 = "e90fef90f7d75e6a5b435b0fd65609759f99717a" +uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" +version = "1.2.0" + [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] git-tree-sha1 = "73d1214fec245096717847c62d389a5d2ac86504" @@ -450,11 +470,10 @@ version = "2.22.0" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" +[[deps.Format]] +git-tree-sha1 = "f3cf88025f6d03c194d73f5d13fee9004a108329" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.6" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] @@ -506,15 +525,15 @@ version = "0.5.3" [[deps.Git]] deps = ["Git_jll"] -git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d" +git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.0" +version = "1.3.1" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "b30c473c97fcc1e1e44fab8f3e88fd1b89c9e9d1" +git-tree-sha1 = "12945451c5d0e2d0dca0724c3a8d6448b46bbdf9" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.43.0+0" +version = "2.44.0+1" [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" @@ -529,9 +548,9 @@ version = "1.9.0" [[deps.Groebner]] deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "HostCPUFeatures", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] -git-tree-sha1 = "9b31baa35a38f3502698cac41daf0d00bd283429" +git-tree-sha1 = "042608040d4816df966e92566d3e015e291dfa6d" uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.7.3" +version = "0.7.4" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] @@ -615,10 +634,10 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" [[deps.JuliaFormatter]] -deps = ["CSTParser", "Combinatorics", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] -git-tree-sha1 = "fde717f9e3fe6ffb0336bcc2142cfa71dd9df1f5" +deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] +git-tree-sha1 = "cb2a396ac30525079dfe56adf3fc9c301ea1a2bb" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.50" +version = "1.0.53" [[deps.JumpProcesses]] deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "UnPack"] @@ -632,9 +651,9 @@ weakdeps = ["FastBroadcast"] [[deps.KLU]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "01bb1d420d959b9f668e252a5732444a61ff25de" +git-tree-sha1 = "07649c499349dad9f08dde4243a4c597064663e9" uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.5.0" +version = "0.6.0" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] @@ -659,10 +678,10 @@ uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" version = "0.4.6" [[deps.Latexify]] -deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" +deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] +git-tree-sha1 = "cad560042a7cc108f5a4c24ea1431a9221f22c1b" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.1" +version = "0.16.2" [deps.Latexify.extensions] DataFramesExt = "DataFrames" @@ -683,12 +702,6 @@ git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" version = "1.2.2" -[[deps.Lazy]] -deps = ["MacroTools"] -git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" -uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" -version = "0.15.1" - [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "MatrixFactorizations", "SparseArrays"] git-tree-sha1 = "9cfca23ab83b0dfac93cb1a1ef3331ab9fe596a5" @@ -747,10 +760,10 @@ deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] -deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "0153083d1112c9b284334750c22f33b745611c0f" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "73d8f61f8d27f279edfbafc93faaea93ea447e94" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.24.0" +version = "2.27.0" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -875,10 +888,10 @@ version = "1.1.0" uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.ModelingToolkit]] -deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "IfElse", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "MacroTools", "NaNMath", "OrdinaryDiffEq", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "11f35f9619c625c18454a94a9013e7d047501fbf" +deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "NaNMath", "OrdinaryDiffEq", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "1763cf243494de35378b46c73c4f53b2240770f8" uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "8.75.0" +version = "9.4.0" [deps.ModelingToolkit.extensions] MTKBifurcationKitExt = "BifurcationKit" @@ -915,12 +928,6 @@ git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" version = "7.8.3" -[[deps.NLsolve]] -deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] -git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" -uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" -version = "4.5.1" - [[deps.NaNMath]] deps = ["OpenLibm_jll"] git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" @@ -929,9 +936,9 @@ version = "1.0.2" [[deps.Nemo]] deps = ["AbstractAlgebra", "Antic_jll", "Arb_jll", "Calcium_jll", "FLINT_jll", "Libdl", "LinearAlgebra", "Pkg", "Random", "RandomExtensions", "SHA"] -git-tree-sha1 = "a5aabb92dbec128d181965a4ba308e4fba5a67dc" +git-tree-sha1 = "3789515efc803d7d37c3bad18a4b48d1b34196b7" uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a" -version = "0.43.0" +version = "0.43.1" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -939,9 +946,9 @@ version = "1.2.0" [[deps.NonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "TimerOutputs"] -git-tree-sha1 = "ad5e45cecfcae84a086f0d8ff98ab98fa237a253" +git-tree-sha1 = "d52bac2b94358b4b960cbfb896d5193d67f3ff09" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "3.7.2" +version = "3.8.0" [deps.NonlinearSolve.extensions] NonlinearSolveBandedMatricesExt = "BandedMatrices" @@ -1013,9 +1020,9 @@ version = "1.6.3" [[deps.OrdinaryDiffEq]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "ed171bfea6156d6458007b19790a22f4754bd501" +git-tree-sha1 = "287159684e32db56c82dbf545004a7884c6e5198" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.71.0" +version = "6.74.0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1089,15 +1096,15 @@ version = "0.4.20" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.0" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.1" +version = "1.4.3" [[deps.PrettyTables]] deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] @@ -1121,9 +1128,9 @@ uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] -git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c" +git-tree-sha1 = "763a8ceb07833dd51bb9e3bbca372de32c0605ad" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.9.0" +version = "1.10.0" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] @@ -1159,9 +1166,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "1bbc4bb050165cc57ca2876cd53cc23395948650" +git-tree-sha1 = "b81c1728477663d4104910f448770f448f946d11" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.10.0" +version = "3.11.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1238,10 +1245,10 @@ uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" version = "0.6.42" [[deps.SciMLBase]] -deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces"] -git-tree-sha1 = "16dd1ea058e1c080d7f1ba47a9094f87a1c50e4c" +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "3a281a9fce9cd62b849d7f16e412933a5fe755cb" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.26.2" +version = "2.29.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -1263,10 +1270,15 @@ version = "2.26.2" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] -git-tree-sha1 = "51ae235ff058a64815e0a2c34b1db7578a06813d" +deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools", "Setfield", "SparseArrays", "StaticArraysCore"] +git-tree-sha1 = "10499f619ef6e890f3f4a38914481cc868689cd5" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.7" +version = "0.3.8" + +[[deps.SciMLStructures]] +git-tree-sha1 = "5833c10ce83d690c124beedfe5f621b50b02ba4d" +uuid = "53ae85a6-f571-4167-b2af-e1d143709226" +version = "1.1.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -1454,9 +1466,9 @@ uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "7.2.1+1" [[deps.SymbolicIndexingInterface]] -git-tree-sha1 = "b74cb9508b6c0aa91d729dcbc7e35faf8998c549" +git-tree-sha1 = "306960ba551858403f60267fabd76da7e79093d7" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.7" +version = "0.3.10" [[deps.SymbolicUtils]] deps = ["AbstractTrees", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LabelledArrays", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TimerOutputs", "Unityper"] @@ -1466,9 +1478,9 @@ version = "1.5.0" [[deps.Symbolics]] deps = ["ArrayInterface", "Bijections", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "ForwardDiff", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "RecipesBase", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils"] -git-tree-sha1 = "0cad5780cc4c0f02ca1c27f68231526131c4537e" +git-tree-sha1 = "febe1df0dc665c874cbf6fd88283603201749509" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "5.21.0" +version = "5.22.1" [deps.Symbolics.extensions] SymbolicsGroebnerExt = "Groebner" @@ -1523,6 +1535,15 @@ git-tree-sha1 = "5b5a892ba7704c0977013bd0f9c30f5d962181e0" uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" version = "0.5.28" +[[deps.TranscodingStreams]] +git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.10.4" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] + [[deps.TriangularSolve]] deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] git-tree-sha1 = "fadebab77bf3ae041f77346dd1c290173da5a443" diff --git a/dev/assets/Project.toml b/dev/assets/Project.toml index e449e2a58..30e21dee0 100644 --- a/dev/assets/Project.toml +++ b/dev/assets/Project.toml @@ -7,5 +7,5 @@ StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544" [compat] BenchmarkTools = "1.3" Documenter = "0.27, 1" -ModelingToolkit = "8.74" +ModelingToolkit = "9" StructuralIdentifiability = "0.5" diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js index f5311607b..c6562b558 100644 --- a/dev/assets/documenter.js +++ b/dev/assets/documenter.js @@ -4,7 +4,6 @@ requirejs.config({ 'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/julia.min', 'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min', 'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min', - 'minisearch': 'https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min', 'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min', 'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min', 'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min', @@ -103,9 +102,10 @@ $(document).on("click", ".docstring header", function () { }); }); -$(document).on("click", ".docs-article-toggle-button", function () { +$(document).on("click", ".docs-article-toggle-button", function (event) { let articleToggleTitle = "Expand docstring"; let navArticleToggleTitle = "Expand all docstrings"; + let animationSpeed = event.noToggleAnimation ? 0 : 400; debounce(() => { if (isExpanded) { @@ -116,7 +116,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { isExpanded = false; - $(".docstring section").slideUp(); + $(".docstring section").slideUp(animationSpeed); } else { $(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); $(".docstring-article-toggle-button") @@ -127,7 +127,7 @@ $(document).on("click", ".docs-article-toggle-button", function () { articleToggleTitle = "Collapse docstring"; navArticleToggleTitle = "Collapse all docstrings"; - $(".docstring section").slideDown(); + $(".docstring section").slideDown(animationSpeed); } $(this).prop("title", navArticleToggleTitle); @@ -224,224 +224,465 @@ $(document).ready(function () { }) //////////////////////////////////////////////////////////////////////////////// -require(['jquery', 'minisearch'], function($, minisearch) { - -// In general, most search related things will have "search" as a prefix. -// To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc +require(['jquery'], function($) { -let results = []; -let timer = undefined; +$(document).ready(function () { + let meta = $("div[data-docstringscollapsed]").data(); -let data = documenterSearchIndex["docs"].map((x, key) => { - x["id"] = key; // minisearch requires a unique for each object - return x; + if (meta?.docstringscollapsed) { + $("#documenter-article-toggle-button").trigger({ + type: "click", + noToggleAnimation: true, + }); + } }); -// list below is the lunr 2.1.3 list minus the intersect with names(Base) -// (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) -// ideally we'd just filter the original list but it's not available as a variable -const stopWords = new Set([ - "a", - "able", - "about", - "across", - "after", - "almost", - "also", - "am", - "among", - "an", - "and", - "are", - "as", - "at", - "be", - "because", - "been", - "but", - "by", - "can", - "cannot", - "could", - "dear", - "did", - "does", - "either", - "ever", - "every", - "from", - "got", - "had", - "has", - "have", - "he", - "her", - "hers", - "him", - "his", - "how", - "however", - "i", - "if", - "into", - "it", - "its", - "just", - "least", - "like", - "likely", - "may", - "me", - "might", - "most", - "must", - "my", - "neither", - "no", - "nor", - "not", - "of", - "off", - "often", - "on", - "or", - "other", - "our", - "own", - "rather", - "said", - "say", - "says", - "she", - "should", - "since", - "so", - "some", - "than", - "that", - "the", - "their", - "them", - "then", - "there", - "these", - "they", - "this", - "tis", - "to", - "too", - "twas", - "us", - "wants", - "was", - "we", - "were", - "what", - "when", - "who", - "whom", - "why", - "will", - "would", - "yet", - "you", - "your", -]); - -let index = new minisearch({ - fields: ["title", "text"], // fields to index for full-text search - storeFields: ["location", "title", "text", "category", "page"], // fields to return with search results - processTerm: (term) => { - let word = stopWords.has(term) ? null : term; - if (word) { - // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names - word = word - .replace(/^[^a-zA-Z0-9@!]+/, "") - .replace(/[^a-zA-Z0-9@!]+$/, ""); - } +}) +//////////////////////////////////////////////////////////////////////////////// +require(['jquery'], function($) { - return word ?? null; - }, - // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not find anything if searching for "add!", only for the entire qualification - tokenize: (string) => string.split(/[\s\-\.]+/), - // options which will be applied during the search - searchOptions: { - boost: { title: 100 }, - fuzzy: 2, +/* +To get an in-depth about the thought process you can refer: https://hetarth02.hashnode.dev/series/gsoc + +PSEUDOCODE: + +Searching happens automatically as the user types or adjusts the selected filters. +To preserve responsiveness, as much as possible of the slow parts of the search are done +in a web worker. Searching and result generation are done in the worker, and filtering and +DOM updates are done in the main thread. The filters are in the main thread as they should +be very quick to apply. This lets filters be changed without re-searching with minisearch +(which is possible even if filtering is on the worker thread) and also lets filters be +changed _while_ the worker is searching and without message passing (neither of which are +possible if filtering is on the worker thread) + +SEARCH WORKER: + +Import minisearch + +Build index + +On message from main thread + run search + find the first 200 unique results from each category, and compute their divs for display + note that this is necessary and sufficient information for the main thread to find the + first 200 unique results from any given filter set + post results to main thread + +MAIN: + +Launch worker + +Declare nonconstant globals (worker_is_running, last_search_text, unfiltered_results) + +On text update + if worker is not running, launch_search() + +launch_search + set worker_is_running to true, set last_search_text to the search text + post the search query to worker + +on message from worker + if last_search_text is not the same as the text in the search field, + the latest search result is not reflective of the latest search query, so update again + launch_search() + otherwise + set worker_is_running to false + + regardless, display the new search results to the user + save the unfiltered_results as a global + update_search() + +on filter click + adjust the filter selection + update_search() + +update_search + apply search filters by looping through the unfiltered_results and finding the first 200 + unique results that match the filters + + Update the DOM +*/ + +/////// SEARCH WORKER /////// + +function worker_function(documenterSearchIndex, documenterBaseURL, filters) { + importScripts( + "https://cdn.jsdelivr.net/npm/minisearch@6.1.0/dist/umd/index.min.js" + ); + + let data = documenterSearchIndex.map((x, key) => { + x["id"] = key; // minisearch requires a unique for each object + return x; + }); + + // list below is the lunr 2.1.3 list minus the intersect with names(Base) + // (all, any, get, in, is, only, which) and (do, else, for, let, where, while, with) + // ideally we'd just filter the original list but it's not available as a variable + const stopWords = new Set([ + "a", + "able", + "about", + "across", + "after", + "almost", + "also", + "am", + "among", + "an", + "and", + "are", + "as", + "at", + "be", + "because", + "been", + "but", + "by", + "can", + "cannot", + "could", + "dear", + "did", + "does", + "either", + "ever", + "every", + "from", + "got", + "had", + "has", + "have", + "he", + "her", + "hers", + "him", + "his", + "how", + "however", + "i", + "if", + "into", + "it", + "its", + "just", + "least", + "like", + "likely", + "may", + "me", + "might", + "most", + "must", + "my", + "neither", + "no", + "nor", + "not", + "of", + "off", + "often", + "on", + "or", + "other", + "our", + "own", + "rather", + "said", + "say", + "says", + "she", + "should", + "since", + "so", + "some", + "than", + "that", + "the", + "their", + "them", + "then", + "there", + "these", + "they", + "this", + "tis", + "to", + "too", + "twas", + "us", + "wants", + "was", + "we", + "were", + "what", + "when", + "who", + "whom", + "why", + "will", + "would", + "yet", + "you", + "your", + ]); + + let index = new MiniSearch({ + fields: ["title", "text"], // fields to index for full-text search + storeFields: ["location", "title", "text", "category", "page"], // fields to return with results processTerm: (term) => { let word = stopWords.has(term) ? null : term; if (word) { + // custom trimmer that doesn't strip @ and !, which are used in julia macro and function names word = word .replace(/^[^a-zA-Z0-9@!]+/, "") .replace(/[^a-zA-Z0-9@!]+$/, ""); + + word = word.toLowerCase(); } return word ?? null; }, + // add . as a separator, because otherwise "title": "Documenter.Anchors.add!", would not + // find anything if searching for "add!", only for the entire qualification tokenize: (string) => string.split(/[\s\-\.]+/), - }, -}); + // options which will be applied during the search + searchOptions: { + prefix: true, + boost: { title: 100 }, + fuzzy: 2, + }, + }); -index.addAll(data); + index.addAll(data); + + /** + * Used to map characters to HTML entities. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const htmlEscapes = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + }; + + /** + * Used to match HTML entities and HTML characters. + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + const reUnescapedHtml = /[&<>"']/g; + const reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** + * Escape function from lodash + * Refer: https://github.com/lodash/lodash/blob/main/src/escape.ts + */ + function escape(string) { + return string && reHasUnescapedHtml.test(string) + ? string.replace(reUnescapedHtml, (chr) => htmlEscapes[chr]) + : string || ""; + } -let filters = [...new Set(data.map((x) => x.category))]; -var modal_filters = make_modal_body_filters(filters); -var filter_results = []; + /** + * Make the result component given a minisearch result data object and the value + * of the search input as queryString. To view the result object structure, refer: + * https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult + * + * @param {object} result + * @param {string} querystring + * @returns string + */ + function make_search_result(result, querystring) { + let search_divider = `
`; + let display_link = + result.location.slice(Math.max(0), Math.min(50, result.location.length)) + + (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div + + if (result.page !== "") { + display_link += ` (${result.page})`; + } -$(document).on("keyup", ".documenter-search-input", function (event) { - // Adding a debounce to prevent disruptions from super-speed typing! - debounce(() => update_search(filter_results), 300); + let textindex = new RegExp(`${querystring}`, "i").exec(result.text); + let text = + textindex !== null + ? result.text.slice( + Math.max(textindex.index - 100, 0), + Math.min( + textindex.index + querystring.length + 100, + result.text.length + ) + ) + : ""; // cut-off text before and after from the match + + text = text.length ? escape(text) : ""; + + let display_result = text.length + ? "..." + + text.replace( + new RegExp(`${escape(querystring)}`, "i"), // For first occurrence + '$&' + ) + + "..." + : ""; // highlights the match + + let in_code = false; + if (!["page", "section"].includes(result.category.toLowerCase())) { + in_code = true; + } + + // We encode the full url to escape some special characters which can lead to broken links + let result_div = ` + +
+
${escape(result.title)}
+
${result.category}
+
+

+ ${display_result} +

+
+ ${display_link} +
+
+ ${search_divider} + `; + + return result_div; + } + + self.onmessage = function (e) { + let query = e.data; + let results = index.search(query, { + filter: (result) => { + // Only return relevant results + return result.score >= 1; + }, + }); + + // Pre-filter to deduplicate and limit to 200 per category to the extent + // possible without knowing what the filters are. + let filtered_results = []; + let counts = {}; + for (let filter of filters) { + counts[filter] = 0; + } + let present = {}; + + for (let result of results) { + cat = result.category; + cnt = counts[cat]; + if (cnt < 200) { + id = cat + "---" + result.location; + if (present[id]) { + continue; + } + present[id] = true; + filtered_results.push({ + location: result.location, + category: cat, + div: make_search_result(result, query), + }); + } + } + + postMessage(filtered_results); + }; +} + +// `worker = Threads.@spawn worker_function(documenterSearchIndex)`, but in JavaScript! +const filters = [ + ...new Set(documenterSearchIndex["docs"].map((x) => x.category)), +]; +const worker_str = + "(" + + worker_function.toString() + + ")(" + + JSON.stringify(documenterSearchIndex["docs"]) + + "," + + JSON.stringify(documenterBaseURL) + + "," + + JSON.stringify(filters) + + ")"; +const worker_blob = new Blob([worker_str], { type: "text/javascript" }); +const worker = new Worker(URL.createObjectURL(worker_blob)); + +/////// SEARCH MAIN /////// + +// Whether the worker is currently handling a search. This is a boolean +// as the worker only ever handles 1 or 0 searches at a time. +var worker_is_running = false; + +// The last search text that was sent to the worker. This is used to determine +// if the worker should be launched again when it reports back results. +var last_search_text = ""; + +// The results of the last search. This, in combination with the state of the filters +// in the DOM, is used compute the results to display on calls to update_search. +var unfiltered_results = []; + +// Which filter is currently selected +var selected_filter = ""; + +$(document).on("input", ".documenter-search-input", function (event) { + if (!worker_is_running) { + launch_search(); + } }); +function launch_search() { + worker_is_running = true; + last_search_text = $(".documenter-search-input").val(); + worker.postMessage(last_search_text); +} + +worker.onmessage = function (e) { + if (last_search_text !== $(".documenter-search-input").val()) { + launch_search(); + } else { + worker_is_running = false; + } + + unfiltered_results = e.data; + update_search(); +}; + $(document).on("click", ".search-filter", function () { if ($(this).hasClass("search-filter-selected")) { - $(this).removeClass("search-filter-selected"); + selected_filter = ""; } else { - $(this).addClass("search-filter-selected"); + selected_filter = $(this).text().toLowerCase(); } - // Adding a debounce to prevent disruptions from crazy clicking! - debounce(() => get_filters(), 300); + // This updates search results and toggles classes for UI: + update_search(); }); -/** - * A debounce function, takes a function and an optional timeout in milliseconds - * - * @function callback - * @param {number} timeout - */ -function debounce(callback, timeout = 300) { - clearTimeout(timer); - timer = setTimeout(callback, timeout); -} - /** * Make/Update the search component - * - * @param {string[]} selected_filters */ -function update_search(selected_filters = []) { - let initial_search_body = ` -
Type something to get started!
- `; - +function update_search() { let querystring = $(".documenter-search-input").val(); if (querystring.trim()) { - results = index.search(querystring, { - filter: (result) => { - // Filtering results - if (selected_filters.length === 0) { - return result.score >= 1; - } else { - return ( - result.score >= 1 && selected_filters.includes(result.category) - ); - } - }, - }); + if (selected_filter == "") { + results = unfiltered_results; + } else { + results = unfiltered_results.filter((result) => { + return selected_filter == result.category.toLowerCase(); + }); + } let search_result_container = ``; + let modal_filters = make_modal_body_filters(); let search_divider = `
`; if (results.length) { @@ -449,19 +690,23 @@ function update_search(selected_filters = []) { let count = 0; let search_results = ""; - results.forEach(function (result) { - if (result.location) { - // Checking for duplication of results for the same page - if (!links.includes(result.location)) { - search_results += make_search_result(result, querystring); - count++; - } - + for (var i = 0, n = results.length; i < n && count < 200; ++i) { + let result = results[i]; + if (result.location && !links.includes(result.location)) { + search_results += result.div; + count++; links.push(result.location); } - }); + } - let result_count = `
${count} result(s)
`; + if (count == 1) { + count_str = "1 result"; + } else if (count == 200) { + count_str = "200+ results"; + } else { + count_str = count + " results"; + } + let result_count = `
${count_str}
`; search_result_container = `
@@ -490,125 +735,37 @@ function update_search(selected_filters = []) { $(".search-modal-card-body").html(search_result_container); } else { - filter_results = []; - modal_filters = make_modal_body_filters(filters, filter_results); - if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) { $(".search-modal-card-body").addClass("is-justify-content-center"); } - $(".search-modal-card-body").html(initial_search_body); + $(".search-modal-card-body").html(` +
Type something to get started!
+ `); } } /** * Make the modal filter html * - * @param {string[]} filters - * @param {string[]} selected_filters * @returns string */ -function make_modal_body_filters(filters, selected_filters = []) { - let str = ``; - - filters.forEach((val) => { - if (selected_filters.includes(val)) { - str += `${val}`; - } else { - str += `${val}`; - } - }); +function make_modal_body_filters() { + let str = filters + .map((val) => { + if (selected_filter == val.toLowerCase()) { + return `${val}`; + } else { + return `${val}`; + } + }) + .join(""); - let filter_html = ` + return `
Filters: ${str} -
- `; - - return filter_html; -} - -/** - * Make the result component given a minisearch result data object and the value of the search input as queryString. - * To view the result object structure, refer: https://lucaong.github.io/minisearch/modules/_minisearch_.html#searchresult - * - * @param {object} result - * @param {string} querystring - * @returns string - */ -function make_search_result(result, querystring) { - let search_divider = `
`; - let display_link = - result.location.slice(Math.max(0), Math.min(50, result.location.length)) + - (result.location.length > 30 ? "..." : ""); // To cut-off the link because it messes with the overflow of the whole div - - if (result.page !== "") { - display_link += ` (${result.page})`; - } - - let textindex = new RegExp(`\\b${querystring}\\b`, "i").exec(result.text); - let text = - textindex !== null - ? result.text.slice( - Math.max(textindex.index - 100, 0), - Math.min( - textindex.index + querystring.length + 100, - result.text.length - ) - ) - : ""; // cut-off text before and after from the match - - let display_result = text.length - ? "..." + - text.replace( - new RegExp(`\\b${querystring}\\b`, "i"), // For first occurrence - '$&' - ) + - "..." - : ""; // highlights the match - - let in_code = false; - if (!["page", "section"].includes(result.category.toLowerCase())) { - in_code = true; - } - - // We encode the full url to escape some special characters which can lead to broken links - let result_div = ` - -
-
${result.title}
-
${result.category}
-
-

- ${display_result} -

-
- ${display_link} -
-
- ${search_divider} - `; - - return result_div; -} - -/** - * Get selected filters, remake the filter html and lastly update the search modal - */ -function get_filters() { - let ele = $(".search-filters .search-filter-selected").get(); - filter_results = ele.map((x) => $(x).text().toLowerCase()); - modal_filters = make_modal_body_filters(filters, filter_results); - update_search(filter_results); +
`; } }) @@ -635,103 +792,107 @@ $(document).ready(function () { //////////////////////////////////////////////////////////////////////////////// require(['jquery'], function($) { -let search_modal_header = ` - -`; - -let initial_search_body = ` -
Type something to get started!
-`; - -let search_modal_footer = ` - -`; - -$(document.body).append( - ` - +project file. diff --git a/dev/input/input/index.html b/dev/input/input/index.html index 19abe3b09..587027924 100644 --- a/dev/input/input/index.html +++ b/dev/input/input/index.html @@ -9,10 +9,10 @@ x1'(t) = a * x1(t) + u(t), x2'(t) = b * x2(t) + c*x1(t)*x2(t), y(t) = x1(t) -)

Here,

source
StructuralIdentifiability.ODEType

The main structure that represents input ODE system.

Stores information about states (x_vars), outputs (y_vars), inputs (u_vars), parameters (parameters) and the equations.

This structure is constructed via @ODEmodel macro.

source
StructuralIdentifiability.set_parameter_valuesFunction
set_parameter_values(ode, param_values)

Input:

  • ode - an ODE as above
  • param_values - values for (possibly, some of) the parameters as dictionary parameter => value

Output:

  • new ode with the parameters in param_values plugged with the given numbers
source

Create Compartmental Model

StructuralIdentifiability.linear_compartment_modelFunction
linear_compartment_model(graph, inputs, outputs, leaks)

Input: defines a linear compartment model with nodes numbered from 1 to n by

  • graph - and array of integer arrays representing the adjacency lists of the graph
  • inputs - array of input nodes
  • outputs - array of output nodes
  • leaks - array of sink nodes

Output:

  • the corresponding ODE system in the notation of https://doi.org/10.1007/s11538-015-0098-0
source

Discrete-time systems

StructuralIdentifiability.@DDSmodelMacro
macro DDSmodel

Macro for creating a DDS (discrete dynamical system) from a list of equations. It also injects all variables into the global scope.

Example

Creating a simple DDS:

using StructuralIdentifiability
+)

Here,

  • x1, x2 are state variables
  • y is an output variable
  • u is an input variable
  • a, b, c are time-independent parameters
source
StructuralIdentifiability.ODEType

The main structure that represents input ODE system.

Stores information about states (x_vars), outputs (y_vars), inputs (u_vars), parameters (parameters) and the equations.

This structure is constructed via @ODEmodel macro.

source
StructuralIdentifiability.set_parameter_valuesFunction
set_parameter_values(ode, param_values)

Input:

  • ode - an ODE as above
  • param_values - values for (possibly, some of) the parameters as dictionary parameter => value

Output:

  • new ode with the parameters in param_values plugged with the given numbers
source

Create Compartmental Model

StructuralIdentifiability.linear_compartment_modelFunction
linear_compartment_model(graph, inputs, outputs, leaks)

Input: defines a linear compartment model with nodes numbered from 1 to n by

  • graph - and array of integer arrays representing the adjacency lists of the graph
  • inputs - array of input nodes
  • outputs - array of output nodes
  • leaks - array of sink nodes

Output:

  • the corresponding ODE system in the notation of https://doi.org/10.1007/s11538-015-0098-0
source

Discrete-time systems

StructuralIdentifiability.@DDSmodelMacro
macro DDSmodel

Macro for creating a DDS (discrete dynamical system) from a list of equations. It also injects all variables into the global scope.

Example

Creating a simple DDS:

using StructuralIdentifiability
 
 dds = @DDSmodel(
     x1(t + 1) = a * x1(t) + u(t),
     x2(t + 1) = b * x2(t) + c*x1(t)*x2(t),
     y(t) = x1(t)
-)

Here,

  • x1, x2 are state variables
  • y is an output variable
  • u is an input variable
  • a, b, c are time-independent parameters
source
+)

Here,

source diff --git a/dev/ioequations/ioequations/index.html b/dev/ioequations/ioequations/index.html index cfb888717..796eb6358 100644 --- a/dev/ioequations/ioequations/index.html +++ b/dev/ioequations/ioequations/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Finding Input-Output Equations

StructuralIdentifiability.find_ioequationsFunction
find_ioequations(ode, [var_change_policy=:default])

Finds the input-output equations of an ODE system Input:

  • ode - the ODE system
  • var_change_policy - whether to perform automatic variable change, can be one of :default, :yes, :no
  • loglevel - logging level (default: Logging.Info)

Output:

  • a dictionary from “leaders” to the corresponding input-output equations; if an extra projection is needed, it will be the value corresponding to rand_proj_var
source

Reducing with respect to Input-Output Equations

StructuralIdentifiability.PBRepresentationType

The structure for storing a projection-based representation of differential ideal (see Section 2.3 https://arxiv.org/abs/2111.00991). Contains the following fields:

  • y_names - the names of the variables with finite order in the profile (typically, outputs)
  • u_names - the names of the variables with infinite order in the profile (typically, inputs)
  • param_names - the names of the parameters
  • profile - the profile of the PB-representation (see Definition 2.13) as a dict from y_names with finite orders to the orders
  • projections - the corresponding projections (see Definition 2.15) as a dict from y_names to the projections
source
StructuralIdentifiability.pseudodivisionFunction
pseudodivision(f, g, x)

Computes the result of pseudodivision of f by g as univariate polynomials in x Input:

  • f - the polynomial to be divided
  • g - the polynomial to divide by
  • x - the variable for the division

Output: the pseudoremainder of f divided by g w.r.t. x

source
StructuralIdentifiability.diffreduceFunction
diffreduce(diffpoly, pbr)

Computes the result of differential reduction of a differential polynomial diffpoly with respect to the charset defined by a PB-representation pbr Input:

  • diffpoly - a polynomial representing a differential polynomial to be reduced
  • pbr - a projection-based representation

Output: the result of differential reduction of diffpoly by pbr considered as a characteristic set (see Remark 2.20 in the paper)

source
+

Finding Input-Output Equations

StructuralIdentifiability.find_ioequationsFunction
find_ioequations(ode, [var_change_policy=:default])

Finds the input-output equations of an ODE system Input:

  • ode - the ODE system
  • var_change_policy - whether to perform automatic variable change, can be one of :default, :yes, :no
  • loglevel - logging level (default: Logging.Info)

Output:

  • a dictionary from “leaders” to the corresponding input-output equations; if an extra projection is needed, it will be the value corresponding to rand_proj_var
source

Reducing with respect to Input-Output Equations

StructuralIdentifiability.PBRepresentationType

The structure for storing a projection-based representation of differential ideal (see Section 2.3 https://arxiv.org/abs/2111.00991). Contains the following fields:

  • y_names - the names of the variables with finite order in the profile (typically, outputs)
  • u_names - the names of the variables with infinite order in the profile (typically, inputs)
  • param_names - the names of the parameters
  • profile - the profile of the PB-representation (see Definition 2.13) as a dict from y_names with finite orders to the orders
  • projections - the corresponding projections (see Definition 2.15) as a dict from y_names to the projections
source
StructuralIdentifiability.pseudodivisionFunction
pseudodivision(f, g, x)

Computes the result of pseudodivision of f by g as univariate polynomials in x Input:

  • f - the polynomial to be divided
  • g - the polynomial to divide by
  • x - the variable for the division

Output: the pseudoremainder of f divided by g w.r.t. x

source
StructuralIdentifiability.diffreduceFunction
diffreduce(diffpoly, pbr)

Computes the result of differential reduction of a differential polynomial diffpoly with respect to the charset defined by a PB-representation pbr Input:

  • diffpoly - a polynomial representing a differential polynomial to be reduced
  • pbr - a projection-based representation

Output: the result of differential reduction of diffpoly by pbr considered as a characteristic set (see Remark 2.20 in the paper)

source
diff --git a/dev/objects.inv b/dev/objects.inv new file mode 100644 index 0000000000000000000000000000000000000000..906517187d056654a2895c1ac929857533ec3eb0 GIT binary patch literal 2939 zcmV->3xxC|AX9K?X>NERX>N99Zgg*Qc_4OWa&u{KZXhxWBOp+6Z)#;@bUGkYbaHiL zbairJY)NEgZggp8X<=e%Y-x0PE^2HFBOq2~a&u{KZaN?^E;TMR3L_v?Xk{RBWo=<; zZe(S0Aa78b#rNMXCQiPX<{x4c%0o^ZExc? z68`RA!NXpF7Kqln+r_mF`r-202Iy|m*xSQ>A{3cU*hr!)QBJ%;{`(DIBvBGc$uDWr z0~Q;bqK4#f=9y=PG)-sZ0p)ylFk=x4-Xru2OUQ^9oMkkO^Kq1skkj-Avl%h_*?Wx9 zvHpfGPEOHem2;99(&&t&oX%-@O=HSec7d%$uh^;tU<;Imz?3enthSu&7ul1AE5ubQ>dOFKx|F8H;l*|3>b3{{Z%W zrNwxMATdp7+S$0y!!bIozvy>cK3O%6rT3YmEZ9BCa85Exax9y=FLwLDUW+y~k!?+Z z8BIdFGO9=Lde!UrmPB{u%l8>dkk!dJkMl@JAq z`REK_vdBmtyD>5r0kQCfgej8*YUyz6goCW5}g42dl zDtRuoz&NE`B;+D3S4`Kcv3yj4l7Ov1Ie&XJ11w;K#v2+g@{!a=@C%6-^CAw;8h~6$ zGWGxjDFy0R4A@mp7POo!kVa#Z=WtdS!RxNofI{mEmD*#r^w5KIVwVRX-7)1gI+!LB zjM__P^Pmwl0u?j@9WX_ADE=R%9j54(g){OWbBr zBM-=HV^2wI0sz)P`LIiy4L$^-Y>ddN;+oMk_bmWM6KF=`8nmO5fg_ZAXpG_9&OwX| zHlj#`qV7_5p9VCga=3`4Givd0&kE$GN?AzCLRuE8WsOcB!ekMXgJ5#{<@_p0#I#%k zbP3QK{rcW_hYbOxR3sabY#hl*7^p}XRH49TNR~JXi)lpCI+UD{IjjrxRY-4;iiHot z>h35XYGb7oB&DF1lu=1s1CzMAK)06%S3v1z!d9ntyPln&!8ksKc1FPrKxJD7KrO}< z@6<|c1aO!Qs}-~!j3zuQB8cx{+*;e)KVl2cS4IL6P}!(9mwyAMsP9P_Wo($aIHm1< zeAkj!*%fqEexNO^8W_orql+cUmXzGD;e29Y6+sd)RZ)V8jZ!pu6};+UR^6;-%}G_H zHBhA0>f;s16|UW8xpj0qjN@RsS^#7K0PilyfmkHP3S@4_I?abRw^>bt+D5DMzCbcN zP5r#g&zdMUXw*H+?i8aHwkTq2u04a;w64*v!J32!MP7xCiWpmoP*Ix%$1H)3<_RpP zjC|gCtJhHDHHE38(^j_DnxL7lNn5HwY5?#K;fp0$*(!HT}*RWN$g^i zWlHiZ&3Wf>nU9EvBdLqPUU+C}#Oh;e3p$U4>t;;kBQ}$jb94h|sd|E!VHSKzLEhuE zfH3}e`LvJpr+uXU9j2?NCv*?6LD1z-2j3iCgVBT$Ka6k4br!z;bjjk?6=?A^CduPZ z2kqx)l*BXf?CD$dM|=QlxMeeBwSu)~y!ZW)oGJXh-247y@5Axlhj(?0{M!5jD-j(< z-*<97^3iw4z-fTndDjIZRY&LQq}U(5Y6l=pIi9l&A76Yrx|j%clvDv(fZHc4l=#-E zwlpOU@Dkq`kw9o%S1+2vE#U4Gc0)Lxk(-PV3>+9ojLhdb{YtD--D#&+zqtt7IA?Jo zq&WkP`7hZF* zUZ0qDTGR>~oyFp7|Cu`4s~4xGLy1hKlUOm2}z0}&P?T30uuO$Ezn_;u=)$$8B z#q~+e!Gtvo!$vK`xF8+L&FJWpR`XG9jUYL@c?7nWY4eb@vL(|k&t#<421}XnK}a2- zw?$5h8Jp21&Bc0lqBZg$w^MmMjVL_L-7%-~Ni*hnO~T?ystUHrl!gSArq?(Eihs&J zeI?-?xOD;VQ*Otx&+6kxK$_>&l4BxP6@4z7K9;_`bG<~jjOD~(IR=!!3cg}a)@xH1 z2!3gr0v=B?9?}%gLoqqcI5kZ9)%lqu?Co#A)jG5Vx<146P5_qJr-Jq*h6D^DPoNp* z3}{N47D-+%80=|-MYtu370502L$S#Q22&b{08T#hlH5jSqZ=)DO-cg_*nrRcU3pF< z({6$@=^((EMYzV-tA?E%tt#^XyORL9j~tCn_&i!|VEFzy8QXcZ>g=BIiwXnfhoPOE z$O&ukY0ylp308TBH6?Krz`O)~M(1+}Y{GY0#D z-)VqOdu^cg%Sdf>{=Z$ICmi<0LN8v->H}0xFjEIjHdJ<=hWVu9OkCt37;s#ByTJzdIOKbQ=i(}uj21CVkR&YT@p-|VQi8HM>TU8 zY3RsoS7UnATf!$zmpCQ&oTZp@q6$T8MyshOFifA!c+fcj*ub)FCjskOcK^~hj3Cni zAUw5!$kchHu#JNaz5t7^!aS_Y~X3uMLjkU-pdM zy@=f(vA>41aee1PT)(L9Vl*~Q8C-P}VjsPKGPbeGAU3i@*U*NlODk;NF_2n#Z}aeJ zm%;Z$v=sC32B)y&)(p1%t*F=XX|jmvd}S-Wy2$pfuySBE);dK~&rWvzmjP*RWPkQs z)YhND`D9)mi5~!vT>RjotWlJ-b+hB3$tqrwTwud1DYM%r^s<$9QTo6k$1}h@w}MK@ l_ub}r&g-q6Ne)q36UK*J`FJ+IadLP*`ENhn_#bry^!!CXo=gA$ literal 0 HcmV?d00001 diff --git a/dev/search_index.js b/dev/search_index.js index 90481f2ef..199336045 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"tutorials/reparametrization/#Reparametrizations","page":"Reparametrizations","title":"Reparametrizations","text":"","category":"section"},{"location":"tutorials/reparametrization/#Overview","page":"Reparametrizations","title":"Overview","text":"","category":"section"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Once one has found that not all parameters and/or states of the model at hand are identifiable, one natural desire is to reparametrize the model into a one with better identifiability properties. StructuralIdentifiability offers such a functionality via the function reparametrize_global. It takes as input an ODE model and produces its transformation into another model with the same input-output behaviour but with the states and parameters being globally identifiable. Note that, in general, such a transformation may not exist in the class of rational models, so sometimes the function returns an ODE not on the whole affine space but on a manifold.","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"More precisely, the function returns a dictionary with three keys:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":":new_vars is a dictionary which maps the new parameters and new states into the formulas expressing them in terms of the original parameters and states;\n:new_ode is the ODE satisfied by these new states (and the expression of the output in terms of the new states);\n:implicit_relations is a list of algebraic relations between the new states and parameters. Being nonempty, this is exactly the list of equations defining the manifold, on which the new ODE model is defined. In many interesting cases, however, this list is empty meaning that the new ODE is a standard rational ODE model.","category":"page"},{"location":"tutorials/reparametrization/#Example:-SEUIR-model","page":"Reparametrizations","title":"Example: SEUIR model","text":"","category":"section"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Consider a SEUIR epidemiological model from[1]:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"begincases\nS(t) = -beta frac(U(t) + I(t))S(t)N\nE(t) = beta frac(U(t) + I(t))S(t)N - gamma E(t)\nU(t) = (1 - alpha) gamma E(t) - delta U(t)\nI(t) = alpha gamma E(t) - delta I(t)\nR(t) = delta(U(t) + I(t))\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In this model S is, as usually, the number of susceptible people, E is the number of people exposed to virus but not yet infected (as in a simple SEIR model[1]), and I and U correspond to number of infected people who report the infection and who do not, respectively. We define the model but omit R compartment since it does not affect the output dynamics:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n S'(t) = -b * (U(t) + I(t)) * S(t) / N,\n E'(t) = b * (U(t) + I(t)) * S(t) / N - g * E(t),\n U'(t) = (1 - a) * g * E(t) - d * U(t),\n I'(t) = a * g * E(t) - d * I(t),\n y(t) = I(t)\n)","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Majority of the states and parameters are not identifiable in this case:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"assess_identifiability(ode)","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Let us attempt to reparametrize the model, and print new variables:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"reparam = reparametrize_global(ode)\n@assert isempty(reparam[:implicit_relations]) # checking that the result is an ODE on the whole space, not on a manifold\nreparam[:new_vars]","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In these new variables and parameters, the original ODE can be rewritten as follows:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"reparam[:new_ode]","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In order to analyze this result, let us give more interpretable names to the new variables and parameters:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"I = I widetildeE = alpha E widetildeS = alpha widetildeI = alpha (I + U) gamma = gammadelta = deltawidetildebeta = fracbetaalpha N","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Then the reparametrize system becomes","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"begincases\nwidetildeS(t) = -widetildebeta widetildeS(t) widetildeI(t)\nwidetildeE(t) = widetildebeta widetildeS(t) widetildeI(t) - gamma widetildeE(t)\nwidetildeI(t) = -delta widetildeI(t) + gammawidetildeE(t)\nI(t) = gammawidetildeE(t) - delta I(t)\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"This reparametrization not only reduces the dimension of the parameter space from 5 to 3 but reveals interesting structural properties of the model:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"The first three equations form a self-contained model which is equivalent to a simple SEIR model, so the model gets \"decomposed\";\nNew variables widetildeS, widetildeE, widetildeI are obtained from S, E, and I by scaling by alpha which is the ratio of people who report being infected. One can interpret this as there is a part of population who would report infection and the other part who would not. Ultimately, we can model only the ones who would as this is mainly they who contribute to the output.","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Finally, we can check that the new model is indeed globally identifiable:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"assess_identifiability(reparam[:new_ode])","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"[1]: T. Sauer, T. Berry, D. Ebeigbe, M. Norton, A. Whalen, S. Schiff, Identifiability of infection model parameters early in an epidemic, SIAM Journal on Control and Optimization, 2022;","category":"page"},{"location":"utils/ode/#Functions-to-work-with-the-ODE-structure","page":"ODE Tools","title":"Functions to work with the ODE structure","text":"","category":"section"},{"location":"utils/ode/","page":"ODE Tools","title":"ODE Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"ODE.jl\", \"submodels.jl\"]\nOrder = [:function]","category":"page"},{"location":"utils/ode/#StructuralIdentifiability._reduce_mod_p-Tuple{Nemo.QQMPolyRingElem, Int64}","page":"ODE Tools","title":"StructuralIdentifiability._reduce_mod_p","text":"_reduce_mod_p(f, p)\n\nReduces a polynomial/rational function over Q modulo p\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.power_series_solution-Union{Tuple{P}, Tuple{T}, Tuple{ODE{P}, Dict{P, T}, Dict{P, T}, Dict{P, Vector{T}}, Int64}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"ODE Tools","title":"StructuralIdentifiability.power_series_solution","text":"power_series_solution(ode, param_values, initial_conditions, input_values, prec)\n\nInput:\n\node - an ode to solve\nparam_values - parameter values, must be a dictionary mapping parameter to a value\ninitial_conditions - initial conditions of ode, must be a dictionary mapping state variable to a value\ninput_values - power series for the inputs presented as a dictionary variable => list of coefficients\nprec - the precision of solutions\n\nOutput:\n\ncomputes a power series solution with precision prec presented as a dictionary variable => corresponding coordinate of the solution\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.reduce_ode_mod_p-Tuple{ODE{<:AbstractAlgebra.MPolyRingElem{Nemo.QQFieldElem}}, Int64}","page":"ODE Tools","title":"StructuralIdentifiability.reduce_ode_mod_p","text":"reduce_ode_mod_p(ode, p)\n\nInput: ode is an ODE over QQ, p is a prime number Output: the reduction mod p, throws an exception if p divides one of the denominators\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.set_parameter_values-Union{Tuple{P}, Tuple{T}, Tuple{ODE{P}, Dict{P, T}}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"ODE Tools","title":"StructuralIdentifiability.set_parameter_values","text":"set_parameter_values(ode, param_values)\n\nInput:\n\node - an ODE as above\nparam_values - values for (possibly, some of) the parameters as dictionary parameter => value\n\nOutput:\n\nnew ode with the parameters in param_values plugged with the given numbers\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.find_submodels-Union{Tuple{ODE{P}}, Tuple{P}} where P<:AbstractAlgebra.MPolyRingElem","page":"ODE Tools","title":"StructuralIdentifiability.find_submodels","text":"find_submodels(ode)\n\nThe function calculates and returns all valid submodels given a system of ODEs.\n\nInput:\n\node - an ODEs system to be studied\n\nOutput: \n\nA list of submodels represented as ode objects\n\nExample:\n\n>ode = @ODEmodel(x1'(t) = x1(t)^2, \n x2'(t) = x1(t) * x2(t), \n y1(t) = x1(t), \n y2(t) = x2(t))\n>find_submodels(ode)\n ODE{QQMPolyRingElem}[\n \n x1'(t) = a(t)*x2(t)^2 + x1(t)\n y1(t) = x1(t)\n ]\n\n\n\n\n\n","category":"method"},{"location":"utils/primality/#Primality-Checks","page":"Primality Checks","title":"Primality Checks","text":"","category":"section"},{"location":"utils/primality/","page":"Primality Checks","title":"Primality Checks","text":"Pages=[\"primality.md\"]","category":"page"},{"location":"utils/primality/","page":"Primality Checks","title":"Primality Checks","text":"StructuralIdentifiability.check_primality","category":"page"},{"location":"utils/primality/#StructuralIdentifiability.check_primality","page":"Primality Checks","title":"StructuralIdentifiability.check_primality","text":"check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem}, extra_relations::Array{QQMPolyRingElem, 1})\n\nThe function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.\n\nThe extra_relations allows adding more polynomials to the generators (not affecting the saturation).\n\n\n\n\n\ncheck_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem})\n\nThe function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.\n\n\n\n\n\n","category":"function"},{"location":"tutorials/identifiable_functions/#Globally-Identifiable-Functions","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"","category":"section"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"In addition to assessing identifiabuility of given functions of parameters or states, StructuralIdentifiability.jl provides the function find_identifiable_functions which finds a set of identifiable functions such that any other identifiable function can be expressed using them. This allows to find out what actually is identifiable and what does non-identifiability in the model at hand looks like.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"For example, consider the following model[1].","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"using StructuralIdentifiability # hide\nLLW1987 = @ODEmodel(\n x1'(t) = -p1 * x1(t) + p2 * u(t),\n x2'(t) = -p3 * x2(t) + p4 * u(t),\n x3'(t) = -(p1 + p3) * x3(t) + (p4 * x1(t) + p2 * x2(t)) * u(t),\n y1(t) = x3(t)\n)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Several decades ago, this model was introduced to demonstrate the presence of nontrivial unidentifiability in nonlinear systems of ODEs. Nowadays, we can automatically find the identifiable combinations of parameters:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"using StructuralIdentifiability # hide\nfind_identifiable_functions(LLW1987)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"From these expressions, we see that the values of p1 and p3 are not identifiable but an unordered pair of numbers {p1, p3} is uniquely determined since p1 + p3 and p1 * p3 are known. Furthermore, we see that, for fixed input and output, p2 and p4 can take infinitely many values but knowing one of them, we would also be able to determine the other.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Moreover, we can find generators of all identifiable functions in parameters and states:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"find_identifiable_functions(LLW1987, with_states = true)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"By default, find_identifiable_functions tries to simplify the output functions as much as possible, and it has simplify keyword responsible for the degree of simplification. The default value is :standard but one could use :strong to try to simplify further (at the expense of heavier computation) or use :weak to simplify less (but compute faster).","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"As assess_identifiability and assess_local_identifiability, find_identifiable_functions accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Finally, as for assess_identifiability, an experimental feature allows to provide an additional keyword argument known_ic to inidcate functions of states and parameters for which the initial conditions are assumed to be known (while the initial conditions of the system are still assumed to be generic). In this case, the function will find identifiable functions of parameters and initial conditions rather than of parameters and states. Let us add an assumption that the initial condition x1(0) is known:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"find_identifiable_functions(LLW1987, known_ic = [x1])","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"We see that x2(0) becomes an identifiable function as well, which is natural since x1(t) * x2(t) was an identifiable function before.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"[1]: Y. Lecourtier, F. Lamnabhi-Lagarrigue, and E. Walter, A method to prove that nonlinear models can be unidentifiable, Proceedings of the 26th Conference on Decision and Control, December 1987, 2144-2145;","category":"page"},{"location":"tutorials/identifiability/#Identifiability-of-Differential-Models-(Local-and-Global)","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Recall that we consider ODE models in the state-space form","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"begincases\nmathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"where mathbfx(t) mathbfy(t), and mathbfu(t) are time-dependent states, outputs, and inputs, respectively, and mathbfp are scalar parameters. We will call that a parameter or a states (or a function of them) is identifiable if its value can be recovered from time series for inputs and outputs. Typically, two types of identifiability are distinguished","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"local identifiability: the value can be recovered up to finitely many options;\nglobal identifiability: the value can be recovered uniquely.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Note that in the case of states, term observability it typically used. We will use identifiability for both states and parameters for brevity and uniformity. While the notion of global identifiability is much more precise, assessing local identifiability is typically much faster, and can be performed for the models whose global identifiability analysis is out of reach.","category":"page"},{"location":"tutorials/identifiability/#Local-identifiability","page":"Identifiability of Differential Models (Local and Global)","title":"Local identifiability","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"We consider the Lotka-Volterra model:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"begincases\nx_1(t) = a x_1(t) - b x_1(t) x_2(t) + u(t)\nx_2(t) = -c x_2(t) + d x_1(t) x_2(t)\ny(t) = x_1(t)\nendcases","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"The local identifiability of all parameters and states in this model can be assessed as follows","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) - b * x1(t) * x2(t) + u(t),\n x2'(t) = -c * x2(t) + d * x1(t) * x2(t),\n y(t) = x1(t)\n)\n\nassess_local_identifiability(ode)","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"We see that x_1(t) is locally identifiable (no surprises, this is an output), a c and d are identifiable as well. On the other hand, x_2(t) and b are nonidentifiable. This can be explained by the following scaling symmetry","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"x_2(t) to lambda x_2(t) quad b to fracblambda","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"which preserves input and output for every nonzero lambda. The algorithm behind this call is the one due to Sedoglavic[1].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Function assess_local_identifiability has several optional parameters","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"funcs_to_check a list of specific functions of parameters and states to check identifiability for (see an example below). If not provided, the identifiability is assessed for all parameters and states.\nprob_threshold (default 099, i.e. 99%) is the probability of correctness. The algorithm can, in theory, produce wrong result, but the probability that it is correct is guaranteed to be at least prob_threshold. However, the probability bounds we use are quite conservative, so the actual probability of correctness is likely to be much higher.\ntype (default :SE). By default, the algorithm checks the standard single-experiment identifiability. If one sets type = :ME, then the algorithm checks multi-experiment identifiability, that is, identifiability from several experiments with independent initial conditions (the algorithm from [2] is used).\nloglevel (default Logging.Info). The minimal level of logging messages to be displayed. Available options: Logging.Debug, Logging.Info, Logging.Warn, and Logging.Error.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Note that the scaling symmetry given above suggests that b x_2(t) may in fact be identifiable. This can be checked using funcs_to_check parameter:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_local_identifiability(ode, funcs_to_check = [b * x2])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Indeed!","category":"page"},{"location":"tutorials/identifiability/#Global-identifiability","page":"Identifiability of Differential Models (Local and Global)","title":"Global identifiability","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"One can obtain more refined information about a model using assess_identifiability function. We will showcase it using the Goodwin oscillator model [3].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = -b * x1(t) + 1 / (c + x4(t)),\n x2'(t) = alpha * x1(t) - beta * x2(t),\n x3'(t) = gama * x2(t) - delta * x3(t),\n x4'(t) = sigma * x4(t) * (gama * x2(t) - delta * x3(t)) / x3(t),\n y(t) = x1(t)\n)\n\nassess_identifiability(ode)","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"As a result, each parameter/state is assigned one of the labels :globally (globally identifiable), :locally (locally but not globally identifiable), or :nonidentifiable (not identifiable, even locally). The algorithm behind this computation follows [4].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Similarly to assess_local_identifiability, this function has optional parameters:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"funcs_to_check a list of specific functions of parameters and states to check identifiability for (see an example below). If not provided, the identifiability is assessed for all parameters and states. Note that the computations for states may be more involved than for the parameters, so one may want to call the function with funcs_to_check = ode.parameters if the call assess_identifiability(ode) takes too long.\nprob_threshold (default 099, i.e. 99%) is the probability of correctness. Same story as above: the probability estimates are very conservative, so the actual error probability is much lower than 1%. Also, currently, the probability of correctness does not include the probability of correctness of the modular reconstruction for Groebner bases. This probability is ensured by an additional check modulo a large prime, and can be neglected for practical purposes.\nloglevel (default Logging.Info). The minimal level of logging messages to be displayed. Available options: Logging.Debug, Logging.Info, Logging.Warn, and Logging.Error.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Using funcs_to_check parameter, one can further inverstigate the nature of the lack of identifiability in the model at hand. For example, for the Goodwin oscillator, we can check if beta + delta and beta * delta are identifiable:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_identifiability(ode, funcs_to_check = [beta + delta, beta * delta])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"And we see that they indeed are. This means, in particular, that the reason why beta and delta are not identifiable is because their values can be exchanged. One may wonder how could we guess these functions beta + delta, beta * delta. In fact, they can be just computed using find_identifiable_functions function as we will explain in the next tutorial. Stay tuned!","category":"page"},{"location":"tutorials/identifiability/#Assuming-known-initial-conditions","page":"Identifiability of Differential Models (Local and Global)","title":"Assuming known initial conditions","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"An experimental feature allows to provide an additional keyword argument known_ic to inidcate functions of states and parameters for which the initial conditions are assumed to be known (while the initial conditions of the system are still assumed to be generic). In this case, the identifiability will be assessed for parameters and all the initial conditions or for the initial conditions of funcs_to_check. Let us add an assumption that the initial conditions x2(0) and x3(0) are known:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_identifiability(ode, known_ic = [x2, x3])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"And we see that now alpha and gama become locally identifiable.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[1]: A. Sedoglavic, A probabilistic algorithm to test local algebraic observability in polynomial time, Journal of Symbolic Computation, 2002.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[2]: A. Ovchinnikov, A. Pillay, G. Pogudin, T. Scanlon, Multi-experiment Parameter Identifiability of ODEs and Model Theory, SIAM Journal on Applied Algebra and Geometry, 2022.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[3]: D. Gonze, P. Ruoff, The Goodwin Oscillator and its Legacy, Acta Biotheoretica, 2020.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[4]: R. Dong, C. Goodbrake, H. Harrington, G. Pogudin, Differential elimination for dynamical models via projections with applications to structural identifiability, SIAM Journal on Applied Algebra and Geometry, 2023.","category":"page"},{"location":"export/export/#Exporting-to-Other-Systems","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"","category":"section"},{"location":"export/export/","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"Here we put some helpful utilities to export your code to other identifiability software.","category":"page"},{"location":"export/export/","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"print_for_maple\nprint_for_DAISY\nprint_for_GenSSI\nprint_for_COMBOS","category":"page"},{"location":"export/export/#StructuralIdentifiability.print_for_maple","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_maple","text":"print_for_maple(ode, package)\n\nPrints the ODE in the format accepted by maple packages\n\nSIAN (https://github.com/pogudingleb/SIAN) if package=:SIAN\nDifferentialAlgebra if package=:DifferentialAlgebra\nDifferentialThomas if package=:DifferentialThomas\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_DAISY","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_DAISY","text":"print_for_DAISY(ode)\n\nPrints the ODE in the format accepted by DAISY (https://daisy.dei.unipd.it/)\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_GenSSI","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_GenSSI","text":"print_for_GenSSI(ode)\n\nPrints the ODE in the format accepted by GenSSI 2.0 (https://github.com/genssi-developer/GenSSI)\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_COMBOS","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_COMBOS","text":"print_for_COMBOS(ode)\n\nPrints the ODE in the format accepted by COMBOS (http://biocyb1.cs.ucla.edu/combos/)\n\n\n\n\n\n","category":"function"},{"location":"utils/util/#Other-Helpful-Functions","page":"Other Utilities","title":"Other Helpful Functions","text":"","category":"section"},{"location":"utils/util/","page":"Other Utilities","title":"Other Utilities","text":"Pages=[\"util.md\"]","category":"page"},{"location":"utils/util/","page":"Other Utilities","title":"Other Utilities","text":"Modules = [StructuralIdentifiability]\nPages = [\"util.jl\"]","category":"page"},{"location":"utils/util/#StructuralIdentifiability.compare_rational_func_by-Union{Tuple{By}, Tuple{Any, Any, By}, Tuple{Any, Any, By, Any}} where By","page":"Other Utilities","title":"StructuralIdentifiability.compare_rational_func_by","text":"compare_rational_func_by(f, g, by)\n\nReturns \n\n-1 if f < g,\n0 if f = g, and \n1 if f > g.\n\nFunctions' numerators and denominators are compared using by.\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.decompose_derivative-Tuple{String, Array{String}}","page":"Other Utilities","title":"StructuralIdentifiability.decompose_derivative","text":"decompose_derivative(varname, prefixes)\n\nDetermines if it is possible to represent the varname as a_number where a is an element of prefixes If yes, returns a pair (a, number), otherwise nothing\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.dennums_to_fractions-Union{Tuple{Array{Vector{T}, 1}}, Tuple{T}} where T","page":"Other Utilities","title":"StructuralIdentifiability.dennums_to_fractions","text":"dennums_to_fractions(dennums)\n\nReturns the field generators represented by fractions.\n\nInput: an array of arrays of polynomials, as in [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]\n\nOutput: an array of fractions [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.eval_at_dict-Union{Tuple{P}, Tuple{P, Dict{P, <:AbstractAlgebra.RingElem}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.eval_at_dict","text":"eval_at_dict(f, d)\n\nEvaluates a polynomial/rational function on a dictionary of type var => val and missing values are replaced with zeroes\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.extract_coefficients-Union{Tuple{P}, Tuple{P, Vector{P}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.extract_coefficients","text":"extract_coefficients(poly, variables)\n\nInput:\n\npoly - multivariate polynomial\nvariables - a list of variables from the generators of the ring of p\n\nOutput:\n\ndictionary with keys being tuples of length length(variables) and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.fractions_to_dennums-Tuple{Any}","page":"Other Utilities","title":"StructuralIdentifiability.fractions_to_dennums","text":"fractions_to_dennums(fractions)\n\nReturns the field generators represented by lists of denominators and numerators.\n\nInput: an array of fractions, as in [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]\n\nOutput: an array of arrays of polynomials, [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.gen_tag_name","page":"Other Utilities","title":"StructuralIdentifiability.gen_tag_name","text":"gen_tag_name(base; stop_words)\ngen_tag_names(n, base; stop_words)\n\nGenerates a string which will not collide with the words in stop_words.\n\nArguments\n\nn: Generates a sequence of unique strings of length n\nbase: A string or a vector of strings, the base for the generated sequence\nstop_words: A vector of strings, stop words\n\n\n\n\n\n","category":"function"},{"location":"utils/util/#StructuralIdentifiability.make_substitution-Union{Tuple{P}, NTuple{4, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.make_substitution","text":"make_substitution(f, var_sub, val_numer, val_denom)\n\nSubstitute a variable in a polynomial with an expression\n\nInput:\n\nf - the polynomial\nvar_sub - the variable to be substituted\nvar_numer - numerator of the substitution expression\nvar_denom - denominator of the substitution expression\n\nOutput:\n\npolynomial - result of substitution\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.parent_ring_change-Tuple{AbstractAlgebra.MPolyRingElem, AbstractAlgebra.MPolyRing}","page":"Other Utilities","title":"StructuralIdentifiability.parent_ring_change","text":"parent_ring_change(poly, new_ring)\n\nConverts a polynomial to a different polynomial ring Input\n\npoly - a polynomial to be converted\nnew_ring - a polynomial ring such that every variable name appearing in poly appears among the generators\n\nOutput:\n\na polynomial in new_ring “equal” to poly\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.replace_with_ic-Tuple{Any, Any}","page":"Other Utilities","title":"StructuralIdentifiability.replace_with_ic","text":"replace_with_ic(ode::ODE, funcs)\n\nTakes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0). Function is used to prepare the output for the case of known initial conditions\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.switch_ring-Tuple{AbstractAlgebra.MPolyRingElem, AbstractAlgebra.MPolyRing}","page":"Other Utilities","title":"StructuralIdentifiability.switch_ring","text":"switch_ring(v, ring)\n\nFor a variable v, returns a variable in ring with the same name\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.uncertain_factorization-Tuple{AbstractAlgebra.MPolyRingElem{Nemo.QQFieldElem}}","page":"Other Utilities","title":"StructuralIdentifiability.uncertain_factorization","text":"uncertain_factorization(f)\n\nInput:\n\nf - polynomial with rational coefficients\n\nOutput:\n\nlist of pairs (div, certainty) where\ndiv's are divisors of f such that f is their product with certain powers\nif certainty is true, div is Q-irreducible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#Wronskian-Tools","page":"Wronskian Tools","title":"Wronskian Tools","text":"","category":"section"},{"location":"utils/wronskian/","page":"Wronskian Tools","title":"Wronskian Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"wronskian.jl\"]","category":"page"},{"location":"utils/wronskian/#StructuralIdentifiability.get_max_below-Tuple{StructuralIdentifiability.ExpVectTrie, Vector{Int64}}","page":"Wronskian Tools","title":"StructuralIdentifiability.get_max_below","text":"get_max_below(t, vect)\n\nInput:\n\nt - a trie with exponent vectors\nvect - yet another exponent vector\n\nOutput:\n\na pair (d, v) where v is a vector in the trie which is componentwise ≤ vect and the difference d is as small as possible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.massive_eval-Tuple{Any, Any}","page":"Wronskian Tools","title":"StructuralIdentifiability.massive_eval","text":"massive_eval(polys, eval_dict)\n\nInput:\n\npolys - a list of polynomials\neval_dict - dictionary from variables to the values. Missing values are treated as zeroes\n\nOutput:\n\na list of values of the polynomials\n\nEvaluates a list of polynomials at a point. Assumes that multiplications are relatively expensive (like in truncated power series) so all the monomials are precomputed first and the values of monomials of lower degree are cached and used to compute the values of the monomials of higher degree\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.monomial_compress-Tuple{Any, ODE}","page":"Wronskian Tools","title":"StructuralIdentifiability.monomial_compress","text":"monomial_compress(io_equation, ode)\n\nCompresses an input-output equation for the rank computation Input:\n\nio_equation - input-output equation\node - the corresponding ODE model\n\nOutput:\n\npair (coeffs, terms) such that:\nsum of coeffs[i] * terms[i] = io_equation\ncoeffs involve only parameters, terms involve only inputs and outputs\nlength of the representation is the smallest possible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.wronskian-Union{Tuple{P}, Tuple{Dict{P, P}, ODE{P}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Wronskian Tools","title":"StructuralIdentifiability.wronskian","text":"wronskian(io_equations, ode)\n\nInput:\n\nio_equations - a set of io-equations in the form of the Dict as returned by find_ioequations\node - the ODE object\n\nOutput:\n\na list of Wronskians evaluated at a point modulo prime\n\nComputes the Wronskians of io_equations\n\n\n\n\n\n","category":"method"},{"location":"utils/global_identifiability/#Global-Identifiability-Tools","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"","category":"section"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"Pages=[\"global_identifiability.md\"]","category":"page"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"CurrentModule=StructuralIdentifiability","category":"page"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"StructuralIdentifiability.RationalFunctionField\nStructuralIdentifiability.field_contains\nStructuralIdentifiability.get_degree_and_coeffsize","category":"page"},{"location":"utils/global_identifiability/#StructuralIdentifiability.RationalFunctionField","page":"Global Identifiability Tools","title":"StructuralIdentifiability.RationalFunctionField","text":"RationalFunctionField\n\nA subfield of the field of rational functions over the rationals.\n\nExample\n\nusing Nemo\nusing StructuralIdentifiability: RationalFunctionField\n\nR, (x, y, z) = QQ[\"x\", \"y\", \"z\"]\n\n# Constructs a subfield generated by x / y, y / z\nrff = RationalFunctionField([x // y, y // z])\n\n# Constructs a subfield generated by y / x, 1 / x, z / y\nrff = RationalFunctionField([[x, y, R(1)], [y, z]])\n\n\n\n\n\n","category":"type"},{"location":"utils/global_identifiability/#StructuralIdentifiability.field_contains","page":"Global Identifiability Tools","title":"StructuralIdentifiability.field_contains","text":"field_contains(field, ratfuncs, prob_threshold)\n\nChecks whether given rational function field field contains given rational functions ratfuncs (represented as a list of lists). The result is correct with probability at least prob_threshold\n\nInputs:\n\nfield - a rational function field\nratfuncs - a list of lists of polynomials. Each of the lists, say, [f1, ..., fn], defines generators f2/f1, ..., fn/f1.\nprob_threshold real number from (0, 1)\n\nOutput:\n\na list L[i] of bools of length length(rat_funcs) such that L[i] is true iff the i-th function belongs to field\n\n\n\n\n\n","category":"function"},{"location":"utils/global_identifiability/#StructuralIdentifiability.get_degree_and_coeffsize","page":"Global Identifiability Tools","title":"StructuralIdentifiability.get_degree_and_coeffsize","text":"get_degree_and_coeffsize(f)\n\nfor f being a polynomial/rational function over rationals (QQ) returns a tuple (degree, max_coef_size)\n\n\n\n\n\n","category":"function"},{"location":"utils/reparametrization/#Model-reparametrization","page":"Model reparametrization","title":"Model reparametrization","text":"","category":"section"},{"location":"utils/reparametrization/","page":"Model reparametrization","title":"Model reparametrization","text":"StructuralIdentifiability.reparametrize_global","category":"page"},{"location":"utils/reparametrization/#StructuralIdentifiability.reparametrize_global","page":"Model reparametrization","title":"StructuralIdentifiability.reparametrize_global","text":"reparametrize_global(ode, options...)\n\nFinds a reparametrization of ode in terms of globally identifiabile functions.\n\nReturns a tuple (new_ode, new_vars, implicit_relations), such that:\n\nnew_ode is the reparametrized ODE system\nnew_vars is a mapping from the new variables to the original ones\nrelations is the array of implicit algebraic relations among new_vars. Usually, relations is empty.\n\nOptions\n\nThe function accepts the following optional arguments.\n\nseed: A float in the range from 0 to 1, random seed (default is seed = 42). \nprob_threshold: The probability of correctness (default is prob_threshold = 0.99).\n\nExample\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) - b*x1(t)*x2(t),\n x2'(t) = -c * x2(t) + d*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nnew_ode, new_vars, relations = reparametrize_global(ode)\n\nThen, we have the following:\n\n# new_ode\nX2'(t) = X1(t)*X2(t)*a2 - X2(t)*a1\nX1'(t) = -X1(t)*X2(t) + X1(t)*a3\ny1(t) = X1(t)\n\n# new_vars\nDict{Nemo.QQMPolyRingElem, AbstractAlgebra.Generic.FracFieldElem{Nemo.QQMPolyRingElem}} with 6 entries:\n X2 => b*x2\n y1 => y\n X1 => x1\n a2 => d\n a3 => a\n a1 => c\n\nNotice that the new_ode is fully identifiabile, and has 1 less parameter compared to the original one.\n\n\n\n\n\n","category":"function"},{"location":"utils/power_series_utils/#Power-Series-Utilities","page":"Power Series Tools","title":"Power Series Utilities","text":"","category":"section"},{"location":"utils/power_series_utils/","page":"Power Series Tools","title":"Power Series Tools","text":"Pages =[\"power_series_utils.md\"]","category":"page"},{"location":"utils/power_series_utils/","page":"Power Series Tools","title":"Power Series Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"power_series_utils.jl\"]","category":"page"},{"location":"utils/power_series_utils/#StructuralIdentifiability._matrix_inv_newton_iteration-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{T}, AbstractAlgebra.MatElem{T}}} where T<:(AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem})","page":"Power Series Tools","title":"StructuralIdentifiability._matrix_inv_newton_iteration","text":"_matrix_inv_newton_iteration(M, Minv)\n\nPerforms a single step of Newton iteration for inverting M with Minv being a partial result\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_diff-Tuple{AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.RingElem}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_diff","text":"ps_diff(ps)\n\nInput:\n\nps - (absolute capped) univariate power series\n\nOutput:\n\nthe derivative of ps\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_integrate-Tuple{AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_integrate","text":"ps_integrate(ps)\n\nInput:\n\nps - (absolute capped) univariate power series\n\nOutput:\n\nthe integral of ps without constant term\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_homlinear_de-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}, Int64}} where T<:AbstractAlgebra.FieldElem","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_homlinear_de","text":"ps_matrix_homlinear_de(A, Y0, prec)\n\nInput:\n\nA - a square matrix with entries in a univariate power series ring\nY0 - a square invertible matrix over the base field\n\nOutput:\n\nmatrix Y such that Y' = AY up to precision of A - 1 and Y(0) = Y0\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_inv","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_inv","text":"ps_matrix_inv(M, prec)\n\nInput:\n\nM - a square matrix with entries in a univariate power series ring it is assumed that M(0) is invertible and all entries having the same precision\nprec - an integer, precision, if -1 then defaults to precision of M\n\nOutput:\n\nthe inverse of M computed up to prec\n\n\n\n\n\n","category":"function"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_linear_de-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}, Int64}} where T<:AbstractAlgebra.FieldElem","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_linear_de","text":"ps_matrix_linear_de(A, B, Y0, prec)\n\nInput:\n\nA, B - square matrices with entries in a univariate power series ring\nY0 - a matrix over the base field with the rows number the same as A\n\nOutput:\n\nmatrix Y such that Y' = AY + B up to precision of A - 1 and Y(0) = Y0\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_log-Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem}}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_log","text":"ps_matrix_log(M)\n\nInput:\n\nM - a square matrix with entries in a univariate power series ring it is assumed that M(0) is the identity\n\nOutput:\n\nthe natural log of M\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_ode_solution-Union{Tuple{P}, Tuple{T}, Tuple{Vector{P}, Dict{P, T}, Dict{P, Vector{T}}, Int64}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_ode_solution","text":"ps_ode_solution(equations, ic, inputs, prec)\n\nInput:\n\nequations - a system of the form A(x u mu)x - B(x u mu) = 0, where A is a generically nonsingular square matrix. Assumption: A is nonzero at zero\nic - initial conditions for x's (dictionary)\ninputs - power series for inputs represented as arrays (dictionary)\nprec - precision of the solution\n\nOutput:\n\npower series solution of the system\n\n\n\n\n\n","category":"method"},{"location":"identifiability/identifiability/#Functions-to-Assess-Identifiability","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/#Assessing-All-Types-of-Identifiability","page":"Functions to Assess Identifiability","title":"Assessing All Types of Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"assess_identifiability","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.assess_identifiability","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.assess_identifiability","text":"assess_identifiability(ode; funcs_to_check = [], prob_threshold=0.99, loglevel=Logging.Info)\n\nInput:\n\node - the ODE model\nfuncs_to_check - list of functions to check identifiability for; if empty, all parameters and states are taken\nknown_ic: a list of functions whose initial conditions are assumed to be known, then the returned identifiable functions will be functions of parameters and initial conditions, not states (this is an experimental functionality).\nprob_threshold - probability of correctness.\nloglevel - the minimal level of log messages to display (Logging.Info by default)\n\nAssesses identifiability of a given ODE model. The result is guaranteed to be correct with the probability at least prob_threshold. The function returns an (ordered) dictionary from the functions to check to their identifiability properties (one of :nonidentifiable, :locally, :globally).\n\n\n\n\n\n","category":"function"},{"location":"identifiability/identifiability/#Assessing-Local-Identifiability","page":"Functions to Assess Identifiability","title":"Assessing Local Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"assess_local_identifiability","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.assess_local_identifiability","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.assess_local_identifiability","text":"assess_local_identifiability(ode::ODE{P}; funcs_to_check::Array{<: Any, 1}, prob_threshold::Float64=0.99, type=:SE, loglevel=Logging.Info) where P <: MPolyRingElem{Nemo.QQFieldElem}\n\nChecks the local identifiability/observability of the functions in funcs_to_check. The result is correct with probability at least prob_threshold.\n\nCall this function if you have a specific collection of parameters of which you would like to check local identifiability.\n\ntype can be either :SE (single-experiment identifiability) or :ME (multi-experiment identifiability). If the type is :ME, states are not allowed to appear in the funcs_to_check.\n\n\n\n\n\nassess_local_identifiability(dds::DDS{P}; funcs_to_check::Array{<: Any, 1}, known_ic, prob_threshold::Float64=0.99, loglevel=Logging.Info) where P <: MPolyRingElem{Nemo.QQFieldElem}\n\nChecks the local identifiability/observability of the functions in funcs_to_check. The result is correct with probability at least prob_threshold. A list of quantities can be provided as known_ic for which the initial conditions can be assumed to be known and generic.\n\n\n\n\n\n","category":"function"},{"location":"identifiability/identifiability/#Finding-Identifiable-Functions","page":"Functions to Assess Identifiability","title":"Finding Identifiable Functions","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"find_identifiable_functions","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.find_identifiable_functions","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.find_identifiable_functions","text":"find_identifiable_functions(ode::ODE; options...)\n\nFinds all functions of parameters/states that are identifiable in the given ODE system.\n\nOptions\n\nThis functions takes the following optional arguments:\n\nwith_states: When true, also reports the identifiabile functions in the ODE states. Default is false.\nsimplify: The extent to which the output functions are simplified. Stronger simplification may require more time. Possible options are:\n:standard: Default simplification.\n:weak: Weak simplification. This option is the fastest, but the output functions can be quite complex.\n:strong: Strong simplification. This option is the slowest, but the output\nfunctions are nice and simple.\n:absent: No simplification.\nknown_ic: a list of functions whose initial conditions are assumed to be known, then the returned identifiable functions will be functions of parameters and initial conditions, not states (this is an experimental functionality).\nprob_threshold: A float in the range from 0 to 1, the probability of correctness. Default is 0.99.\nseed: The rng seed. Default value is 42.\nloglevel - the minimal level of log messages to display (Logging.Info by default)\n\nExample\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x0'(t) = -(a01 + a21) * x0(t) + a12 * x1(t),\n x1'(t) = a21 * x0(t) - a12 * x1(t),\n y(t) = x0(t)\n)\n\nfind_identifiable_functions(ode)\n\n# prints\n3-element Vector{AbstractAlgebra.Generic.FracFieldElem{Nemo.QQMPolyRingElem}}:\n a12 + a01 + a21\n a12*a01\n\n\n\n\n\n","category":"function"},{"location":"utils/elimination/#Elimination","page":"Elimination","title":"Elimination","text":"","category":"section"},{"location":"utils/elimination/","page":"Elimination","title":"Elimination","text":"Pages=[\"elimination.md\"]","category":"page"},{"location":"utils/elimination/","page":"Elimination","title":"Elimination","text":"Modules = [StructuralIdentifiability]\nPages = [\"elimination.jl\"]","category":"page"},{"location":"utils/elimination/#StructuralIdentifiability.Bezout_matrix-Union{Tuple{P}, Tuple{P, P, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.Bezout_matrix","text":"Bezout_matrix(f, g, var_elim)\n\nCompute the Bezout matrix of two polynomials f, g with respect to var_elim\n\nInputs:\n\nf - first polynomial\ng - second polynomial\nvar_elim - variable, of which f and g are considered as polynomials\n\nOutput:\n\nM::MatrixElem - The Bezout matrix\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.Sylvester_matrix-Union{Tuple{P}, Tuple{P, P, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.Sylvester_matrix","text":"Sylvester_matrix(f, g, var_elim)\n\nCompute the Sylvester matrix of two polynomials f, g with respect to var_elim Inputs:\n\nf - first polynomial\ng - second polynomial\nvar_elim - variable, of which f and g are considered as polynomials\n\nOutput:\n\nM::MatrixElem - The Sylvester matrix\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.choose-Union{Tuple{P}, Tuple{Vector{P}, Any}} where P<:(AbstractAlgebra.MPolyRingElem{<:AbstractAlgebra.FieldElem})","page":"Elimination","title":"StructuralIdentifiability.choose","text":"choose(polys, generic_point_generator)\n\nInput:\n\npolys - an array of distinct irreducible polynomials in the same ring\ngeneric_point_generator - a generic point generator as described above for one of polys\n\nOutput:\n\nthe polynomial that vanishes at the generic_point_generator\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.eliminate_var-Union{Tuple{P}, Tuple{P, P, P, Any}} where P<:(AbstractAlgebra.MPolyRingElem{<:AbstractAlgebra.FieldElem})","page":"Elimination","title":"StructuralIdentifiability.eliminate_var","text":"eliminate_var(f, g, var_elim, generic_point_generator)\n\nEliminate a variable from a pair of polynomials\n\nInput:\n\nf and g - polynomials\nvar_elim - variable to be eliminated\ngeneric_point_generator - a generic point generator object for the factor of the resultant of f and g of interest\n\nOutput:\n\npolynomial - the desired factor of the resultant of f and g\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.simplify_matrix-Union{Tuple{AbstractAlgebra.MatElem{P}}, Tuple{P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.simplify_matrix","text":"simplify_matrix(M)\n\nEliminate GCD of entries of every row and column\n\nInput:\n\nM::MatrixElem - matrix to be simplified\n\nOutput:\n\nM::MatrixElem - Simplified matrix\nextra_factors::Vector{AbstractAlgebra.MPolyRingElem} - array of GCDs eliminated from M.\n\n\n\n\n\n","category":"method"},{"location":"tutorials/discrete_time/#Identifiability-of-Discrete-Time-Models-(Local)","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"","category":"section"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Now we consider a discrete-time model in the state-space form. Such a model is typically written either in terms of shift:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"begincases\nmathbfx(t + 1) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"or in terms of difference","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"begincases\nDeltamathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases quad textwhere quad Delta mathbfx(t) = mathbfx(t + 1) - mathbfx(t)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"In both cases,mathbfx(t) mathbfy(t), and mathbfu(t) are time-dependent states, outputs, and inputs, respectively, and mathbfp are scalar parameters. As in the ODE case, we will call that a parameter or a states (or a function of them) is identifiable if its value can be recovered from time series for inputs and outputs (in the generic case, see Definition 3 in [1] for details). Again, we will distinguish two types of identifiability","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"local identifiability: the value can be recovered up to finitely many options;\nglobal identifiability: the value can be recovered uniquely.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Currently, StructuralIdentifiability.jl allows to assess only local identifiability for discrete-time models, and below we will describe how this can be done. As a running example, we will use the following discrete version of the SIR model:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"\nbegincases\nS(t + 1) = S(t) - beta S(t) I(t)\nI(t + 1) = I(t) + beta S(t) I(t) - alpha I(t)\nR(t + 1) = R(t) + alpha I(t)\ny(t) = I(t)\nendcases\nquad textor\nquad\nbegincases\nDelta S(t) = -beta S(t) I(t)\nDelta I(t) = beta S(t) I(t) - alpha I(t)\nDelta R(t) = alpha I(t)\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"where the observable is I, the number of infected people. The native way to define such a model in StructuralIdentifiability is to use @DDSmodel macro which uses the shift notation:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"using StructuralIdentifiability\n\ndds = @DDSmodel(\n S(t + 1) = S(t) - β * S(t) * I(t),\n I(t + 1) = I(t) + β * S(t) * I(t) - α * I(t),\n R(t + 1) = R(t) + α * I(t),\n y(t) = I(t)\n)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Then local identifiability can be assessed using assess_local_identifiability function:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(dds)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"For each parameter or state, the value in the returned dictionary is true (1) if the parameter is locally identifiable and false (0) otherwise. We see that R(t) is not identifiable, which makes sense: it does not affect the dynamics of the observable in any way.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"The assess_local_identifiability function has three important keyword arguments:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"funcs_to_check is a list of functions for which one want to assess identifiability, for example, the following code will check if β * S is locally identifiable.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(dds; funcs_to_check = [β * S])","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"prob_threshold is the probability of correctness (default value 0.99, i.e., 99%). The underlying algorithm is a Monte-Carlo algorithm, so in principle it may produce incorrect result but the probability of correctness of the returned result is guaranteed to be at least prob_threshold (in fact, the employed bounds are quite conservative, so in practice incorrect result is almost never produced).\nknown_ic is a list of the states for which initial conditions are known. In this case, the identifiability results will be valid not at any time point t but only at t = 0.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"As other main functions in the package, assess_local_identifiability accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"If one loads ModelingToolkit (and thus the ModelingToolkitSIExt extension), one can use DiscreteSystem from ModelingToolkit to describe the input model (now in terms of difference!):","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"using ModelingToolkit\nusing StructuralIdentifiability\n\n@parameters α β\n@variables t S(t) I(t) R(t) y(t)\nD = Difference(t; dt = 1.0)\n\neqs = [D(S) ~ S - β * S * I, D(I) ~ I + β * S * I - α * I, D(R) ~ R + α * I]\n@named sir = DiscreteSystem(eqs)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Then the same computation can be carried out with the models defined this way:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(sir; measured_quantities = [y ~ I])","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"In principle, it is not required to give a name to the observable, so one can write this shorter","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(sir; measured_quantities = [I])","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"The same example but with specified functions to check","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(sir; measured_quantities = [I], funcs_to_check = [β * S])","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"The implementation is based on a version of the observability rank criterion and will be described in a forthcoming paper.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"[1]: S. Nõmm, C. Moog, Identifiability of discrete-time nonlinear systems, IFAC Proceedings Volumes, 2004.","category":"page"},{"location":"tutorials/creating_ode/#Creating-ODE-System","page":"Creating ODE System","title":"Creating ODE System","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Most of the algorithms in StructuralIdentifiability.jl take as input system of ordinary differential equations (ODEs) in the state space form, that is:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"begincases\nmathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"which involves","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"a vector mathbfx(t) of the state variables of the system,\na vector mathbfu(t) of external inputs,\na vector mathbfp of scalar parameters,\na vector mathbfy(t) of outputs (i.e., observations),\nand vectors of rational functions mathbff and mathbfg (for discussion of the non-rational case, see this issue).","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"In the standard setup, inputs and outputs are assumed to be known, and the goal is to assess identifiability of parameters and/or states from the input-output data. In the case of states, this property is also called observability.","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"There are two ways to define such a system to be processed using StructuralIdentifiability.jl. We will demonstrate them using the following example system (Wright's population model of two mutualist species with control[1]):","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"begincases\nx_1(t) = r_1 x_1(t)(1 - c_1 x_1(t)) + fracbeta_1 x_1(t)x_2(t)chi_1 + x_2(t) + u(t)\nx_2(t) = r_2 x_2(t)(1 - c_2 x_2(t)) + fracbeta_2 x_1(t)x_2(t)chi_2 + x_1(t)\ny(t) = x_1(t)\nendcases","category":"page"},{"location":"tutorials/creating_ode/#Defining-the-model-using-@ODEmodel-macro","page":"Creating ODE System","title":"Defining the model using @ODEmodel macro","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"One way to define the model is to use the @ODEmodel macro provided by the StructuralIdentifiability.jl package.","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) =\n r1 * x1(t) * (1 - c1 * x1(t)) + beta1 * x1(t) * x2(t) / (chi1 + x2(t)) + u(t),\n x2'(t) = r2 * x2(t) * (1 - c2 * x2(t)) + beta2 * x1(t) * x2(t) / (chi2 + x1(t)),\n y(t) = x1(t)\n)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Then one can, for example, assess identifiability of the parameters and states by","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"assess_identifiability(ode)","category":"page"},{"location":"tutorials/creating_ode/#Defining-using-ModelingToolkit","page":"Creating ODE System","title":"Defining using ModelingToolkit","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"StructuralIdentifiability has an extension ModelingToolkitSIExt which allows to use ODESystem from ModelingToolkit to describe a model. The extension is loaded automatically once ModelingToolkit is loaded via using ModelingToolkit. In this case, one should encode the equations for the states as ODESystem and specify the outputs separately. In order to do this, we first introduce all functions and scalars:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"using StructuralIdentifiability, ModelingToolkit\n\n@parameters r1, r2, c1, c2, beta1, beta2, chi1, chi2\n@variables t, x1(t), x2(t), y(t), u(t)\n\nD = Differential(t)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"And then defined the system and separately the outputs:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"eqs = [\n D(x1) ~ r1 * x1 * (1 - c1 * x1) + beta1 * x1 * x2 / (chi1 + x2) + u,\n D(x2) ~ r2 * x2 * (1 - c2 * x2) + beta2 * x1 * x2 / (chi2 + x1),\n]\n\nmeasured_quantities = [y ~ x1]\n\node_mtk = ODESystem(eqs, t, name = :mutualist)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Then, for example, the identifiability of parameters and states can be assessed as follows:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"assess_identifiability(ode_mtk, measured_quantities = measured_quantities)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"[1]: D. H. Wright, A Simple, Stable Model of Mutualism Incorporating Handling Time, The American Naturalist, 1989, 134(4).","category":"page"},{"location":"ioequations/ioequations/#Finding-Input-Output-Equations","page":"Input-Output Equation tools","title":"Finding Input-Output Equations","text":"","category":"section"},{"location":"ioequations/ioequations/","page":"Input-Output Equation tools","title":"Input-Output Equation tools","text":"find_ioequations","category":"page"},{"location":"ioequations/ioequations/#StructuralIdentifiability.find_ioequations","page":"Input-Output Equation tools","title":"StructuralIdentifiability.find_ioequations","text":"find_ioequations(ode, [var_change_policy=:default])\n\nFinds the input-output equations of an ODE system Input:\n\node - the ODE system\nvar_change_policy - whether to perform automatic variable change, can be one of :default, :yes, :no\nloglevel - logging level (default: Logging.Info)\n\nOutput:\n\na dictionary from “leaders” to the corresponding input-output equations; if an extra projection is needed, it will be the value corresponding to rand_proj_var\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#Reducing-with-respect-to-Input-Output-Equations","page":"Input-Output Equation tools","title":"Reducing with respect to Input-Output Equations","text":"","category":"section"},{"location":"ioequations/ioequations/","page":"Input-Output Equation tools","title":"Input-Output Equation tools","text":"PBRepresentation\npseudodivision\ndiffreduce\nio_switch!","category":"page"},{"location":"ioequations/ioequations/#StructuralIdentifiability.PBRepresentation","page":"Input-Output Equation tools","title":"StructuralIdentifiability.PBRepresentation","text":"The structure for storing a projection-based representation of differential ideal (see Section 2.3 https://arxiv.org/abs/2111.00991). Contains the following fields:\n\ny_names - the names of the variables with finite order in the profile (typically, outputs)\nu_names - the names of the variables with infinite order in the profile (typically, inputs)\nparam_names - the names of the parameters\nprofile - the profile of the PB-representation (see Definition 2.13) as a dict from y_names with finite orders to the orders\nprojections - the corresponding projections (see Definition 2.15) as a dict from y_names to the projections\n\n\n\n\n\n","category":"type"},{"location":"ioequations/ioequations/#StructuralIdentifiability.pseudodivision","page":"Input-Output Equation tools","title":"StructuralIdentifiability.pseudodivision","text":"pseudodivision(f, g, x)\n\nComputes the result of pseudodivision of f by g as univariate polynomials in x Input:\n\nf - the polynomial to be divided\ng - the polynomial to divide by\nx - the variable for the division\n\nOutput: the pseudoremainder of f divided by g w.r.t. x\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#StructuralIdentifiability.diffreduce","page":"Input-Output Equation tools","title":"StructuralIdentifiability.diffreduce","text":"diffreduce(diffpoly, pbr)\n\nComputes the result of differential reduction of a differential polynomial diffpoly with respect to the charset defined by a PB-representation pbr Input:\n\ndiffpoly - a polynomial representing a differential polynomial to be reduced\npbr - a projection-based representation\n\nOutput: the result of differential reduction of diffpoly by pbr considered as a characteristic set (see Remark 2.20 in the paper)\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#StructuralIdentifiability.io_switch!","page":"Input-Output Equation tools","title":"StructuralIdentifiability.io_switch!","text":"io_switch(pbr)\n\nIn a single-output pb-representation pbr makes the leading variable to be the first of the inputs\n\n\n\n\n\n","category":"function"},{"location":"utils/local_identifiability/#Local-Identifiability-Tools","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"","category":"section"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"Pages=[\"local_identifiability.md\"]","category":"page"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"CurrentModule=StructuralIdentifiability","category":"page"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"StructuralIdentifiability.differentiate_solution\nStructuralIdentifiability.differentiate_output","category":"page"},{"location":"utils/local_identifiability/#StructuralIdentifiability.differentiate_solution","page":"Local Identifiability Tools","title":"StructuralIdentifiability.differentiate_solution","text":"differentiate_solution(ode, params, ic, inputs, prec)\n\nInput:\n\nthe same as for power_series_solutions\n\nOutput:\n\na tuple consisting of the power series solution and a dictionary of the form (u, v) => power series, where u is a state variable v is a state or parameter, and the power series is the partial derivative of the function u w.r.t. v evaluated at the solution\n\n\n\n\n\n","category":"function"},{"location":"utils/local_identifiability/#StructuralIdentifiability.differentiate_output","page":"Local Identifiability Tools","title":"StructuralIdentifiability.differentiate_output","text":"differentiate_output(ode, params, ic, inputs, prec)\n\nSimilar to differentiate_solution but computes partial derivatives of prescribed outputs returns a dictionary of the form y_function => Dict(var => dy/dvar) where dy/dvar is the derivative of y_function with respect to var.\n\n\n\n\n\n","category":"function"},{"location":"#StructuralIdentifiability.jl","page":"Home","title":"StructuralIdentifiability.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StructuralIdentifiability.jl is a comprehensive toolbox for assessing identifiability parameters.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"To install StructuralIdentifiability.jl, use the Julia package manager:","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg\nPkg.add(\"StructuralIdentifiability\")","category":"page"},{"location":"#Citation","page":"Home","title":"Citation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"@article{structidjl,\n author = {Dong, R. and Goodbrake, C. and Harrington, H. and Pogudin G.},\n title = {Differential Elimination for Dynamical Models via Projections with Applications to Structural Identifiability},\n journal = {SIAM Journal on Applied Algebra and Geometry},\n url = {https://doi.org/10.1137/22M1469067},\n year = {2023}\n volume = {7},\n number = {1},\n pages = {194-235}\n}","category":"page"},{"location":"#Feature-Summary","page":"Home","title":"Feature Summary","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StructuralIdentifiability.jl can assess local and global identifiability of ODE models. In addition to these straightforward identifiability queries on individual parameters, the package can distinguish between single- and multi-experiment identifiability.","category":"page"},{"location":"#Feature-List","page":"Home","title":"Feature List","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Local identifiability checks\nGlobal identifiability checks\nAssessment of identifiable functions of parameters and states\nModel reparametrization (experimental)","category":"page"},{"location":"#Contributing","page":"Home","title":"Contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Please refer to the SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages for guidance on PRs, issues, and other matters relating to contributing to StructuralIdentifiability.\nThere are a few community forums:\nThe #diffeq-bridged channel in the Julia Slack\nJuliaDiffEq on Gitter\nOn the Julia Discourse forums\nSee also SciML Community page","category":"page"},{"location":"#Reproducibility","page":"Home","title":"Reproducibility","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"
The documentation of this SciML package was built using these direct dependencies,","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg # hide\nPkg.status() # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"
and using this machine and Julia version.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using InteractiveUtils # hide\nversioninfo() # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"
A more complete overview of all dependencies and their versions is also provided.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg # hide\nPkg.status(; mode = PKGMODE_MANIFEST) # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can also download the \nmanifest file and the\nproject file.","category":"page"},{"location":"input/input/#Parsing-input-system","page":"Parsing input system","title":"Parsing input system","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"@ODEmodel(ex::Expr...)\nODE\nset_parameter_values","category":"page"},{"location":"input/input/#StructuralIdentifiability.@ODEmodel-Tuple{Vararg{Expr}}","page":"Parsing input system","title":"StructuralIdentifiability.@ODEmodel","text":"macro ODEmodel\n\nMacro for creating an ODE from a list of equations. It also injects all variables into the global scope.\n\nExample\n\nCreating a simple ODE:\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) + u(t),\n x2'(t) = b * x2(t) + c*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nHere,\n\nx1, x2 are state variables\ny is an output variable\nu is an input variable\na, b, c are time-independent parameters\n\n\n\n\n\n","category":"macro"},{"location":"input/input/#StructuralIdentifiability.ODE","page":"Parsing input system","title":"StructuralIdentifiability.ODE","text":"The main structure that represents input ODE system.\n\nStores information about states (x_vars), outputs (y_vars), inputs (u_vars), parameters (parameters) and the equations.\n\nThis structure is constructed via @ODEmodel macro.\n\n\n\n\n\n","category":"type"},{"location":"input/input/#StructuralIdentifiability.set_parameter_values","page":"Parsing input system","title":"StructuralIdentifiability.set_parameter_values","text":"set_parameter_values(ode, param_values)\n\nInput:\n\node - an ODE as above\nparam_values - values for (possibly, some of) the parameters as dictionary parameter => value\n\nOutput:\n\nnew ode with the parameters in param_values plugged with the given numbers\n\n\n\n\n\n","category":"function"},{"location":"input/input/#Create-Compartmental-Model","page":"Parsing input system","title":"Create Compartmental Model","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"linear_compartment_model","category":"page"},{"location":"input/input/#StructuralIdentifiability.linear_compartment_model","page":"Parsing input system","title":"StructuralIdentifiability.linear_compartment_model","text":"linear_compartment_model(graph, inputs, outputs, leaks)\n\nInput: defines a linear compartment model with nodes numbered from 1 to n by\n\ngraph - and array of integer arrays representing the adjacency lists of the graph\ninputs - array of input nodes\noutputs - array of output nodes\nleaks - array of sink nodes\n\nOutput:\n\nthe corresponding ODE system in the notation of https://doi.org/10.1007/s11538-015-0098-0\n\n\n\n\n\n","category":"function"},{"location":"input/input/#Discrete-time-systems","page":"Parsing input system","title":"Discrete-time systems","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"@DDSmodel","category":"page"},{"location":"input/input/#StructuralIdentifiability.@DDSmodel","page":"Parsing input system","title":"StructuralIdentifiability.@DDSmodel","text":"macro DDSmodel\n\nMacro for creating a DDS (discrete dynamical system) from a list of equations. It also injects all variables into the global scope.\n\nExample\n\nCreating a simple DDS:\n\nusing StructuralIdentifiability\n\ndds = @DDSmodel(\n x1(t + 1) = a * x1(t) + u(t),\n x2(t + 1) = b * x2(t) + c*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nHere,\n\nx1, x2 are state variables\ny is an output variable\nu is an input variable\na, b, c are time-independent parameters\n\n\n\n\n\n","category":"macro"}] +[{"location":"tutorials/reparametrization/#Reparametrizations","page":"Reparametrizations","title":"Reparametrizations","text":"","category":"section"},{"location":"tutorials/reparametrization/#Overview","page":"Reparametrizations","title":"Overview","text":"","category":"section"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Once one has found that not all parameters and/or states of the model at hand are identifiable, one natural desire is to reparametrize the model into a one with better identifiability properties. StructuralIdentifiability offers such a functionality via the function reparametrize_global. It takes as input an ODE model and produces its transformation into another model with the same input-output behaviour but with the states and parameters being globally identifiable. Note that, in general, such a transformation may not exist in the class of rational models, so sometimes the function returns an ODE not on the whole affine space but on a manifold.","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"More precisely, the function returns a dictionary with three keys:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":":new_vars is a dictionary which maps the new parameters and new states into the formulas expressing them in terms of the original parameters and states;\n:new_ode is the ODE satisfied by these new states (and the expression of the output in terms of the new states);\n:implicit_relations is a list of algebraic relations between the new states and parameters. Being nonempty, this is exactly the list of equations defining the manifold, on which the new ODE model is defined. In many interesting cases, however, this list is empty meaning that the new ODE is a standard rational ODE model.","category":"page"},{"location":"tutorials/reparametrization/#Example:-SEUIR-model","page":"Reparametrizations","title":"Example: SEUIR model","text":"","category":"section"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Consider a SEUIR epidemiological model from[1]:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"begincases\nS(t) = -beta frac(U(t) + I(t))S(t)N\nE(t) = beta frac(U(t) + I(t))S(t)N - gamma E(t)\nU(t) = (1 - alpha) gamma E(t) - delta U(t)\nI(t) = alpha gamma E(t) - delta I(t)\nR(t) = delta(U(t) + I(t))\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In this model S is, as usually, the number of susceptible people, E is the number of people exposed to virus but not yet infected (as in a simple SEIR model[1]), and I and U correspond to number of infected people who report the infection and who do not, respectively. We define the model but omit R compartment since it does not affect the output dynamics:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n S'(t) = -b * (U(t) + I(t)) * S(t) / N,\n E'(t) = b * (U(t) + I(t)) * S(t) / N - g * E(t),\n U'(t) = (1 - a) * g * E(t) - d * U(t),\n I'(t) = a * g * E(t) - d * I(t),\n y(t) = I(t)\n)","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Majority of the states and parameters are not identifiable in this case:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"assess_identifiability(ode)","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Let us attempt to reparametrize the model, and print new variables:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"reparam = reparametrize_global(ode)\n@assert isempty(reparam[:implicit_relations]) # checking that the result is an ODE on the whole space, not on a manifold\nreparam[:new_vars]","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In these new variables and parameters, the original ODE can be rewritten as follows:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"reparam[:new_ode]","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"In order to analyze this result, let us give more interpretable names to the new variables and parameters:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"I = I widetildeE = alpha E widetildeS = alpha widetildeI = alpha (I + U) gamma = gammadelta = deltawidetildebeta = fracbetaalpha N","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Then the reparametrize system becomes","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"begincases\nwidetildeS(t) = -widetildebeta widetildeS(t) widetildeI(t)\nwidetildeE(t) = widetildebeta widetildeS(t) widetildeI(t) - gamma widetildeE(t)\nwidetildeI(t) = -delta widetildeI(t) + gammawidetildeE(t)\nI(t) = gammawidetildeE(t) - delta I(t)\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"This reparametrization not only reduces the dimension of the parameter space from 5 to 3 but reveals interesting structural properties of the model:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"The first three equations form a self-contained model which is equivalent to a simple SEIR model, so the model gets \"decomposed\";\nNew variables widetildeS, widetildeE, widetildeI are obtained from S, E, and I by scaling by alpha which is the ratio of people who report being infected. One can interpret this as there is a part of population who would report infection and the other part who would not. Ultimately, we can model only the ones who would as this is mainly they who contribute to the output.","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"Finally, we can check that the new model is indeed globally identifiable:","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"assess_identifiability(reparam[:new_ode])","category":"page"},{"location":"tutorials/reparametrization/","page":"Reparametrizations","title":"Reparametrizations","text":"[1]: T. Sauer, T. Berry, D. Ebeigbe, M. Norton, A. Whalen, S. Schiff, Identifiability of infection model parameters early in an epidemic, SIAM Journal on Control and Optimization, 2022;","category":"page"},{"location":"utils/ode/#Functions-to-work-with-the-ODE-structure","page":"ODE Tools","title":"Functions to work with the ODE structure","text":"","category":"section"},{"location":"utils/ode/","page":"ODE Tools","title":"ODE Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"ODE.jl\", \"submodels.jl\"]\nOrder = [:function]","category":"page"},{"location":"utils/ode/#StructuralIdentifiability._reduce_mod_p-Tuple{Nemo.QQMPolyRingElem, Int64}","page":"ODE Tools","title":"StructuralIdentifiability._reduce_mod_p","text":"_reduce_mod_p(f, p)\n\nReduces a polynomial/rational function over Q modulo p\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.power_series_solution-Union{Tuple{P}, Tuple{T}, Tuple{ODE{P}, Dict{P, T}, Dict{P, T}, Dict{P, Vector{T}}, Int64}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"ODE Tools","title":"StructuralIdentifiability.power_series_solution","text":"power_series_solution(ode, param_values, initial_conditions, input_values, prec)\n\nInput:\n\node - an ode to solve\nparam_values - parameter values, must be a dictionary mapping parameter to a value\ninitial_conditions - initial conditions of ode, must be a dictionary mapping state variable to a value\ninput_values - power series for the inputs presented as a dictionary variable => list of coefficients\nprec - the precision of solutions\n\nOutput:\n\ncomputes a power series solution with precision prec presented as a dictionary variable => corresponding coordinate of the solution\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.reduce_ode_mod_p-Tuple{ODE{<:AbstractAlgebra.MPolyRingElem{Nemo.QQFieldElem}}, Int64}","page":"ODE Tools","title":"StructuralIdentifiability.reduce_ode_mod_p","text":"reduce_ode_mod_p(ode, p)\n\nInput: ode is an ODE over QQ, p is a prime number Output: the reduction mod p, throws an exception if p divides one of the denominators\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.set_parameter_values-Union{Tuple{P}, Tuple{T}, Tuple{ODE{P}, Dict{P, T}}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"ODE Tools","title":"StructuralIdentifiability.set_parameter_values","text":"set_parameter_values(ode, param_values)\n\nInput:\n\node - an ODE as above\nparam_values - values for (possibly, some of) the parameters as dictionary parameter => value\n\nOutput:\n\nnew ode with the parameters in param_values plugged with the given numbers\n\n\n\n\n\n","category":"method"},{"location":"utils/ode/#StructuralIdentifiability.find_submodels-Union{Tuple{ODE{P}}, Tuple{P}} where P<:AbstractAlgebra.MPolyRingElem","page":"ODE Tools","title":"StructuralIdentifiability.find_submodels","text":"find_submodels(ode)\n\nThe function calculates and returns all valid submodels given a system of ODEs.\n\nInput:\n\node - an ODEs system to be studied\n\nOutput: \n\nA list of submodels represented as ode objects\n\nExample:\n\n>ode = @ODEmodel(x1'(t) = x1(t)^2, \n x2'(t) = x1(t) * x2(t), \n y1(t) = x1(t), \n y2(t) = x2(t))\n>find_submodels(ode)\n ODE{QQMPolyRingElem}[\n \n x1'(t) = a(t)*x2(t)^2 + x1(t)\n y1(t) = x1(t)\n ]\n\n\n\n\n\n","category":"method"},{"location":"utils/primality/#Primality-Checks","page":"Primality Checks","title":"Primality Checks","text":"","category":"section"},{"location":"utils/primality/","page":"Primality Checks","title":"Primality Checks","text":"Pages=[\"primality.md\"]","category":"page"},{"location":"utils/primality/","page":"Primality Checks","title":"Primality Checks","text":"StructuralIdentifiability.check_primality","category":"page"},{"location":"utils/primality/#StructuralIdentifiability.check_primality","page":"Primality Checks","title":"StructuralIdentifiability.check_primality","text":"check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem}, extra_relations::Array{QQMPolyRingElem, 1})\n\nThe function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.\n\nThe extra_relations allows adding more polynomials to the generators (not affecting the saturation).\n\n\n\n\n\ncheck_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem})\n\nThe function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.\n\n\n\n\n\n","category":"function"},{"location":"tutorials/identifiable_functions/#Globally-Identifiable-Functions","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"","category":"section"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"In addition to assessing identifiabuility of given functions of parameters or states, StructuralIdentifiability.jl provides the function find_identifiable_functions which finds a set of identifiable functions such that any other identifiable function can be expressed using them. This allows to find out what actually is identifiable and what does non-identifiability in the model at hand looks like.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"For example, consider the following model[1].","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"using StructuralIdentifiability # hide\nLLW1987 = @ODEmodel(\n x1'(t) = -p1 * x1(t) + p2 * u(t),\n x2'(t) = -p3 * x2(t) + p4 * u(t),\n x3'(t) = -(p1 + p3) * x3(t) + (p4 * x1(t) + p2 * x2(t)) * u(t),\n y1(t) = x3(t)\n)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Several decades ago, this model was introduced to demonstrate the presence of nontrivial unidentifiability in nonlinear systems of ODEs. Nowadays, we can automatically find the identifiable combinations of parameters:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"using StructuralIdentifiability # hide\nfind_identifiable_functions(LLW1987)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"From these expressions, we see that the values of p1 and p3 are not identifiable but an unordered pair of numbers {p1, p3} is uniquely determined since p1 + p3 and p1 * p3 are known. Furthermore, we see that, for fixed input and output, p2 and p4 can take infinitely many values but knowing one of them, we would also be able to determine the other.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Moreover, we can find generators of all identifiable functions in parameters and states:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"find_identifiable_functions(LLW1987, with_states = true)","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"By default, find_identifiable_functions tries to simplify the output functions as much as possible, and it has simplify keyword responsible for the degree of simplification. The default value is :standard but one could use :strong to try to simplify further (at the expense of heavier computation) or use :weak to simplify less (but compute faster).","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"As assess_identifiability and assess_local_identifiability, find_identifiable_functions accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"Finally, as for assess_identifiability, an experimental feature allows to provide an additional keyword argument known_ic to inidcate functions of states and parameters for which the initial conditions are assumed to be known (while the initial conditions of the system are still assumed to be generic). In this case, the function will find identifiable functions of parameters and initial conditions rather than of parameters and states. Let us add an assumption that the initial condition x1(0) is known:","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"find_identifiable_functions(LLW1987, known_ic = [x1])","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"We see that x2(0) becomes an identifiable function as well, which is natural since x1(t) * x2(t) was an identifiable function before.","category":"page"},{"location":"tutorials/identifiable_functions/","page":"Globally Identifiable Functions","title":"Globally Identifiable Functions","text":"[1]: Y. Lecourtier, F. Lamnabhi-Lagarrigue, and E. Walter, A method to prove that nonlinear models can be unidentifiable, Proceedings of the 26th Conference on Decision and Control, December 1987, 2144-2145;","category":"page"},{"location":"tutorials/identifiability/#Identifiability-of-Differential-Models-(Local-and-Global)","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Recall that we consider ODE models in the state-space form","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"begincases\nmathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"where mathbfx(t) mathbfy(t), and mathbfu(t) are time-dependent states, outputs, and inputs, respectively, and mathbfp are scalar parameters. We will call that a parameter or a states (or a function of them) is identifiable if its value can be recovered from time series for inputs and outputs. Typically, two types of identifiability are distinguished","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"local identifiability: the value can be recovered up to finitely many options;\nglobal identifiability: the value can be recovered uniquely.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Note that in the case of states, term observability it typically used. We will use identifiability for both states and parameters for brevity and uniformity. While the notion of global identifiability is much more precise, assessing local identifiability is typically much faster, and can be performed for the models whose global identifiability analysis is out of reach.","category":"page"},{"location":"tutorials/identifiability/#Local-identifiability","page":"Identifiability of Differential Models (Local and Global)","title":"Local identifiability","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"We consider the Lotka-Volterra model:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"begincases\nx_1(t) = a x_1(t) - b x_1(t) x_2(t) + u(t)\nx_2(t) = -c x_2(t) + d x_1(t) x_2(t)\ny(t) = x_1(t)\nendcases","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"The local identifiability of all parameters and states in this model can be assessed as follows","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) - b * x1(t) * x2(t) + u(t),\n x2'(t) = -c * x2(t) + d * x1(t) * x2(t),\n y(t) = x1(t)\n)\n\nassess_local_identifiability(ode)","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"We see that x_1(t) is locally identifiable (no surprises, this is an output), a c and d are identifiable as well. On the other hand, x_2(t) and b are nonidentifiable. This can be explained by the following scaling symmetry","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"x_2(t) to lambda x_2(t) quad b to fracblambda","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"which preserves input and output for every nonzero lambda. The algorithm behind this call is the one due to Sedoglavic[1].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Function assess_local_identifiability has several optional parameters","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"funcs_to_check a list of specific functions of parameters and states to check identifiability for (see an example below). If not provided, the identifiability is assessed for all parameters and states.\nprob_threshold (default 099, i.e. 99%) is the probability of correctness. The algorithm can, in theory, produce wrong result, but the probability that it is correct is guaranteed to be at least prob_threshold. However, the probability bounds we use are quite conservative, so the actual probability of correctness is likely to be much higher.\ntype (default :SE). By default, the algorithm checks the standard single-experiment identifiability. If one sets type = :ME, then the algorithm checks multi-experiment identifiability, that is, identifiability from several experiments with independent initial conditions (the algorithm from [2] is used).\nloglevel (default Logging.Info). The minimal level of logging messages to be displayed. Available options: Logging.Debug, Logging.Info, Logging.Warn, and Logging.Error.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Note that the scaling symmetry given above suggests that b x_2(t) may in fact be identifiable. This can be checked using funcs_to_check parameter:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_local_identifiability(ode, funcs_to_check = [b * x2])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Indeed!","category":"page"},{"location":"tutorials/identifiability/#Global-identifiability","page":"Identifiability of Differential Models (Local and Global)","title":"Global identifiability","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"One can obtain more refined information about a model using assess_identifiability function. We will showcase it using the Goodwin oscillator model [3].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = -b * x1(t) + 1 / (c + x4(t)),\n x2'(t) = alpha * x1(t) - beta * x2(t),\n x3'(t) = gama * x2(t) - delta * x3(t),\n x4'(t) = sigma * x4(t) * (gama * x2(t) - delta * x3(t)) / x3(t),\n y(t) = x1(t)\n)\n\nassess_identifiability(ode)","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"As a result, each parameter/state is assigned one of the labels :globally (globally identifiable), :locally (locally but not globally identifiable), or :nonidentifiable (not identifiable, even locally). The algorithm behind this computation follows [4].","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Similarly to assess_local_identifiability, this function has optional parameters:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"funcs_to_check a list of specific functions of parameters and states to check identifiability for (see an example below). If not provided, the identifiability is assessed for all parameters and states. Note that the computations for states may be more involved than for the parameters, so one may want to call the function with funcs_to_check = ode.parameters if the call assess_identifiability(ode) takes too long.\nprob_threshold (default 099, i.e. 99%) is the probability of correctness. Same story as above: the probability estimates are very conservative, so the actual error probability is much lower than 1%. Also, currently, the probability of correctness does not include the probability of correctness of the modular reconstruction for Groebner bases. This probability is ensured by an additional check modulo a large prime, and can be neglected for practical purposes.\nloglevel (default Logging.Info). The minimal level of logging messages to be displayed. Available options: Logging.Debug, Logging.Info, Logging.Warn, and Logging.Error.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"Using funcs_to_check parameter, one can further inverstigate the nature of the lack of identifiability in the model at hand. For example, for the Goodwin oscillator, we can check if beta + delta and beta * delta are identifiable:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_identifiability(ode, funcs_to_check = [beta + delta, beta * delta])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"And we see that they indeed are. This means, in particular, that the reason why beta and delta are not identifiable is because their values can be exchanged. One may wonder how could we guess these functions beta + delta, beta * delta. In fact, they can be just computed using find_identifiable_functions function as we will explain in the next tutorial. Stay tuned!","category":"page"},{"location":"tutorials/identifiability/#Assuming-known-initial-conditions","page":"Identifiability of Differential Models (Local and Global)","title":"Assuming known initial conditions","text":"","category":"section"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"An experimental feature allows to provide an additional keyword argument known_ic to inidcate functions of states and parameters for which the initial conditions are assumed to be known (while the initial conditions of the system are still assumed to be generic). In this case, the identifiability will be assessed for parameters and all the initial conditions or for the initial conditions of funcs_to_check. Let us add an assumption that the initial conditions x2(0) and x3(0) are known:","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"assess_identifiability(ode, known_ic = [x2, x3])","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"And we see that now alpha and gama become locally identifiable.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[1]: A. Sedoglavic, A probabilistic algorithm to test local algebraic observability in polynomial time, Journal of Symbolic Computation, 2002.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[2]: A. Ovchinnikov, A. Pillay, G. Pogudin, T. Scanlon, Multi-experiment Parameter Identifiability of ODEs and Model Theory, SIAM Journal on Applied Algebra and Geometry, 2022.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[3]: D. Gonze, P. Ruoff, The Goodwin Oscillator and its Legacy, Acta Biotheoretica, 2020.","category":"page"},{"location":"tutorials/identifiability/","page":"Identifiability of Differential Models (Local and Global)","title":"Identifiability of Differential Models (Local and Global)","text":"[4]: R. Dong, C. Goodbrake, H. Harrington, G. Pogudin, Differential elimination for dynamical models via projections with applications to structural identifiability, SIAM Journal on Applied Algebra and Geometry, 2023.","category":"page"},{"location":"export/export/#Exporting-to-Other-Systems","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"","category":"section"},{"location":"export/export/","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"Here we put some helpful utilities to export your code to other identifiability software.","category":"page"},{"location":"export/export/","page":"Exporting to Other Systems","title":"Exporting to Other Systems","text":"print_for_maple\nprint_for_DAISY\nprint_for_GenSSI\nprint_for_COMBOS","category":"page"},{"location":"export/export/#StructuralIdentifiability.print_for_maple","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_maple","text":"print_for_maple(ode, package)\n\nPrints the ODE in the format accepted by maple packages\n\nSIAN (https://github.com/pogudingleb/SIAN) if package=:SIAN\nDifferentialAlgebra if package=:DifferentialAlgebra\nDifferentialThomas if package=:DifferentialThomas\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_DAISY","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_DAISY","text":"print_for_DAISY(ode)\n\nPrints the ODE in the format accepted by DAISY (https://daisy.dei.unipd.it/)\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_GenSSI","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_GenSSI","text":"print_for_GenSSI(ode)\n\nPrints the ODE in the format accepted by GenSSI 2.0 (https://github.com/genssi-developer/GenSSI)\n\n\n\n\n\n","category":"function"},{"location":"export/export/#StructuralIdentifiability.print_for_COMBOS","page":"Exporting to Other Systems","title":"StructuralIdentifiability.print_for_COMBOS","text":"print_for_COMBOS(ode)\n\nPrints the ODE in the format accepted by COMBOS (http://biocyb1.cs.ucla.edu/combos/)\n\n\n\n\n\n","category":"function"},{"location":"utils/util/#Other-Helpful-Functions","page":"Other Utilities","title":"Other Helpful Functions","text":"","category":"section"},{"location":"utils/util/","page":"Other Utilities","title":"Other Utilities","text":"Pages=[\"util.md\"]","category":"page"},{"location":"utils/util/","page":"Other Utilities","title":"Other Utilities","text":"Modules = [StructuralIdentifiability]\nPages = [\"util.jl\"]","category":"page"},{"location":"utils/util/#StructuralIdentifiability.compare_rational_func_by-Union{Tuple{By}, Tuple{Any, Any, By}, Tuple{Any, Any, By, Any}} where By","page":"Other Utilities","title":"StructuralIdentifiability.compare_rational_func_by","text":"compare_rational_func_by(f, g, by)\n\nReturns \n\n-1 if f < g,\n0 if f = g, and \n1 if f > g.\n\nFunctions' numerators and denominators are compared using by.\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.decompose_derivative-Tuple{String, Array{String}}","page":"Other Utilities","title":"StructuralIdentifiability.decompose_derivative","text":"decompose_derivative(varname, prefixes)\n\nDetermines if it is possible to represent the varname as a_number where a is an element of prefixes If yes, returns a pair (a, number), otherwise nothing\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.dennums_to_fractions-Union{Tuple{Array{Vector{T}, 1}}, Tuple{T}} where T","page":"Other Utilities","title":"StructuralIdentifiability.dennums_to_fractions","text":"dennums_to_fractions(dennums)\n\nReturns the field generators represented by fractions.\n\nInput: an array of arrays of polynomials, as in [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]\n\nOutput: an array of fractions [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.eval_at_dict-Union{Tuple{P}, Tuple{P, Dict{P, <:AbstractAlgebra.RingElem}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.eval_at_dict","text":"eval_at_dict(f, d)\n\nEvaluates a polynomial/rational function on a dictionary of type var => val and missing values are replaced with zeroes\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.extract_coefficients-Union{Tuple{P}, Tuple{P, Vector{P}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.extract_coefficients","text":"extract_coefficients(poly, variables)\n\nInput:\n\npoly - multivariate polynomial\nvariables - a list of variables from the generators of the ring of p\n\nOutput:\n\ndictionary with keys being tuples of length length(variables) and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.fractions_to_dennums-Tuple{Any}","page":"Other Utilities","title":"StructuralIdentifiability.fractions_to_dennums","text":"fractions_to_dennums(fractions)\n\nReturns the field generators represented by lists of denominators and numerators.\n\nInput: an array of fractions, as in [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]\n\nOutput: an array of arrays of polynomials, [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.gen_tag_name","page":"Other Utilities","title":"StructuralIdentifiability.gen_tag_name","text":"gen_tag_name(base; stop_words)\ngen_tag_names(n, base; stop_words)\n\nGenerates a string which will not collide with the words in stop_words.\n\nArguments\n\nn: Generates a sequence of unique strings of length n\nbase: A string or a vector of strings, the base for the generated sequence\nstop_words: A vector of strings, stop words\n\n\n\n\n\n","category":"function"},{"location":"utils/util/#StructuralIdentifiability.make_substitution-Union{Tuple{P}, NTuple{4, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Other Utilities","title":"StructuralIdentifiability.make_substitution","text":"make_substitution(f, var_sub, val_numer, val_denom)\n\nSubstitute a variable in a polynomial with an expression\n\nInput:\n\nf - the polynomial\nvar_sub - the variable to be substituted\nvar_numer - numerator of the substitution expression\nvar_denom - denominator of the substitution expression\n\nOutput:\n\npolynomial - result of substitution\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.parent_ring_change-Tuple{AbstractAlgebra.MPolyRingElem, AbstractAlgebra.MPolyRing}","page":"Other Utilities","title":"StructuralIdentifiability.parent_ring_change","text":"parent_ring_change(poly, new_ring)\n\nConverts a polynomial to a different polynomial ring Input\n\npoly - a polynomial to be converted\nnew_ring - a polynomial ring such that every variable name appearing in poly appears among the generators\n\nOutput:\n\na polynomial in new_ring “equal” to poly\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.replace_with_ic-Tuple{Any, Any}","page":"Other Utilities","title":"StructuralIdentifiability.replace_with_ic","text":"replace_with_ic(ode::ODE, funcs)\n\nTakes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0). Function is used to prepare the output for the case of known initial conditions\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.switch_ring-Tuple{AbstractAlgebra.MPolyRingElem, AbstractAlgebra.MPolyRing}","page":"Other Utilities","title":"StructuralIdentifiability.switch_ring","text":"switch_ring(v, ring)\n\nFor a variable v, returns a variable in ring with the same name\n\n\n\n\n\n","category":"method"},{"location":"utils/util/#StructuralIdentifiability.uncertain_factorization-Tuple{AbstractAlgebra.MPolyRingElem{Nemo.QQFieldElem}}","page":"Other Utilities","title":"StructuralIdentifiability.uncertain_factorization","text":"uncertain_factorization(f)\n\nInput:\n\nf - polynomial with rational coefficients\n\nOutput:\n\nlist of pairs (div, certainty) where\ndiv's are divisors of f such that f is their product with certain powers\nif certainty is true, div is Q-irreducible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#Wronskian-Tools","page":"Wronskian Tools","title":"Wronskian Tools","text":"","category":"section"},{"location":"utils/wronskian/","page":"Wronskian Tools","title":"Wronskian Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"wronskian.jl\"]","category":"page"},{"location":"utils/wronskian/#StructuralIdentifiability.get_max_below-Tuple{StructuralIdentifiability.ExpVectTrie, Vector{Int64}}","page":"Wronskian Tools","title":"StructuralIdentifiability.get_max_below","text":"get_max_below(t, vect)\n\nInput:\n\nt - a trie with exponent vectors\nvect - yet another exponent vector\n\nOutput:\n\na pair (d, v) where v is a vector in the trie which is componentwise ≤ vect and the difference d is as small as possible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.massive_eval-Tuple{Any, Any}","page":"Wronskian Tools","title":"StructuralIdentifiability.massive_eval","text":"massive_eval(polys, eval_dict)\n\nInput:\n\npolys - a list of polynomials\neval_dict - dictionary from variables to the values. Missing values are treated as zeroes\n\nOutput:\n\na list of values of the polynomials\n\nEvaluates a list of polynomials at a point. Assumes that multiplications are relatively expensive (like in truncated power series) so all the monomials are precomputed first and the values of monomials of lower degree are cached and used to compute the values of the monomials of higher degree\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.monomial_compress-Tuple{Any, ODE}","page":"Wronskian Tools","title":"StructuralIdentifiability.monomial_compress","text":"monomial_compress(io_equation, ode)\n\nCompresses an input-output equation for the rank computation Input:\n\nio_equation - input-output equation\node - the corresponding ODE model\n\nOutput:\n\npair (coeffs, terms) such that:\nsum of coeffs[i] * terms[i] = io_equation\ncoeffs involve only parameters, terms involve only inputs and outputs\nlength of the representation is the smallest possible\n\n\n\n\n\n","category":"method"},{"location":"utils/wronskian/#StructuralIdentifiability.wronskian-Union{Tuple{P}, Tuple{Dict{P, P}, ODE{P}}} where P<:AbstractAlgebra.MPolyRingElem","page":"Wronskian Tools","title":"StructuralIdentifiability.wronskian","text":"wronskian(io_equations, ode)\n\nInput:\n\nio_equations - a set of io-equations in the form of the Dict as returned by find_ioequations\node - the ODE object\n\nOutput:\n\na list of Wronskians evaluated at a point modulo prime\n\nComputes the Wronskians of io_equations\n\n\n\n\n\n","category":"method"},{"location":"utils/global_identifiability/#Global-Identifiability-Tools","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"","category":"section"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"Pages=[\"global_identifiability.md\"]","category":"page"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"CurrentModule=StructuralIdentifiability","category":"page"},{"location":"utils/global_identifiability/","page":"Global Identifiability Tools","title":"Global Identifiability Tools","text":"StructuralIdentifiability.RationalFunctionField\nStructuralIdentifiability.field_contains\nStructuralIdentifiability.get_degree_and_coeffsize","category":"page"},{"location":"utils/global_identifiability/#StructuralIdentifiability.RationalFunctionField","page":"Global Identifiability Tools","title":"StructuralIdentifiability.RationalFunctionField","text":"RationalFunctionField\n\nA subfield of the field of rational functions over the rationals.\n\nExample\n\nusing Nemo\nusing StructuralIdentifiability: RationalFunctionField\n\nR, (x, y, z) = QQ[\"x\", \"y\", \"z\"]\n\n# Constructs a subfield generated by x / y, y / z\nrff = RationalFunctionField([x // y, y // z])\n\n# Constructs a subfield generated by y / x, 1 / x, z / y\nrff = RationalFunctionField([[x, y, R(1)], [y, z]])\n\n\n\n\n\n","category":"type"},{"location":"utils/global_identifiability/#StructuralIdentifiability.field_contains","page":"Global Identifiability Tools","title":"StructuralIdentifiability.field_contains","text":"field_contains(field, ratfuncs, prob_threshold)\n\nChecks whether given rational function field field contains given rational functions ratfuncs (represented as a list of lists). The result is correct with probability at least prob_threshold\n\nInputs:\n\nfield - a rational function field\nratfuncs - a list of lists of polynomials. Each of the lists, say, [f1, ..., fn], defines generators f2/f1, ..., fn/f1.\nprob_threshold real number from (0, 1)\n\nOutput:\n\na list L[i] of bools of length length(rat_funcs) such that L[i] is true iff the i-th function belongs to field\n\n\n\n\n\n","category":"function"},{"location":"utils/global_identifiability/#StructuralIdentifiability.get_degree_and_coeffsize","page":"Global Identifiability Tools","title":"StructuralIdentifiability.get_degree_and_coeffsize","text":"get_degree_and_coeffsize(f)\n\nfor f being a polynomial/rational function over rationals (QQ) returns a tuple (degree, max_coef_size)\n\n\n\n\n\n","category":"function"},{"location":"utils/reparametrization/#Model-reparametrization","page":"Model reparametrization","title":"Model reparametrization","text":"","category":"section"},{"location":"utils/reparametrization/","page":"Model reparametrization","title":"Model reparametrization","text":"StructuralIdentifiability.reparametrize_global","category":"page"},{"location":"utils/reparametrization/#StructuralIdentifiability.reparametrize_global","page":"Model reparametrization","title":"StructuralIdentifiability.reparametrize_global","text":"reparametrize_global(ode, options...)\n\nFinds a reparametrization of ode in terms of globally identifiabile functions.\n\nReturns a tuple (new_ode, new_vars, implicit_relations), such that:\n\nnew_ode is the reparametrized ODE system\nnew_vars is a mapping from the new variables to the original ones\nrelations is the array of implicit algebraic relations among new_vars. Usually, relations is empty.\n\nOptions\n\nThe function accepts the following optional arguments.\n\nseed: A float in the range from 0 to 1, random seed (default is seed = 42). \nprob_threshold: The probability of correctness (default is prob_threshold = 0.99).\n\nExample\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) - b*x1(t)*x2(t),\n x2'(t) = -c * x2(t) + d*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nnew_ode, new_vars, relations = reparametrize_global(ode)\n\nThen, we have the following:\n\n# new_ode\nX2'(t) = X1(t)*X2(t)*a2 - X2(t)*a1\nX1'(t) = -X1(t)*X2(t) + X1(t)*a3\ny1(t) = X1(t)\n\n# new_vars\nDict{Nemo.QQMPolyRingElem, AbstractAlgebra.Generic.FracFieldElem{Nemo.QQMPolyRingElem}} with 6 entries:\n X2 => b*x2\n y1 => y\n X1 => x1\n a2 => d\n a3 => a\n a1 => c\n\nNotice that the new_ode is fully identifiabile, and has 1 less parameter compared to the original one.\n\n\n\n\n\n","category":"function"},{"location":"utils/power_series_utils/#Power-Series-Utilities","page":"Power Series Tools","title":"Power Series Utilities","text":"","category":"section"},{"location":"utils/power_series_utils/","page":"Power Series Tools","title":"Power Series Tools","text":"Pages =[\"power_series_utils.md\"]","category":"page"},{"location":"utils/power_series_utils/","page":"Power Series Tools","title":"Power Series Tools","text":"Modules = [StructuralIdentifiability]\nPages = [\"power_series_utils.jl\"]","category":"page"},{"location":"utils/power_series_utils/#StructuralIdentifiability._matrix_inv_newton_iteration-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{T}, AbstractAlgebra.MatElem{T}}} where T<:(AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem})","page":"Power Series Tools","title":"StructuralIdentifiability._matrix_inv_newton_iteration","text":"_matrix_inv_newton_iteration(M, Minv)\n\nPerforms a single step of Newton iteration for inverting M with Minv being a partial result\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_diff-Tuple{AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.RingElem}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_diff","text":"ps_diff(ps)\n\nInput:\n\nps - (absolute capped) univariate power series\n\nOutput:\n\nthe derivative of ps\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_integrate-Tuple{AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_integrate","text":"ps_integrate(ps)\n\nInput:\n\nps - (absolute capped) univariate power series\n\nOutput:\n\nthe integral of ps without constant term\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_homlinear_de-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}, Int64}} where T<:AbstractAlgebra.FieldElem","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_homlinear_de","text":"ps_matrix_homlinear_de(A, Y0, prec)\n\nInput:\n\nA - a square matrix with entries in a univariate power series ring\nY0 - a square invertible matrix over the base field\n\nOutput:\n\nmatrix Y such that Y' = AY up to precision of A - 1 and Y(0) = Y0\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_inv","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_inv","text":"ps_matrix_inv(M, prec)\n\nInput:\n\nM - a square matrix with entries in a univariate power series ring it is assumed that M(0) is invertible and all entries having the same precision\nprec - an integer, precision, if -1 then defaults to precision of M\n\nOutput:\n\nthe inverse of M computed up to prec\n\n\n\n\n\n","category":"function"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_linear_de-Union{Tuple{T}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}}, Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{T}}, AbstractAlgebra.MatElem{<:T}, Int64}} where T<:AbstractAlgebra.FieldElem","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_linear_de","text":"ps_matrix_linear_de(A, B, Y0, prec)\n\nInput:\n\nA, B - square matrices with entries in a univariate power series ring\nY0 - a matrix over the base field with the rows number the same as A\n\nOutput:\n\nmatrix Y such that Y' = AY + B up to precision of A - 1 and Y(0) = Y0\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_matrix_log-Tuple{AbstractAlgebra.MatElem{<:AbstractAlgebra.AbsPowerSeriesRingElem{<:AbstractAlgebra.FieldElem}}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_matrix_log","text":"ps_matrix_log(M)\n\nInput:\n\nM - a square matrix with entries in a univariate power series ring it is assumed that M(0) is the identity\n\nOutput:\n\nthe natural log of M\n\n\n\n\n\n","category":"method"},{"location":"utils/power_series_utils/#StructuralIdentifiability.ps_ode_solution-Union{Tuple{P}, Tuple{T}, Tuple{Vector{P}, Dict{P, T}, Dict{P, Vector{T}}, Int64}} where {T<:AbstractAlgebra.FieldElem, P<:AbstractAlgebra.MPolyRingElem{T}}","page":"Power Series Tools","title":"StructuralIdentifiability.ps_ode_solution","text":"ps_ode_solution(equations, ic, inputs, prec)\n\nInput:\n\nequations - a system of the form A(x u mu)x - B(x u mu) = 0, where A is a generically nonsingular square matrix. Assumption: A is nonzero at zero\nic - initial conditions for x's (dictionary)\ninputs - power series for inputs represented as arrays (dictionary)\nprec - precision of the solution\n\nOutput:\n\npower series solution of the system\n\n\n\n\n\n","category":"method"},{"location":"identifiability/identifiability/#Functions-to-Assess-Identifiability","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/#Assessing-All-Types-of-Identifiability","page":"Functions to Assess Identifiability","title":"Assessing All Types of Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"assess_identifiability","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.assess_identifiability","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.assess_identifiability","text":"assess_identifiability(ode; funcs_to_check = [], prob_threshold=0.99, loglevel=Logging.Info)\n\nInput:\n\node - the ODE model\nfuncs_to_check - list of functions to check identifiability for; if empty, all parameters and states are taken\nknown_ic: a list of functions whose initial conditions are assumed to be known, then the returned identifiable functions will be functions of parameters and initial conditions, not states (this is an experimental functionality).\nprob_threshold - probability of correctness.\nloglevel - the minimal level of log messages to display (Logging.Info by default)\n\nAssesses identifiability of a given ODE model. The result is guaranteed to be correct with the probability at least prob_threshold. The function returns an (ordered) dictionary from the functions to check to their identifiability properties (one of :nonidentifiable, :locally, :globally).\n\n\n\n\n\n","category":"function"},{"location":"identifiability/identifiability/#Assessing-Local-Identifiability","page":"Functions to Assess Identifiability","title":"Assessing Local Identifiability","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"assess_local_identifiability","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.assess_local_identifiability","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.assess_local_identifiability","text":"assess_local_identifiability(ode::ODE{P}; funcs_to_check::Array{<: Any, 1}, prob_threshold::Float64=0.99, type=:SE, loglevel=Logging.Info) where P <: MPolyRingElem{Nemo.QQFieldElem}\n\nChecks the local identifiability/observability of the functions in funcs_to_check. The result is correct with probability at least prob_threshold.\n\nCall this function if you have a specific collection of parameters of which you would like to check local identifiability.\n\ntype can be either :SE (single-experiment identifiability) or :ME (multi-experiment identifiability). If the type is :ME, states are not allowed to appear in the funcs_to_check.\n\n\n\n\n\nassess_local_identifiability(dds::DDS{P}; funcs_to_check::Array{<: Any, 1}, known_ic, prob_threshold::Float64=0.99, loglevel=Logging.Info) where P <: MPolyRingElem{Nemo.QQFieldElem}\n\nChecks the local identifiability/observability of the functions in funcs_to_check. The result is correct with probability at least prob_threshold. A list of quantities can be provided as known_ic for which the initial conditions can be assumed to be known and generic.\n\n\n\n\n\n","category":"function"},{"location":"identifiability/identifiability/#Finding-Identifiable-Functions","page":"Functions to Assess Identifiability","title":"Finding Identifiable Functions","text":"","category":"section"},{"location":"identifiability/identifiability/","page":"Functions to Assess Identifiability","title":"Functions to Assess Identifiability","text":"find_identifiable_functions","category":"page"},{"location":"identifiability/identifiability/#StructuralIdentifiability.find_identifiable_functions","page":"Functions to Assess Identifiability","title":"StructuralIdentifiability.find_identifiable_functions","text":"find_identifiable_functions(ode::ODE; options...)\n\nFinds all functions of parameters/states that are identifiable in the given ODE system.\n\nOptions\n\nThis functions takes the following optional arguments:\n\nwith_states: When true, also reports the identifiabile functions in the ODE states. Default is false.\nsimplify: The extent to which the output functions are simplified. Stronger simplification may require more time. Possible options are:\n:standard: Default simplification.\n:weak: Weak simplification. This option is the fastest, but the output functions can be quite complex.\n:strong: Strong simplification. This option is the slowest, but the output\nfunctions are nice and simple.\n:absent: No simplification.\nknown_ic: a list of functions whose initial conditions are assumed to be known, then the returned identifiable functions will be functions of parameters and initial conditions, not states (this is an experimental functionality).\nprob_threshold: A float in the range from 0 to 1, the probability of correctness. Default is 0.99.\nseed: The rng seed. Default value is 42.\nloglevel - the minimal level of log messages to display (Logging.Info by default)\n\nExample\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x0'(t) = -(a01 + a21) * x0(t) + a12 * x1(t),\n x1'(t) = a21 * x0(t) - a12 * x1(t),\n y(t) = x0(t)\n)\n\nfind_identifiable_functions(ode)\n\n# prints\n3-element Vector{AbstractAlgebra.Generic.FracFieldElem{Nemo.QQMPolyRingElem}}:\n a12 + a01 + a21\n a12*a01\n\n\n\n\n\n","category":"function"},{"location":"utils/elimination/#Elimination","page":"Elimination","title":"Elimination","text":"","category":"section"},{"location":"utils/elimination/","page":"Elimination","title":"Elimination","text":"Pages=[\"elimination.md\"]","category":"page"},{"location":"utils/elimination/","page":"Elimination","title":"Elimination","text":"Modules = [StructuralIdentifiability]\nPages = [\"elimination.jl\"]","category":"page"},{"location":"utils/elimination/#StructuralIdentifiability.Bezout_matrix-Union{Tuple{P}, Tuple{P, P, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.Bezout_matrix","text":"Bezout_matrix(f, g, var_elim)\n\nCompute the Bezout matrix of two polynomials f, g with respect to var_elim\n\nInputs:\n\nf - first polynomial\ng - second polynomial\nvar_elim - variable, of which f and g are considered as polynomials\n\nOutput:\n\nM::MatrixElem - The Bezout matrix\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.Sylvester_matrix-Union{Tuple{P}, Tuple{P, P, P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.Sylvester_matrix","text":"Sylvester_matrix(f, g, var_elim)\n\nCompute the Sylvester matrix of two polynomials f, g with respect to var_elim Inputs:\n\nf - first polynomial\ng - second polynomial\nvar_elim - variable, of which f and g are considered as polynomials\n\nOutput:\n\nM::MatrixElem - The Sylvester matrix\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.choose-Union{Tuple{P}, Tuple{Vector{P}, Any}} where P<:(AbstractAlgebra.MPolyRingElem{<:AbstractAlgebra.FieldElem})","page":"Elimination","title":"StructuralIdentifiability.choose","text":"choose(polys, generic_point_generator)\n\nInput:\n\npolys - an array of distinct irreducible polynomials in the same ring\ngeneric_point_generator - a generic point generator as described above for one of polys\n\nOutput:\n\nthe polynomial that vanishes at the generic_point_generator\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.eliminate_var-Union{Tuple{P}, Tuple{P, P, P, Any}} where P<:(AbstractAlgebra.MPolyRingElem{<:AbstractAlgebra.FieldElem})","page":"Elimination","title":"StructuralIdentifiability.eliminate_var","text":"eliminate_var(f, g, var_elim, generic_point_generator)\n\nEliminate a variable from a pair of polynomials\n\nInput:\n\nf and g - polynomials\nvar_elim - variable to be eliminated\ngeneric_point_generator - a generic point generator object for the factor of the resultant of f and g of interest\n\nOutput:\n\npolynomial - the desired factor of the resultant of f and g\n\n\n\n\n\n","category":"method"},{"location":"utils/elimination/#StructuralIdentifiability.simplify_matrix-Union{Tuple{AbstractAlgebra.MatElem{P}}, Tuple{P}} where P<:AbstractAlgebra.MPolyRingElem","page":"Elimination","title":"StructuralIdentifiability.simplify_matrix","text":"simplify_matrix(M)\n\nEliminate GCD of entries of every row and column\n\nInput:\n\nM::MatrixElem - matrix to be simplified\n\nOutput:\n\nM::MatrixElem - Simplified matrix\nextra_factors::Vector{AbstractAlgebra.MPolyRingElem} - array of GCDs eliminated from M.\n\n\n\n\n\n","category":"method"},{"location":"tutorials/discrete_time/#Identifiability-of-Discrete-Time-Models-(Local)","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"","category":"section"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Now we consider a discrete-time model in the state-space form. Such a model is typically written either in terms of shift:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"begincases\nmathbfx(t + 1) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"or in terms of difference","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"begincases\nDeltamathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases quad textwhere quad Delta mathbfx(t) = mathbfx(t + 1) - mathbfx(t)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"In both cases,mathbfx(t) mathbfy(t), and mathbfu(t) are time-dependent states, outputs, and inputs, respectively, and mathbfp are scalar parameters. As in the ODE case, we will call that a parameter or a states (or a function of them) is identifiable if its value can be recovered from time series for inputs and outputs (in the generic case, see Definition 3 in [1] for details). Again, we will distinguish two types of identifiability","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"local identifiability: the value can be recovered up to finitely many options;\nglobal identifiability: the value can be recovered uniquely.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Currently, StructuralIdentifiability.jl allows to assess only local identifiability for discrete-time models, and below we will describe how this can be done. As a running example, we will use the following discrete version of the SIR model:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"\nbegincases\nS(t + 1) = S(t) - beta S(t) I(t)\nI(t + 1) = I(t) + beta S(t) I(t) - alpha I(t)\nR(t + 1) = R(t) + alpha I(t)\ny(t) = I(t)\nendcases\nquad textor\nquad\nbegincases\nDelta S(t) = -beta S(t) I(t)\nDelta I(t) = beta S(t) I(t) - alpha I(t)\nDelta R(t) = alpha I(t)\ny(t) = I(t)\nendcases","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"where the observable is I, the number of infected people. The native way to define such a model in StructuralIdentifiability is to use @DDSmodel macro which uses the shift notation:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"using StructuralIdentifiability\n\ndds = @DDSmodel(\n S(t + 1) = S(t) - β * S(t) * I(t),\n I(t + 1) = I(t) + β * S(t) * I(t) - α * I(t),\n R(t + 1) = R(t) + α * I(t),\n y(t) = I(t)\n)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"Then local identifiability can be assessed using assess_local_identifiability function:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(dds)","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"For each parameter or state, the value in the returned dictionary is true (1) if the parameter is locally identifiable and false (0) otherwise. We see that R(t) is not identifiable, which makes sense: it does not affect the dynamics of the observable in any way.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"The assess_local_identifiability function has three important keyword arguments:","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"funcs_to_check is a list of functions for which one want to assess identifiability, for example, the following code will check if β * S is locally identifiable.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"assess_local_identifiability(dds; funcs_to_check = [β * S])","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"prob_threshold is the probability of correctness (default value 0.99, i.e., 99%). The underlying algorithm is a Monte-Carlo algorithm, so in principle it may produce incorrect result but the probability of correctness of the returned result is guaranteed to be at least prob_threshold (in fact, the employed bounds are quite conservative, so in practice incorrect result is almost never produced).\nknown_ic is a list of the states for which initial conditions are known. In this case, the identifiability results will be valid not at any time point t but only at t = 0.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"As other main functions in the package, assess_local_identifiability accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"The implementation is based on a version of the observability rank criterion and will be described in a forthcoming paper.","category":"page"},{"location":"tutorials/discrete_time/","page":"Identifiability of Discrete-Time Models (Local)","title":"Identifiability of Discrete-Time Models (Local)","text":"[1]: S. Nõmm, C. Moog, Identifiability of discrete-time nonlinear systems, IFAC Proceedings Volumes, 2004.","category":"page"},{"location":"tutorials/creating_ode/#Creating-ODE-System","page":"Creating ODE System","title":"Creating ODE System","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Most of the algorithms in StructuralIdentifiability.jl take as input system of ordinary differential equations (ODEs) in the state space form, that is:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"begincases\nmathbfx(t) = mathbff(mathbfx(t) mathbfp mathbfu(t))\nmathbfy(t) = mathbfg(mathbfx(t) mathbfp mathbfu(t))\nendcases","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"which involves","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"a vector mathbfx(t) of the state variables of the system,\na vector mathbfu(t) of external inputs,\na vector mathbfp of scalar parameters,\na vector mathbfy(t) of outputs (i.e., observations),\nand vectors of rational functions mathbff and mathbfg (for discussion of the non-rational case, see this issue).","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"In the standard setup, inputs and outputs are assumed to be known, and the goal is to assess identifiability of parameters and/or states from the input-output data. In the case of states, this property is also called observability.","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"There are two ways to define such a system to be processed using StructuralIdentifiability.jl. We will demonstrate them using the following example system (Wright's population model of two mutualist species with control[1]):","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"begincases\nx_1(t) = r_1 x_1(t)(1 - c_1 x_1(t)) + fracbeta_1 x_1(t)x_2(t)chi_1 + x_2(t) + u(t)\nx_2(t) = r_2 x_2(t)(1 - c_2 x_2(t)) + fracbeta_2 x_1(t)x_2(t)chi_2 + x_1(t)\ny(t) = x_1(t)\nendcases","category":"page"},{"location":"tutorials/creating_ode/#Defining-the-model-using-@ODEmodel-macro","page":"Creating ODE System","title":"Defining the model using @ODEmodel macro","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"One way to define the model is to use the @ODEmodel macro provided by the StructuralIdentifiability.jl package.","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"using StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) =\n r1 * x1(t) * (1 - c1 * x1(t)) + beta1 * x1(t) * x2(t) / (chi1 + x2(t)) + u(t),\n x2'(t) = r2 * x2(t) * (1 - c2 * x2(t)) + beta2 * x1(t) * x2(t) / (chi2 + x1(t)),\n y(t) = x1(t)\n)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Then one can, for example, assess identifiability of the parameters and states by","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"assess_identifiability(ode)","category":"page"},{"location":"tutorials/creating_ode/#Defining-using-ModelingToolkit","page":"Creating ODE System","title":"Defining using ModelingToolkit","text":"","category":"section"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"StructuralIdentifiability has an extension ModelingToolkitSIExt which allows to use ODESystem from ModelingToolkit to describe a model. The extension is loaded automatically once ModelingToolkit is loaded via using ModelingToolkit. In this case, one should encode the equations for the states as ODESystem and specify the outputs separately. In order to do this, we first introduce all functions and scalars:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"using StructuralIdentifiability, ModelingToolkit\n\n@parameters r1, r2, c1, c2, beta1, beta2, chi1, chi2\n@variables t, x1(t), x2(t), y(t), u(t)\n\nD = Differential(t)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"And then defined the system and separately the outputs:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"eqs = [\n D(x1) ~ r1 * x1 * (1 - c1 * x1) + beta1 * x1 * x2 / (chi1 + x2) + u,\n D(x2) ~ r2 * x2 * (1 - c2 * x2) + beta2 * x1 * x2 / (chi2 + x1),\n]\n\nmeasured_quantities = [y ~ x1]\n\node_mtk = ODESystem(eqs, t, name = :mutualist)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"Then, for example, the identifiability of parameters and states can be assessed as follows:","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"assess_identifiability(ode_mtk, measured_quantities = measured_quantities)","category":"page"},{"location":"tutorials/creating_ode/","page":"Creating ODE System","title":"Creating ODE System","text":"[1]: D. H. Wright, A Simple, Stable Model of Mutualism Incorporating Handling Time, The American Naturalist, 1989, 134(4).","category":"page"},{"location":"ioequations/ioequations/#Finding-Input-Output-Equations","page":"Input-Output Equation tools","title":"Finding Input-Output Equations","text":"","category":"section"},{"location":"ioequations/ioequations/","page":"Input-Output Equation tools","title":"Input-Output Equation tools","text":"find_ioequations","category":"page"},{"location":"ioequations/ioequations/#StructuralIdentifiability.find_ioequations","page":"Input-Output Equation tools","title":"StructuralIdentifiability.find_ioequations","text":"find_ioequations(ode, [var_change_policy=:default])\n\nFinds the input-output equations of an ODE system Input:\n\node - the ODE system\nvar_change_policy - whether to perform automatic variable change, can be one of :default, :yes, :no\nloglevel - logging level (default: Logging.Info)\n\nOutput:\n\na dictionary from “leaders” to the corresponding input-output equations; if an extra projection is needed, it will be the value corresponding to rand_proj_var\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#Reducing-with-respect-to-Input-Output-Equations","page":"Input-Output Equation tools","title":"Reducing with respect to Input-Output Equations","text":"","category":"section"},{"location":"ioequations/ioequations/","page":"Input-Output Equation tools","title":"Input-Output Equation tools","text":"PBRepresentation\npseudodivision\ndiffreduce\nio_switch!","category":"page"},{"location":"ioequations/ioequations/#StructuralIdentifiability.PBRepresentation","page":"Input-Output Equation tools","title":"StructuralIdentifiability.PBRepresentation","text":"The structure for storing a projection-based representation of differential ideal (see Section 2.3 https://arxiv.org/abs/2111.00991). Contains the following fields:\n\ny_names - the names of the variables with finite order in the profile (typically, outputs)\nu_names - the names of the variables with infinite order in the profile (typically, inputs)\nparam_names - the names of the parameters\nprofile - the profile of the PB-representation (see Definition 2.13) as a dict from y_names with finite orders to the orders\nprojections - the corresponding projections (see Definition 2.15) as a dict from y_names to the projections\n\n\n\n\n\n","category":"type"},{"location":"ioequations/ioequations/#StructuralIdentifiability.pseudodivision","page":"Input-Output Equation tools","title":"StructuralIdentifiability.pseudodivision","text":"pseudodivision(f, g, x)\n\nComputes the result of pseudodivision of f by g as univariate polynomials in x Input:\n\nf - the polynomial to be divided\ng - the polynomial to divide by\nx - the variable for the division\n\nOutput: the pseudoremainder of f divided by g w.r.t. x\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#StructuralIdentifiability.diffreduce","page":"Input-Output Equation tools","title":"StructuralIdentifiability.diffreduce","text":"diffreduce(diffpoly, pbr)\n\nComputes the result of differential reduction of a differential polynomial diffpoly with respect to the charset defined by a PB-representation pbr Input:\n\ndiffpoly - a polynomial representing a differential polynomial to be reduced\npbr - a projection-based representation\n\nOutput: the result of differential reduction of diffpoly by pbr considered as a characteristic set (see Remark 2.20 in the paper)\n\n\n\n\n\n","category":"function"},{"location":"ioequations/ioequations/#StructuralIdentifiability.io_switch!","page":"Input-Output Equation tools","title":"StructuralIdentifiability.io_switch!","text":"io_switch(pbr)\n\nIn a single-output pb-representation pbr makes the leading variable to be the first of the inputs\n\n\n\n\n\n","category":"function"},{"location":"utils/local_identifiability/#Local-Identifiability-Tools","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"","category":"section"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"Pages=[\"local_identifiability.md\"]","category":"page"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"CurrentModule=StructuralIdentifiability","category":"page"},{"location":"utils/local_identifiability/","page":"Local Identifiability Tools","title":"Local Identifiability Tools","text":"StructuralIdentifiability.differentiate_solution\nStructuralIdentifiability.differentiate_output","category":"page"},{"location":"utils/local_identifiability/#StructuralIdentifiability.differentiate_solution","page":"Local Identifiability Tools","title":"StructuralIdentifiability.differentiate_solution","text":"differentiate_solution(ode, params, ic, inputs, prec)\n\nInput:\n\nthe same as for power_series_solutions\n\nOutput:\n\na tuple consisting of the power series solution and a dictionary of the form (u, v) => power series, where u is a state variable v is a state or parameter, and the power series is the partial derivative of the function u w.r.t. v evaluated at the solution\n\n\n\n\n\n","category":"function"},{"location":"utils/local_identifiability/#StructuralIdentifiability.differentiate_output","page":"Local Identifiability Tools","title":"StructuralIdentifiability.differentiate_output","text":"differentiate_output(ode, params, ic, inputs, prec)\n\nSimilar to differentiate_solution but computes partial derivatives of prescribed outputs returns a dictionary of the form y_function => Dict(var => dy/dvar) where dy/dvar is the derivative of y_function with respect to var.\n\n\n\n\n\n","category":"function"},{"location":"#StructuralIdentifiability.jl","page":"Home","title":"StructuralIdentifiability.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StructuralIdentifiability.jl is a comprehensive toolbox for assessing identifiability parameters.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"To install StructuralIdentifiability.jl, use the Julia package manager:","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg\nPkg.add(\"StructuralIdentifiability\")","category":"page"},{"location":"#Citation","page":"Home","title":"Citation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"@article{structidjl,\n author = {Dong, R. and Goodbrake, C. and Harrington, H. and Pogudin G.},\n title = {Differential Elimination for Dynamical Models via Projections with Applications to Structural Identifiability},\n journal = {SIAM Journal on Applied Algebra and Geometry},\n url = {https://doi.org/10.1137/22M1469067},\n year = {2023}\n volume = {7},\n number = {1},\n pages = {194-235}\n}","category":"page"},{"location":"#Feature-Summary","page":"Home","title":"Feature Summary","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StructuralIdentifiability.jl can assess local and global identifiability of ODE models. In addition to these straightforward identifiability queries on individual parameters, the package can distinguish between single- and multi-experiment identifiability.","category":"page"},{"location":"#Feature-List","page":"Home","title":"Feature List","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Local identifiability checks\nGlobal identifiability checks\nAssessment of identifiable functions of parameters and states\nModel reparametrization (experimental)","category":"page"},{"location":"#Contributing","page":"Home","title":"Contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Please refer to the SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages for guidance on PRs, issues, and other matters relating to contributing to StructuralIdentifiability.\nThere are a few community forums:\nThe #diffeq-bridged channel in the Julia Slack\nJuliaDiffEq on Gitter\nOn the Julia Discourse forums\nSee also SciML Community page","category":"page"},{"location":"#Reproducibility","page":"Home","title":"Reproducibility","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"
The documentation of this SciML package was built using these direct dependencies,","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg # hide\nPkg.status() # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"
and using this machine and Julia version.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using InteractiveUtils # hide\nversioninfo() # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"
A more complete overview of all dependencies and their versions is also provided.","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg # hide\nPkg.status(; mode = PKGMODE_MANIFEST) # hide","category":"page"},{"location":"","page":"Home","title":"Home","text":"
","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can also download the \nmanifest file and the\nproject file.","category":"page"},{"location":"input/input/#Parsing-input-system","page":"Parsing input system","title":"Parsing input system","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"@ODEmodel(ex::Expr...)\nODE\nset_parameter_values","category":"page"},{"location":"input/input/#StructuralIdentifiability.@ODEmodel-Tuple{Vararg{Expr}}","page":"Parsing input system","title":"StructuralIdentifiability.@ODEmodel","text":"macro ODEmodel\n\nMacro for creating an ODE from a list of equations. It also injects all variables into the global scope.\n\nExample\n\nCreating a simple ODE:\n\nusing StructuralIdentifiability\n\node = @ODEmodel(\n x1'(t) = a * x1(t) + u(t),\n x2'(t) = b * x2(t) + c*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nHere,\n\nx1, x2 are state variables\ny is an output variable\nu is an input variable\na, b, c are time-independent parameters\n\n\n\n\n\n","category":"macro"},{"location":"input/input/#StructuralIdentifiability.ODE","page":"Parsing input system","title":"StructuralIdentifiability.ODE","text":"The main structure that represents input ODE system.\n\nStores information about states (x_vars), outputs (y_vars), inputs (u_vars), parameters (parameters) and the equations.\n\nThis structure is constructed via @ODEmodel macro.\n\n\n\n\n\n","category":"type"},{"location":"input/input/#StructuralIdentifiability.set_parameter_values","page":"Parsing input system","title":"StructuralIdentifiability.set_parameter_values","text":"set_parameter_values(ode, param_values)\n\nInput:\n\node - an ODE as above\nparam_values - values for (possibly, some of) the parameters as dictionary parameter => value\n\nOutput:\n\nnew ode with the parameters in param_values plugged with the given numbers\n\n\n\n\n\n","category":"function"},{"location":"input/input/#Create-Compartmental-Model","page":"Parsing input system","title":"Create Compartmental Model","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"linear_compartment_model","category":"page"},{"location":"input/input/#StructuralIdentifiability.linear_compartment_model","page":"Parsing input system","title":"StructuralIdentifiability.linear_compartment_model","text":"linear_compartment_model(graph, inputs, outputs, leaks)\n\nInput: defines a linear compartment model with nodes numbered from 1 to n by\n\ngraph - and array of integer arrays representing the adjacency lists of the graph\ninputs - array of input nodes\noutputs - array of output nodes\nleaks - array of sink nodes\n\nOutput:\n\nthe corresponding ODE system in the notation of https://doi.org/10.1007/s11538-015-0098-0\n\n\n\n\n\n","category":"function"},{"location":"input/input/#Discrete-time-systems","page":"Parsing input system","title":"Discrete-time systems","text":"","category":"section"},{"location":"input/input/","page":"Parsing input system","title":"Parsing input system","text":"@DDSmodel","category":"page"},{"location":"input/input/#StructuralIdentifiability.@DDSmodel","page":"Parsing input system","title":"StructuralIdentifiability.@DDSmodel","text":"macro DDSmodel\n\nMacro for creating a DDS (discrete dynamical system) from a list of equations. It also injects all variables into the global scope.\n\nExample\n\nCreating a simple DDS:\n\nusing StructuralIdentifiability\n\ndds = @DDSmodel(\n x1(t + 1) = a * x1(t) + u(t),\n x2(t + 1) = b * x2(t) + c*x1(t)*x2(t),\n y(t) = x1(t)\n)\n\nHere,\n\nx1, x2 are state variables\ny is an output variable\nu is an input variable\na, b, c are time-independent parameters\n\n\n\n\n\n","category":"macro"}] } diff --git a/dev/tutorials/creating_ode/index.html b/dev/tutorials/creating_ode/index.html index 2b71abdf0..73eaef6e9 100644 --- a/dev/tutorials/creating_ode/index.html +++ b/dev/tutorials/creating_ode/index.html @@ -57,4 +57,4 @@ c2 => :nonidentifiable chi2 => :globally r2 => :globally - beta2 => :globally
+ beta2 => :globally
diff --git a/dev/tutorials/discrete_time/index.html b/dev/tutorials/discrete_time/index.html index 3ae760efb..51d09a34b 100644 --- a/dev/tutorials/discrete_time/index.html +++ b/dev/tutorials/discrete_time/index.html @@ -40,28 +40,4 @@ S(t) => 1 I(t) => 1 R(t) => 0

For each parameter or state, the value in the returned dictionary is true (1) if the parameter is locally identifiable and false (0) otherwise. We see that R(t) is not identifiable, which makes sense: it does not affect the dynamics of the observable in any way.

The assess_local_identifiability function has three important keyword arguments:

  • funcs_to_check is a list of functions for which one want to assess identifiability, for example, the following code will check if β * S is locally identifiable.
assess_local_identifiability(dds; funcs_to_check = [β * S])
OrderedCollections.OrderedDict{Any, Bool} with 1 entry:
-  S(t)*β => 1
  • prob_threshold is the probability of correctness (default value 0.99, i.e., 99%). The underlying algorithm is a Monte-Carlo algorithm, so in principle it may produce incorrect result but the probability of correctness of the returned result is guaranteed to be at least prob_threshold (in fact, the employed bounds are quite conservative, so in practice incorrect result is almost never produced).

  • known_ic is a list of the states for which initial conditions are known. In this case, the identifiability results will be valid not at any time point t but only at t = 0.

As other main functions in the package, assess_local_identifiability accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.

If one loads ModelingToolkit (and thus the ModelingToolkitSIExt extension), one can use DiscreteSystem from ModelingToolkit to describe the input model (now in terms of difference!):

using ModelingToolkit
-using StructuralIdentifiability
-
-@parameters α β
-@variables t S(t) I(t) R(t) y(t)
-D = Difference(t; dt = 1.0)
-
-eqs = [D(S) ~ S - β * S * I, D(I) ~ I + β * S * I - α * I, D(R) ~ R + α * I]
-@named sir = DiscreteSystem(eqs)

\[ \begin{align} -\mathrm{Difference(t; dt=1.0, update=false)}\left( S\left( t \right) \right) =& S\left( t \right) - S\left( t \right) I\left( t \right) \beta \\ -\mathrm{Difference(t; dt=1.0, update=false)}\left( I\left( t \right) \right) =& I\left( t \right) - I\left( t \right) \alpha + S\left( t \right) I\left( t \right) \beta \\ -\mathrm{Difference(t; dt=1.0, update=false)}\left( R\left( t \right) \right) =& R\left( t \right) + I\left( t \right) \alpha -\end{align} - \]

Then the same computation can be carried out with the models defined this way:

assess_local_identifiability(sir; measured_quantities = [y ~ I])
OrderedCollections.OrderedDict{SymbolicUtils.BasicSymbolic{Real}, Bool} with 5 entries:
-  S(t) => 1
-  I(t) => 1
-  R(t) => 0
-  β    => 1
-  α    => 1

In principle, it is not required to give a name to the observable, so one can write this shorter

assess_local_identifiability(sir; measured_quantities = [I])
OrderedCollections.OrderedDict{SymbolicUtils.BasicSymbolic{Real}, Bool} with 5 entries:
-  S(t) => 1
-  I(t) => 1
-  R(t) => 0
-  β    => 1
-  α    => 1

The same example but with specified functions to check

assess_local_identifiability(sir; measured_quantities = [I], funcs_to_check = [β * S])
OrderedCollections.OrderedDict{Symbolics.Num, Bool} with 1 entry:
-  S(t)*β => 1

The implementation is based on a version of the observability rank criterion and will be described in a forthcoming paper.

+ S(t)*β => 1
  • prob_threshold is the probability of correctness (default value 0.99, i.e., 99%). The underlying algorithm is a Monte-Carlo algorithm, so in principle it may produce incorrect result but the probability of correctness of the returned result is guaranteed to be at least prob_threshold (in fact, the employed bounds are quite conservative, so in practice incorrect result is almost never produced).

  • known_ic is a list of the states for which initial conditions are known. In this case, the identifiability results will be valid not at any time point t but only at t = 0.

As other main functions in the package, assess_local_identifiability accepts an optional parameter loglevel (default: Logging.Info) to adjust the verbosity of logging.

The implementation is based on a version of the observability rank criterion and will be described in a forthcoming paper.

diff --git a/dev/tutorials/identifiability/index.html b/dev/tutorials/identifiability/index.html index f3a1fe3bb..de1ab8f8f 100644 --- a/dev/tutorials/identifiability/index.html +++ b/dev/tutorials/identifiability/index.html @@ -59,4 +59,4 @@ c => :globally delta => :locally gama => :locally - sigma => :globally

And we see that now alpha and gama become locally identifiable.

+ sigma => :globally

And we see that now alpha and gama become locally identifiable.

diff --git a/dev/tutorials/identifiable_functions/index.html b/dev/tutorials/identifiable_functions/index.html index ab9967fed..3ffcdd8ad 100644 --- a/dev/tutorials/identifiable_functions/index.html +++ b/dev/tutorials/identifiable_functions/index.html @@ -30,4 +30,4 @@ p1*p3 p1 + p3 p2*x2(0) + p4*x1(0) - (-p1*x2(0) + p3*x2(0))//(p2*x2(0) - p4*x1(0))

We see that x2(0) becomes an identifiable function as well, which is natural since x1(t) * x2(t) was an identifiable function before.

+ (-p1*x2(0) + p3*x2(0))//(p2*x2(0) - p4*x1(0))

We see that x2(0) becomes an identifiable function as well, which is natural since x1(t) * x2(t) was an identifiable function before.

diff --git a/dev/tutorials/reparametrization/index.html b/dev/tutorials/reparametrization/index.html index 78bb401c5..14c31c34e 100644 --- a/dev/tutorials/reparametrization/index.html +++ b/dev/tutorials/reparametrization/index.html @@ -60,4 +60,4 @@ X4(t) => :globally a1 => :globally a2 => :globally - a3 => :globally
+ a3 => :globally
diff --git a/dev/utils/elimination/index.html b/dev/utils/elimination/index.html index 722bddc66..7e95f9944 100644 --- a/dev/utils/elimination/index.html +++ b/dev/utils/elimination/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Elimination

StructuralIdentifiability.Bezout_matrixMethod
Bezout_matrix(f, g, var_elim)

Compute the Bezout matrix of two polynomials f, g with respect to var_elim

Inputs:

  • f - first polynomial
  • g - second polynomial
  • var_elim - variable, of which f and g are considered as polynomials

Output:

  • M::MatrixElem - The Bezout matrix
source
StructuralIdentifiability.Sylvester_matrixMethod
Sylvester_matrix(f, g, var_elim)

Compute the Sylvester matrix of two polynomials f, g with respect to var_elim Inputs:

  • f - first polynomial
  • g - second polynomial
  • var_elim - variable, of which f and g are considered as polynomials

Output:

  • M::MatrixElem - The Sylvester matrix
source
StructuralIdentifiability.chooseMethod
choose(polys, generic_point_generator)

Input:

  • polys - an array of distinct irreducible polynomials in the same ring
  • generic_point_generator - a generic point generator as described above for one of polys

Output:

  • the polynomial that vanishes at the generic_point_generator
source
StructuralIdentifiability.eliminate_varMethod
eliminate_var(f, g, var_elim, generic_point_generator)

Eliminate a variable from a pair of polynomials

Input:

  • f and g - polynomials
  • var_elim - variable to be eliminated
  • generic_point_generator - a generic point generator object for the factor of the resultant of f and g of interest

Output:

  • polynomial - the desired factor of the resultant of f and g
source
StructuralIdentifiability.simplify_matrixMethod
simplify_matrix(M)

Eliminate GCD of entries of every row and column

Input:

  • M::MatrixElem - matrix to be simplified

Output:

  • M::MatrixElem - Simplified matrix
  • extra_factors::Vector{AbstractAlgebra.MPolyRingElem} - array of GCDs eliminated from M.
source
+

Elimination

StructuralIdentifiability.Bezout_matrixMethod
Bezout_matrix(f, g, var_elim)

Compute the Bezout matrix of two polynomials f, g with respect to var_elim

Inputs:

  • f - first polynomial
  • g - second polynomial
  • var_elim - variable, of which f and g are considered as polynomials

Output:

  • M::MatrixElem - The Bezout matrix
source
StructuralIdentifiability.Sylvester_matrixMethod
Sylvester_matrix(f, g, var_elim)

Compute the Sylvester matrix of two polynomials f, g with respect to var_elim Inputs:

  • f - first polynomial
  • g - second polynomial
  • var_elim - variable, of which f and g are considered as polynomials

Output:

  • M::MatrixElem - The Sylvester matrix
source
StructuralIdentifiability.chooseMethod
choose(polys, generic_point_generator)

Input:

  • polys - an array of distinct irreducible polynomials in the same ring
  • generic_point_generator - a generic point generator as described above for one of polys

Output:

  • the polynomial that vanishes at the generic_point_generator
source
StructuralIdentifiability.eliminate_varMethod
eliminate_var(f, g, var_elim, generic_point_generator)

Eliminate a variable from a pair of polynomials

Input:

  • f and g - polynomials
  • var_elim - variable to be eliminated
  • generic_point_generator - a generic point generator object for the factor of the resultant of f and g of interest

Output:

  • polynomial - the desired factor of the resultant of f and g
source
StructuralIdentifiability.simplify_matrixMethod
simplify_matrix(M)

Eliminate GCD of entries of every row and column

Input:

  • M::MatrixElem - matrix to be simplified

Output:

  • M::MatrixElem - Simplified matrix
  • extra_factors::Vector{AbstractAlgebra.MPolyRingElem} - array of GCDs eliminated from M.
source
diff --git a/dev/utils/global_identifiability/index.html b/dev/utils/global_identifiability/index.html index 78c246141..57e5f07e7 100644 --- a/dev/utils/global_identifiability/index.html +++ b/dev/utils/global_identifiability/index.html @@ -12,4 +12,4 @@ rff = RationalFunctionField([x // y, y // z]) # Constructs a subfield generated by y / x, 1 / x, z / y -rff = RationalFunctionField([[x, y, R(1)], [y, z]])source
StructuralIdentifiability.field_containsFunction
field_contains(field, ratfuncs, prob_threshold)

Checks whether given rational function field field contains given rational functions ratfuncs (represented as a list of lists). The result is correct with probability at least prob_threshold

Inputs:

  • field - a rational function field
  • ratfuncs - a list of lists of polynomials. Each of the lists, say, [f1, ..., fn], defines generators f2/f1, ..., fn/f1.
  • prob_threshold real number from (0, 1)

Output:

  • a list L[i] of bools of length length(rat_funcs) such that L[i] is true iff the i-th function belongs to field
source
+rff = RationalFunctionField([[x, y, R(1)], [y, z]])source
StructuralIdentifiability.field_containsFunction
field_contains(field, ratfuncs, prob_threshold)

Checks whether given rational function field field contains given rational functions ratfuncs (represented as a list of lists). The result is correct with probability at least prob_threshold

Inputs:

  • field - a rational function field
  • ratfuncs - a list of lists of polynomials. Each of the lists, say, [f1, ..., fn], defines generators f2/f1, ..., fn/f1.
  • prob_threshold real number from (0, 1)

Output:

  • a list L[i] of bools of length length(rat_funcs) such that L[i] is true iff the i-th function belongs to field
source
diff --git a/dev/utils/local_identifiability/index.html b/dev/utils/local_identifiability/index.html index 1fc5d09ce..2678722db 100644 --- a/dev/utils/local_identifiability/index.html +++ b/dev/utils/local_identifiability/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Local Identifiability Tools

StructuralIdentifiability.differentiate_solutionFunction
differentiate_solution(ode, params, ic, inputs, prec)

Input:

  • the same as for power_series_solutions

Output:

  • a tuple consisting of the power series solution and a dictionary of the form (u, v) => power series, where u is a state variable v is a state or parameter, and the power series is the partial derivative of the function u w.r.t. v evaluated at the solution
source
StructuralIdentifiability.differentiate_outputFunction
differentiate_output(ode, params, ic, inputs, prec)

Similar to differentiate_solution but computes partial derivatives of prescribed outputs returns a dictionary of the form y_function => Dict(var => dy/dvar) where dy/dvar is the derivative of y_function with respect to var.

source
+

Local Identifiability Tools

StructuralIdentifiability.differentiate_solutionFunction
differentiate_solution(ode, params, ic, inputs, prec)

Input:

  • the same as for power_series_solutions

Output:

  • a tuple consisting of the power series solution and a dictionary of the form (u, v) => power series, where u is a state variable v is a state or parameter, and the power series is the partial derivative of the function u w.r.t. v evaluated at the solution
source
StructuralIdentifiability.differentiate_outputFunction
differentiate_output(ode, params, ic, inputs, prec)

Similar to differentiate_solution but computes partial derivatives of prescribed outputs returns a dictionary of the form y_function => Dict(var => dy/dvar) where dy/dvar is the derivative of y_function with respect to var.

source
diff --git a/dev/utils/ode/index.html b/dev/utils/ode/index.html index 1732d3aaf..782535036 100644 --- a/dev/utils/ode/index.html +++ b/dev/utils/ode/index.html @@ -3,7 +3,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Functions to work with the ODE structure

StructuralIdentifiability.power_series_solutionMethod
power_series_solution(ode, param_values, initial_conditions, input_values, prec)

Input:

  • ode - an ode to solve
  • param_values - parameter values, must be a dictionary mapping parameter to a value
  • initial_conditions - initial conditions of ode, must be a dictionary mapping state variable to a value
  • input_values - power series for the inputs presented as a dictionary variable => list of coefficients
  • prec - the precision of solutions

Output:

  • computes a power series solution with precision prec presented as a dictionary variable => corresponding coordinate of the solution
source
StructuralIdentifiability.set_parameter_valuesMethod
set_parameter_values(ode, param_values)

Input:

  • ode - an ODE as above
  • param_values - values for (possibly, some of) the parameters as dictionary parameter => value

Output:

  • new ode with the parameters in param_values plugged with the given numbers
source
StructuralIdentifiability.find_submodelsMethod
find_submodels(ode)

The function calculates and returns all valid submodels given a system of ODEs.

Input:

  • ode - an ODEs system to be studied

Output:

  • A list of submodels represented as ode objects

Example:

>ode = @ODEmodel(x1'(t) = x1(t)^2, 
+

Functions to work with the ODE structure

StructuralIdentifiability.power_series_solutionMethod
power_series_solution(ode, param_values, initial_conditions, input_values, prec)

Input:

  • ode - an ode to solve
  • param_values - parameter values, must be a dictionary mapping parameter to a value
  • initial_conditions - initial conditions of ode, must be a dictionary mapping state variable to a value
  • input_values - power series for the inputs presented as a dictionary variable => list of coefficients
  • prec - the precision of solutions

Output:

  • computes a power series solution with precision prec presented as a dictionary variable => corresponding coordinate of the solution
source
StructuralIdentifiability.set_parameter_valuesMethod
set_parameter_values(ode, param_values)

Input:

  • ode - an ODE as above
  • param_values - values for (possibly, some of) the parameters as dictionary parameter => value

Output:

  • new ode with the parameters in param_values plugged with the given numbers
source
StructuralIdentifiability.find_submodelsMethod
find_submodels(ode)

The function calculates and returns all valid submodels given a system of ODEs.

Input:

  • ode - an ODEs system to be studied

Output:

  • A list of submodels represented as ode objects

Example:

>ode = @ODEmodel(x1'(t) = x1(t)^2, 
                  x2'(t) = x1(t) * x2(t), 
                  y1(t) = x1(t), 
                  y2(t) = x2(t))
@@ -12,4 +12,4 @@
         
         x1'(t) = a(t)*x2(t)^2 + x1(t)
         y1(t) = x1(t)
-    ]
source
+ ]
source
diff --git a/dev/utils/power_series_utils/index.html b/dev/utils/power_series_utils/index.html index d263a6c0f..bd85e5e5c 100644 --- a/dev/utils/power_series_utils/index.html +++ b/dev/utils/power_series_utils/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Power Series Utilities

StructuralIdentifiability.ps_matrix_homlinear_deMethod
ps_matrix_homlinear_de(A, Y0, prec)

Input:

  • A - a square matrix with entries in a univariate power series ring
  • Y0 - a square invertible matrix over the base field

Output:

  • matrix Y such that Y' = AY up to precision of A - 1 and Y(0) = Y0
source
StructuralIdentifiability.ps_matrix_invFunction
ps_matrix_inv(M, prec)

Input:

  • M - a square matrix with entries in a univariate power series ring it is assumed that M(0) is invertible and all entries having the same precision
  • prec - an integer, precision, if -1 then defaults to precision of M

Output:

  • the inverse of M computed up to prec
source
StructuralIdentifiability.ps_matrix_linear_deMethod
ps_matrix_linear_de(A, B, Y0, prec)

Input:

  • A, B - square matrices with entries in a univariate power series ring
  • Y0 - a matrix over the base field with the rows number the same as A

Output:

  • matrix Y such that Y' = AY + B up to precision of A - 1 and Y(0) = Y0
source
StructuralIdentifiability.ps_ode_solutionMethod
ps_ode_solution(equations, ic, inputs, prec)

Input:

  • equations - a system of the form $A(x, u, mu)x' - B(x, u, mu) = 0$, where A is a generically nonsingular square matrix. Assumption: A is nonzero at zero
  • ic - initial conditions for x's (dictionary)
  • inputs - power series for inputs represented as arrays (dictionary)
  • prec - precision of the solution

Output:

  • power series solution of the system
source
+

Power Series Utilities

StructuralIdentifiability.ps_matrix_homlinear_deMethod
ps_matrix_homlinear_de(A, Y0, prec)

Input:

  • A - a square matrix with entries in a univariate power series ring
  • Y0 - a square invertible matrix over the base field

Output:

  • matrix Y such that Y' = AY up to precision of A - 1 and Y(0) = Y0
source
StructuralIdentifiability.ps_matrix_invFunction
ps_matrix_inv(M, prec)

Input:

  • M - a square matrix with entries in a univariate power series ring it is assumed that M(0) is invertible and all entries having the same precision
  • prec - an integer, precision, if -1 then defaults to precision of M

Output:

  • the inverse of M computed up to prec
source
StructuralIdentifiability.ps_matrix_linear_deMethod
ps_matrix_linear_de(A, B, Y0, prec)

Input:

  • A, B - square matrices with entries in a univariate power series ring
  • Y0 - a matrix over the base field with the rows number the same as A

Output:

  • matrix Y such that Y' = AY + B up to precision of A - 1 and Y(0) = Y0
source
StructuralIdentifiability.ps_ode_solutionMethod
ps_ode_solution(equations, ic, inputs, prec)

Input:

  • equations - a system of the form $A(x, u, mu)x' - B(x, u, mu) = 0$, where A is a generically nonsingular square matrix. Assumption: A is nonzero at zero
  • ic - initial conditions for x's (dictionary)
  • inputs - power series for inputs represented as arrays (dictionary)
  • prec - precision of the solution

Output:

  • power series solution of the system
source
diff --git a/dev/utils/primality/index.html b/dev/utils/primality/index.html index 9b1dc067f..631a1bd5b 100644 --- a/dev/utils/primality/index.html +++ b/dev/utils/primality/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Primality Checks

StructuralIdentifiability.check_primalityFunction
check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem}, extra_relations::Array{QQMPolyRingElem, 1})

The function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.

The extra_relations allows adding more polynomials to the generators (not affecting the saturation).

source
check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem})

The function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.

source
+

Primality Checks

StructuralIdentifiability.check_primalityFunction
check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem}, extra_relations::Array{QQMPolyRingElem, 1})

The function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.

The extra_relations allows adding more polynomials to the generators (not affecting the saturation).

source
check_primality(polys::Dict{QQMPolyRingElem, QQMPolyRingElem})

The function checks if the ideal generated by the polynomials and saturated at the leading coefficient with respect to the corresponding variables is prime over rationals.

source
diff --git a/dev/utils/reparametrization/index.html b/dev/utils/reparametrization/index.html index ee5d319fe..dd71aaad7 100644 --- a/dev/utils/reparametrization/index.html +++ b/dev/utils/reparametrization/index.html @@ -23,4 +23,4 @@ X1 => x1 a2 => d a3 => a - a1 => c

Notice that the new_ode is fully identifiabile, and has 1 less parameter compared to the original one.

source + a1 => c

Notice that the new_ode is fully identifiabile, and has 1 less parameter compared to the original one.

source diff --git a/dev/utils/util/index.html b/dev/utils/util/index.html index 3b3587240..d90773efd 100644 --- a/dev/utils/util/index.html +++ b/dev/utils/util/index.html @@ -3,5 +3,5 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Other Helpful Functions

StructuralIdentifiability.dennums_to_fractionsMethod
dennums_to_fractions(dennums)

Returns the field generators represented by fractions.

Input: an array of arrays of polynomials, as in [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]

Output: an array of fractions [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]

source
StructuralIdentifiability.extract_coefficientsMethod
extract_coefficients(poly, variables)

Input:

  • poly - multivariate polynomial
  • variables - a list of variables from the generators of the ring of p

Output:

  • dictionary with keys being tuples of length length(variables) and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)
source
StructuralIdentifiability.fractions_to_dennumsMethod
fractions_to_dennums(fractions)

Returns the field generators represented by lists of denominators and numerators.

Input: an array of fractions, as in [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]

Output: an array of arrays of polynomials, [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]

source
StructuralIdentifiability.gen_tag_nameFunction
gen_tag_name(base; stop_words)
-gen_tag_names(n, base; stop_words)

Generates a string which will not collide with the words in stop_words.

Arguments

  • n: Generates a sequence of unique strings of length n
  • base: A string or a vector of strings, the base for the generated sequence
  • stop_words: A vector of strings, stop words
source
StructuralIdentifiability.make_substitutionMethod
make_substitution(f, var_sub, val_numer, val_denom)

Substitute a variable in a polynomial with an expression

Input:

  • f - the polynomial
  • var_sub - the variable to be substituted
  • var_numer - numerator of the substitution expression
  • var_denom - denominator of the substitution expression

Output:

  • polynomial - result of substitution
source
StructuralIdentifiability.parent_ring_changeMethod
parent_ring_change(poly, new_ring)

Converts a polynomial to a different polynomial ring Input

  • poly - a polynomial to be converted
  • new_ring - a polynomial ring such that every variable name appearing in poly appears among the generators

Output:

  • a polynomial in new_ring “equal” to poly
source
StructuralIdentifiability.replace_with_icMethod
replace_with_ic(ode::ODE, funcs)

Takes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0). Function is used to prepare the output for the case of known initial conditions

source
StructuralIdentifiability.uncertain_factorizationMethod
uncertain_factorization(f)

Input:

  • f - polynomial with rational coefficients

Output:

  • list of pairs (div, certainty) where
    • div's are divisors of f such that f is their product with certain powers
    • if certainty is true, div is $Q$-irreducible
source
+

Other Helpful Functions

StructuralIdentifiability.dennums_to_fractionsMethod
dennums_to_fractions(dennums)

Returns the field generators represented by fractions.

Input: an array of arrays of polynomials, as in [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]

Output: an array of fractions [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]

source
StructuralIdentifiability.extract_coefficientsMethod
extract_coefficients(poly, variables)

Input:

  • poly - multivariate polynomial
  • variables - a list of variables from the generators of the ring of p

Output:

  • dictionary with keys being tuples of length length(variables) and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)
source
StructuralIdentifiability.fractions_to_dennumsMethod
fractions_to_dennums(fractions)

Returns the field generators represented by lists of denominators and numerators.

Input: an array of fractions, as in [f2/f1, f3/f1, ..., g2/g1, g3/g1, ...]

Output: an array of arrays of polynomials, [[f1, f2, f3, ...], [g1, g2, g3, ...], ...]

source
StructuralIdentifiability.gen_tag_nameFunction
gen_tag_name(base; stop_words)
+gen_tag_names(n, base; stop_words)

Generates a string which will not collide with the words in stop_words.

Arguments

  • n: Generates a sequence of unique strings of length n
  • base: A string or a vector of strings, the base for the generated sequence
  • stop_words: A vector of strings, stop words
source
StructuralIdentifiability.make_substitutionMethod
make_substitution(f, var_sub, val_numer, val_denom)

Substitute a variable in a polynomial with an expression

Input:

  • f - the polynomial
  • var_sub - the variable to be substituted
  • var_numer - numerator of the substitution expression
  • var_denom - denominator of the substitution expression

Output:

  • polynomial - result of substitution
source
StructuralIdentifiability.parent_ring_changeMethod
parent_ring_change(poly, new_ring)

Converts a polynomial to a different polynomial ring Input

  • poly - a polynomial to be converted
  • new_ring - a polynomial ring such that every variable name appearing in poly appears among the generators

Output:

  • a polynomial in new_ring “equal” to poly
source
StructuralIdentifiability.replace_with_icMethod
replace_with_ic(ode::ODE, funcs)

Takes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0). Function is used to prepare the output for the case of known initial conditions

source
StructuralIdentifiability.uncertain_factorizationMethod
uncertain_factorization(f)

Input:

  • f - polynomial with rational coefficients

Output:

  • list of pairs (div, certainty) where
    • div's are divisors of f such that f is their product with certain powers
    • if certainty is true, div is $Q$-irreducible
source
diff --git a/dev/utils/wronskian/index.html b/dev/utils/wronskian/index.html index 18be89f44..e19881e4f 100644 --- a/dev/utils/wronskian/index.html +++ b/dev/utils/wronskian/index.html @@ -3,4 +3,4 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-90474609-3', {'page_path': location.pathname + location.search + location.hash}); -

Wronskian Tools

StructuralIdentifiability.get_max_belowMethod
get_max_below(t, vect)

Input:

  • t - a trie with exponent vectors
  • vect - yet another exponent vector

Output:

  • a pair (d, v) where v is a vector in the trie which is componentwise ≤ vect and the difference d is as small as possible
source
StructuralIdentifiability.massive_evalMethod
massive_eval(polys, eval_dict)

Input:

  • polys - a list of polynomials
  • eval_dict - dictionary from variables to the values. Missing values are treated as zeroes

Output:

  • a list of values of the polynomials

Evaluates a list of polynomials at a point. Assumes that multiplications are relatively expensive (like in truncated power series) so all the monomials are precomputed first and the values of monomials of lower degree are cached and used to compute the values of the monomials of higher degree

source
StructuralIdentifiability.monomial_compressMethod
monomial_compress(io_equation, ode)

Compresses an input-output equation for the rank computation Input:

  • io_equation - input-output equation
  • ode - the corresponding ODE model

Output:

  • pair (coeffs, terms) such that:
    • sum of coeffs[i] * terms[i] = io_equation
    • coeffs involve only parameters, terms involve only inputs and outputs
    • length of the representation is the smallest possible
source
StructuralIdentifiability.wronskianMethod
wronskian(io_equations, ode)

Input:

  • io_equations - a set of io-equations in the form of the Dict as returned by find_ioequations
  • ode - the ODE object

Output:

  • a list of Wronskians evaluated at a point modulo prime

Computes the Wronskians of io_equations

source
+

Wronskian Tools

StructuralIdentifiability.get_max_belowMethod
get_max_below(t, vect)

Input:

  • t - a trie with exponent vectors
  • vect - yet another exponent vector

Output:

  • a pair (d, v) where v is a vector in the trie which is componentwise ≤ vect and the difference d is as small as possible
source
StructuralIdentifiability.massive_evalMethod
massive_eval(polys, eval_dict)

Input:

  • polys - a list of polynomials
  • eval_dict - dictionary from variables to the values. Missing values are treated as zeroes

Output:

  • a list of values of the polynomials

Evaluates a list of polynomials at a point. Assumes that multiplications are relatively expensive (like in truncated power series) so all the monomials are precomputed first and the values of monomials of lower degree are cached and used to compute the values of the monomials of higher degree

source
StructuralIdentifiability.monomial_compressMethod
monomial_compress(io_equation, ode)

Compresses an input-output equation for the rank computation Input:

  • io_equation - input-output equation
  • ode - the corresponding ODE model

Output:

  • pair (coeffs, terms) such that:
    • sum of coeffs[i] * terms[i] = io_equation
    • coeffs involve only parameters, terms involve only inputs and outputs
    • length of the representation is the smallest possible
source
StructuralIdentifiability.wronskianMethod
wronskian(io_equations, ode)

Input:

  • io_equations - a set of io-equations in the form of the Dict as returned by find_ioequations
  • ode - the ODE object

Output:

  • a list of Wronskians evaluated at a point modulo prime

Computes the Wronskians of io_equations

source