diff --git a/Manifest.toml b/Manifest.toml index 440004eb7..34a68402a 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,12 +2,12 @@ julia_version = "1.10.4" manifest_format = "2.0" -project_hash = "01c18211b753563050451023c729c6118ec0c448" +project_hash = "1f635113c3942011817a95f3b34347acc94b7036" [[deps.ADTypes]] -git-tree-sha1 = "7a6b285f217ba92b5b474b783b4c2e8cf8218aaa" +git-tree-sha1 = "aa4d425271a914d8c4af6ad9fccb6eb3aec662c7" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.5.3" +version = "1.6.1" weakdeps = ["ChainRulesCore", "EnzymeCore"] [deps.ADTypes.extensions] @@ -21,9 +21,9 @@ version = "0.4.5" [[deps.Accessors]] deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] -git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" +git-tree-sha1 = "f61b15be1d76846c0ce31d3fcfac5380ae53db6a" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.36" +version = "0.1.37" [deps.Accessors.extensions] AccessorsAxisKeysExt = "AxisKeys" @@ -67,9 +67,9 @@ version = "0.4.0" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "ed2ec3c9b483842ae59cd273834e5b46206d6dda" +git-tree-sha1 = "5c9b74c973181571deb6442d41e5c902e6b9f38e" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.11.0" +version = "7.12.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" @@ -95,9 +95,9 @@ version = "7.11.0" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "600078184f7de14b3e60efe13fc0ba5c59f6dca5" +git-tree-sha1 = "ce2ca959f932f5dad70697dd93133d1167cf1e4e" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.10.0" +version = "1.10.2" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -180,27 +180,27 @@ version = "1.3.5" [[deps.CodecBzip2]] deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"] -git-tree-sha1 = "9b1ca1aa6ce3f71b3d1840c538a8210a043625eb" +git-tree-sha1 = "f8889d1770addf59d0a015c49a473fa2bdb9f809" uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" -version = "0.8.2" +version = "0.8.3" [[deps.CodecLz4]] deps = ["Lz4_jll", "TranscodingStreams"] -git-tree-sha1 = "b8aecef9f90530cf322a8386630ec18485c17991" +git-tree-sha1 = "42494e2756fe6f775d6da57aac6762d2e11a95ce" uuid = "5ba52731-8f18-5e0d-9241-30f10d1ec561" -version = "0.4.3" +version = "0.4.4" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" +git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.4" +version = "0.7.5" [[deps.CodecZstd]] deps = ["TranscodingStreams", "Zstd_jll"] -git-tree-sha1 = "0d0612d8646ed6157adaceff420b3bacbc2510a9" +git-tree-sha1 = "ed0be9a9c1a6b6dec7aac15f8977f16ad6a9796c" uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2" -version = "0.8.3" +version = "0.8.4" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -279,9 +279,9 @@ version = "0.2.3" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "6cbbd4d241d7e6579ab354737f4dd95ca43946e1" +git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.4.1" +version = "2.4.2" [[deps.Conda]] deps = ["Downloads", "JSON", "VersionParsing"] @@ -297,9 +297,9 @@ version = "0.17.6" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] -git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" +git-tree-sha1 = "d8a9c0b6ac2d9081bf76324b39c78ca3ce4f0c98" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.5" +version = "1.5.6" [deps.ConstructionBase.extensions] ConstructionBaseIntervalSetsExt = "IntervalSets" @@ -337,10 +337,10 @@ uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" version = "1.6.1" [[deps.DataInterpolations]] -deps = ["FindFirstFunctions", "ForwardDiff", "LinearAlgebra", "PrettyTables", "RecipesBase", "Reexport"] -git-tree-sha1 = "a47492f3694b8cd647a9a172a5111f585868f2c6" +deps = ["FindFirstFunctions", "ForwardDiff", "LinearAlgebra", "PrettyTables", "ReadOnlyArrays", "RecipesBase", "Reexport"] +git-tree-sha1 = "3ba1e37d1315439539e3d8950dbc7042771c8978" uuid = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" -version = "5.2.0" +version = "5.3.1" [deps.DataInterpolations.extensions] DataInterpolationsChainRulesCoreExt = "ChainRulesCore" @@ -425,9 +425,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "Compat", "DocStringExtensions", "FillArrays", "LinearAlgebra", "PackageExtensionCompat", "SparseArrays", "SparseMatrixColorings"] -git-tree-sha1 = "695217e97ee1ce0248f4a56c14af88ba33c585fd" +git-tree-sha1 = "c81579b549a00edf31582d318fec06523e0b607a" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.5.7" +version = "0.5.9" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -485,9 +485,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.4" [[deps.EnzymeCore]] -git-tree-sha1 = "3a3177ba05b4763234819060fb6c2e1613379ca6" +git-tree-sha1 = "d445df66dd8761a4c27df950db89c6a3a0629fe7" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.7.6" +version = "0.7.7" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -505,9 +505,9 @@ uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.10" [[deps.ExproniconLite]] -git-tree-sha1 = "4627945941758db441d197192f228cd854700ef9" +git-tree-sha1 = "1095361e35ea8ad9c660560df4c03c06d5244956" uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" -version = "0.10.10" +version = "0.10.11" [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] @@ -622,9 +622,9 @@ version = "1.3.1" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "334d300809ae0a68ceee3444c6e99ded412bf0b3" +git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.1" +version = "1.11.2" [[deps.HiGHS]] deps = ["HiGHS_jll", "MathOptInterface", "PrecompileTools", "SparseArrays"] @@ -673,20 +673,20 @@ uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" version = "0.1.5" [[deps.InlineStrings]] -deps = ["Parsers"] -git-tree-sha1 = "86356004f30f8e737eff143d57d41bd580e437aa" +git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.1" -weakdeps = ["ArrowTypes"] +version = "1.4.2" +weakdeps = ["ArrowTypes", "Parsers"] [deps.InlineStrings.extensions] ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be50fe8df3acbffa0274a744f1a99d29c45a57f4" +git-tree-sha1 = "14eb2b542e748570b56446f4c50fbfb2306ebc45" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.1.0+0" +version = "2024.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] @@ -694,9 +694,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.InverseFunctions]] deps = ["Test"] -git-tree-sha1 = "e7cbed5032c4c397a6ac23d1493f3289e01231c4" +git-tree-sha1 = "18c59411ece4838b18cd7f537e56cf5e41ce5bfd" uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.14" +version = "0.1.15" weakdeps = ["Dates"] [deps.InverseFunctions.extensions] @@ -724,9 +724,9 @@ version = "1.0.0" [[deps.JLD2]] deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "Pkg", "PrecompileTools", "Reexport", "Requires", "TranscodingStreams", "UUIDs", "Unicode"] -git-tree-sha1 = "bdbe8222d2f5703ad6a7019277d149ec6d78c301" +git-tree-sha1 = "5fe858cb863e211c6dedc8cce2dc0752d4ab6e2b" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.4.48" +version = "0.4.50" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -793,9 +793,9 @@ version = "0.1.17" [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "fb43bbe51db62510b032b85e157ea87d77b2fa07" +git-tree-sha1 = "b8ea0abe6cc872996e87356951d286d25d485aba" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.1.0" +version = "2.1.9" [deps.LazyArrays.extensions] LazyArraysBandedMatricesExt = "BandedMatrices" @@ -953,9 +953,9 @@ version = "1.9.4+0" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "80b2833b56d466b3858d565adcd16a4a05f2089b" +git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.1.0+0" +version = "2024.2.0+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -1086,9 +1086,9 @@ version = "3.13.1" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.OffsetArrays]] -git-tree-sha1 = "e64b4f5ea6b7389f6f046d13d4896a8f9c1ba71e" +git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.14.0" +version = "1.14.1" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -1117,9 +1117,9 @@ version = "1.6.3" [[deps.OrdinaryDiffEq]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "6ef13f8b23af28ee2d98226653d8382ab79287ea" +git-tree-sha1 = "0c5d89483f9538efedb3f1c1b72e14d5f65830b0" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.85.0" +version = "6.86.0" [[deps.OteraEngine]] deps = ["Markdown", "Pkg", "TOML"] @@ -1232,6 +1232,11 @@ git-tree-sha1 = "276cb2fc9c4de5ea62fd50150d9089ab5a40781f" uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" version = "1.24.0" +[[deps.ReadOnlyArrays]] +git-tree-sha1 = "e6f7ddf48cf141cb312b078ca21cb2d29d0dc11d" +uuid = "988b38a3-91fc-5605-94a2-ee2116b3bd83" +version = "0.2.0" + [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -1240,9 +1245,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "3400ce27995422fb88ffcd3af9945565aad947f0" +git-tree-sha1 = "b450d967a770fb13d0e26358f58375e20361cf9c" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.23.1" +version = "3.26.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1292,7 +1297,7 @@ uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" version = "3.5.15" [[deps.Ribasim]] -deps = ["Accessors", "Arrow", "BasicModelInterface", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "DiffEqCallbacks", "EnumX", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "LinearSolve", "Logging", "LoggingExtras", "MetaGraphsNext", "OrdinaryDiffEq", "PreallocationTools", "SQLite", "SciMLBase", "SmoothInterpolation", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimerOutputs", "TranscodingStreams"] +deps = ["Accessors", "Arrow", "BasicModelInterface", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "DiffEqCallbacks", "EnumX", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "LinearSolve", "Logging", "LoggingExtras", "MetaGraphsNext", "OrdinaryDiffEq", "PreallocationTools", "ReadOnlyArrays", "SQLite", "SciMLBase", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimerOutputs", "TranscodingStreams"] path = "core" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" version = "2024.10.0" @@ -1332,9 +1337,9 @@ version = "3.45.3+0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "281e82f2ae2b73262fed9e7a518711eb7feb7e59" +git-tree-sha1 = "4345907b161ed71358fd343f8d9d178b68bb185a" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.42.0" +version = "2.43.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -1375,9 +1380,9 @@ version = "1.2.1" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "90b4f68892337554d31cdcdbe19e48989f26c7e6" +git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.3" +version = "1.4.5" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -1421,12 +1426,6 @@ git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" version = "1.1.0" -[[deps.SmoothInterpolation]] -deps = ["DataInterpolations", "FindFirstFunctions", "PrettyTables"] -git-tree-sha1 = "2870c7c22941912749fa593881903a1cd18057fc" -uuid = "4412c578-8aba-4b04-8c8c-6ae573ccb792" -version = "0.1.0" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1469,9 +1468,9 @@ version = "2.19.0" [[deps.SparseMatrixColorings]] deps = ["ADTypes", "Compat", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "eed2446b3c3dd58f6ded3168998b8b2cb3fc9229" +git-tree-sha1 = "277e10c002cd780a752bded3b95a8cbc791d646b" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.3.3" +version = "0.3.5" [[deps.Sparspak]] deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] @@ -1491,9 +1490,9 @@ weakdeps = ["ChainRulesCore"] [[deps.Static]] deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] -git-tree-sha1 = "0bbff21027dd8a107551847528127b62a35f7594" +git-tree-sha1 = "87d51a3ee9a4b0d2fe054bdd3fc2436258db2603" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "1.1.0" +version = "1.1.1" [[deps.StaticArrayInterface]] deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] @@ -1508,9 +1507,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "20833c5b7f7edf0e5026f23db7f268e4f23ec577" +git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.6" +version = "1.9.7" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1569,9 +1568,9 @@ version = "7.2.1+1" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "a5f6f138b740c9d93d76f0feddd3092e6ef002b7" +git-tree-sha1 = "9c490ee01823dc443da25bf9225827e3cdd2d7e9" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.22" +version = "0.3.26" [[deps.TOML]] deps = ["Dates"] @@ -1591,10 +1590,10 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" +version = "1.12.0" [[deps.Tar]] deps = ["ArgTools", "SHA"] diff --git a/Project.toml b/Project.toml index c77912ea3..ea6f564bb 100644 --- a/Project.toml +++ b/Project.toml @@ -41,11 +41,11 @@ OteraEngine = "b2d7f28f-acd6-4007-8b26-bc27716e5513" PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" +ReadOnlyArrays = "988b38a3-91fc-5605-94a2-ee2116b3bd83" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" Ribasim = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -SmoothInterpolation = "4412c578-8aba-4b04-8c8c-6ae573ccb792" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" diff --git a/core/Project.toml b/core/Project.toml index 113f673cd..302293a24 100644 --- a/core/Project.toml +++ b/core/Project.toml @@ -30,9 +30,9 @@ LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36" MetaGraphsNext = "fa8bd995-216d-47f1-8a91-f3b68fbeb377" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +ReadOnlyArrays = "988b38a3-91fc-5605-94a2-ee2116b3bd83" SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -SmoothInterpolation = "4412c578-8aba-4b04-8c8c-6ae573ccb792" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" @@ -51,7 +51,7 @@ ComponentArrays = "0.13, 0.14, 0.15" Configurations = "0.17" DBInterface = "2.4" DataFrames = "1.4" -DataInterpolations = "=5.2.0" +DataInterpolations = "=5.3.1" DataStructures = "0.18" Dates = "<0.0.1, 1" DiffEqCallbacks = "3.6" @@ -71,9 +71,9 @@ MetaGraphsNext = "0.6, 0.7" OrdinaryDiffEq = "6.7" PreallocationTools = "0.4" ReTestItems = "1.20" +ReadOnlyArrays = "0.2" SQLite = "1.5.1" SciMLBase = "2.36" -SmoothInterpolation = "0.1.0" SparseArrays = "<0.0.1, 1" StructArrays = "0.6.13" TOML = "<0.0.1, 1" diff --git a/core/src/Ribasim.jl b/core/src/Ribasim.jl index 98bf2686b..f64aaa808 100644 --- a/core/src/Ribasim.jl +++ b/core/src/Ribasim.jl @@ -25,7 +25,8 @@ using Accessors: @set using Arrow: Arrow, Table using CodecZstd: ZstdCompressor using ComponentArrays: ComponentVector -using DataInterpolations: LinearInterpolation, derivative, integral +using DataInterpolations: + LinearInterpolation, LinearInterpolationIntInv, invert_integral, derivative, integral using Dates: Dates, DateTime, Millisecond, @dateformat_str using DBInterface: execute using DiffEqCallbacks: @@ -50,6 +51,7 @@ using MetaGraphsNext: inneighbor_labels using OrdinaryDiffEq: OrdinaryDiffEq, OrdinaryDiffEqRosenbrockAdaptiveAlgorithm, get_du using PreallocationTools: DiffCache, get_tmp +using ReadOnlyArrays: ReadOnlyVector using SciMLBase: init, solve!, @@ -64,7 +66,6 @@ using SciMLBase: ODESolution, VectorContinuousCallback, get_proposed_dt -using SmoothInterpolation using SparseArrays: SparseMatrixCSC, spzeros using SQLite: SQLite, DB, Query, esc_id using StructArrays: StructVector diff --git a/core/src/parameter.jl b/core/src/parameter.jl index 09d4cb0e0..009faeb3e 100644 --- a/core/src/parameter.jl +++ b/core/src/parameter.jl @@ -73,7 +73,13 @@ end Base.to_index(id::NodeID) = Int(id.value) -const ScalarInterpolation = LinearInterpolation{Vector{Float64}, Vector{Float64}, Float64} +const ScalarInterpolation = LinearInterpolation{ + ReadOnlyVector{Float64, Vector{Float64}}, + ReadOnlyVector{Float64, Vector{Float64}}, + Vector{Float64}, + Vector{Float64}, + Float64, +} """ Store information for a subnetwork used for allocation. @@ -261,7 +267,12 @@ end current_area::T = zeros(length(node_id)) # Discrete values for interpolation storage_to_level::Vector{ - LinearInterpolationIntInv{Vector{Float64}, Vector{Float64}, Float64}, + LinearInterpolationIntInv{ + ReadOnlyVector{Float64, Vector{Float64}}, + Vector{Float64}, + ScalarInterpolation, + Float64, + }, } level_to_area::Vector{ScalarInterpolation} # Demands for allocation if applicable diff --git a/core/src/read.jl b/core/src/read.jl index 45f8a93cb..242b8a6cb 100644 --- a/core/src/read.jl +++ b/core/src/read.jl @@ -580,8 +580,7 @@ function Basin(db::DB, config::Config, graph::MetaGraph, chunk_sizes::Vector{Int error("Invalid Basin / profile table.") end - level_to_area = SmoothedLinearInterpolation.(area, level; extrapolate = true, λ = 0.01) - level_to_area = LinearInterpolation.(level_to_area) + level_to_area = LinearInterpolation.(area, level; extrapolate = true) storage_to_level = invert_integral.(level_to_area) return Basin(; @@ -901,7 +900,12 @@ function user_demand_static!( for row in group priority_idx = findsorted(priorities, row.priority) demand_row = coalesce(row.demand, 0.0) - demand_itp[user_demand_idx][priority_idx].u .= demand_row + demand_itp_old = demand_itp[user_demand_idx][priority_idx] + demand_itp[user_demand_idx][priority_idx] = LinearInterpolation( + fill(demand_row, 2), + demand_itp_old.t; + extrapolate = true, + ) demand[user_demand_idx, priority_idx] = demand_row end end @@ -974,7 +978,9 @@ function UserDemand(db::DB, config::Config, graph::MetaGraph)::UserDemand demand_reduced = zeros(n_user, n_priority) trivial_timespan = [0.0, prevfloat(Inf)] demand_itp = [ - [LinearInterpolation(zeros(2), trivial_timespan) for i in eachindex(priorities)] for j in eachindex(node_ids) + ScalarInterpolation[ + LinearInterpolation(zeros(2), trivial_timespan) for i in eachindex(priorities) + ] for j in eachindex(node_ids) ] demand_from_timeseries = fill(false, n_user) allocated = fill(Inf, n_user, n_priority) diff --git a/core/src/util.jl b/core/src/util.jl index f410c6170..482d39582 100644 --- a/core/src/util.jl +++ b/core/src/util.jl @@ -104,8 +104,7 @@ function get_scalar_interpolation( push!(parameter, parameter[end]) end - itp = SmoothedLinearInterpolation(parameter, times; extrapolate = true, λ = 0.1) - return LinearInterpolation(itp), allunique(times) + return LinearInterpolation(parameter, times; extrapolate = true), allunique(times) end """ @@ -121,8 +120,7 @@ function qh_interpolation(node_id::NodeID, table::StructVector)::ScalarInterpola pushfirst!(level, first(level) - 1) pushfirst!(flow_rate, first(flow_rate)) - itp = SmoothedLinearInterpolation(flow_rate, level; extrapolate = true) - return LinearInterpolation(itp) + return LinearInterpolation(flow_rate, level; extrapolate = true) end """ diff --git a/core/test/allocation_test.jl b/core/test/allocation_test.jl index c89a59c1b..eb13b6bb8 100644 --- a/core/test/allocation_test.jl +++ b/core/test/allocation_test.jl @@ -584,8 +584,8 @@ end (; allocation_models) = p.allocation (; basin, level_demand, graph) = p - fill!(level_demand.max_level[1].u, Inf) - fill!(level_demand.max_level[2].u, Inf) + fill!(level_demand.max_level[1].u.parent, Inf) + fill!(level_demand.max_level[2].u.parent, Inf) # Given a max_level of Inf, the basin capacity is 0.0 because it is not possible for the basin level to be > Inf @test Ribasim.get_basin_capacity(allocation_models[1], u, p, t, basin.node_id[1]) == 0.0 diff --git a/core/test/run_models_test.jl b/core/test/run_models_test.jl index d5180065b..ca3bac404 100644 --- a/core/test/run_models_test.jl +++ b/core/test/run_models_test.jl @@ -296,8 +296,7 @@ end @testitem "Profile" begin import Tables - using DataInterpolations: LinearInterpolation, integral - using SmoothInterpolation: invert_integral + using DataInterpolations: LinearInterpolation, integral, invert_integral "Shorthand for Ribasim.get_area_and_level" function lookup(profile, S) @@ -313,7 +312,7 @@ end storage = range(0.0, 1000.0, n_interpolations) # Covers interpolation for constant and non-constant area, extrapolation for constant area - A = [0.0, 100.0, 100.0] + A = [1e-9, 100.0, 100.0] h = [0.0, 10.0, 15.0] S = integral.(Ref(LinearInterpolation(A, h)), h) profile = (; S, A, h) @@ -341,7 +340,7 @@ end end # Covers extrapolation for non-constant area - A = [0.0, 100.0] + A = [1e-9, 100.0] h = [0.0, 10.0] S = integral.(Ref(LinearInterpolation(A, h)), h) diff --git a/core/test/utils_test.jl b/core/test/utils_test.jl index 73c6ad86e..a063b7f0e 100644 --- a/core/test/utils_test.jl +++ b/core/test/utils_test.jl @@ -12,8 +12,7 @@ end @testitem "bottom" begin using StructArrays: StructVector using Ribasim: NodeID - using DataInterpolations: LinearInterpolation, integral - using SmoothInterpolation: invert_integral + using DataInterpolations: LinearInterpolation, integral, invert_integral # create two basins with different bottoms/levels area = [[0.01, 1.0], [0.01, 1.0]] @@ -46,8 +45,7 @@ end using StructArrays: StructVector using Logging using Ribasim: NodeID - using DataInterpolations: LinearInterpolation - using SmoothInterpolation: invert_integral + using DataInterpolations: LinearInterpolation, invert_integral level = [ 0.0, diff --git a/core/test/validation_test.jl b/core/test/validation_test.jl index caace584c..27bf32a2b 100644 --- a/core/test/validation_test.jl +++ b/core/test/validation_test.jl @@ -384,7 +384,7 @@ end parameters = model.integrator.p (; graph, tabulated_rating_curve, basin) = parameters - tabulated_rating_curve.table[1].t[1] = invalid_level + tabulated_rating_curve.table[1].t.parent[1] = invalid_level logger = TestLogger() with_logger(logger) do @@ -438,6 +438,9 @@ end Ribasim.main(toml_path) end - @test occursin("Warning: Convergence bottlenecks in descending order of severity:", output) + @test occursin( + "Warning: Convergence bottlenecks in descending order of severity:", + output, + ) @test occursin("Basin #11 = ", output) end diff --git a/pixi.toml b/pixi.toml index 5ea5916c5..d3aea6242 100644 --- a/pixi.toml +++ b/pixi.toml @@ -31,7 +31,7 @@ install = { depends_on = [ # Julia update-registry-julia = "julia --eval='using Pkg; Registry.update()'" update-manifest-julia = "julia --project --eval='using Pkg; Pkg.update()'" -instantiate-julia = "julia --project --eval='using Pkg; Pkg.instantiate()'" +instantiate-julia = { cmd = "julia --project --eval='using Pkg; Pkg.instantiate()'", env = { JULIA_SSL_CA_ROOTS_PATH = "" } } initialize-julia = { depends_on = [ "update-registry-julia", "instantiate-julia",