From 8191cd158a2a89ebc0c0de7a6b727473204609a6 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Wed, 30 Oct 2024 13:11:55 +0100 Subject: [PATCH 01/12] Callstack visualization proof of concept --- Manifest.toml | 1076 ++++++++++++++++++++++++++++-- Project.toml | 3 + docs/_quarto.yml | 1 + docs/dev/callstacks.qmd | 216 ++++++ docs/dev/callstacks.quarto_ipynb | 151 +++++ 5 files changed, 1390 insertions(+), 57 deletions(-) create mode 100644 docs/dev/callstacks.qmd create mode 100644 docs/dev/callstacks.quarto_ipynb diff --git a/Manifest.toml b/Manifest.toml index ae5a50b7a..cf1b5e944 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "0257f2772e4bfed0b6316b6871c4495978c173b4" +project_hash = "377f3d9ebaf0df50320aff7a99e1c7ee0d8cfb6d" [[deps.ADTypes]] git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081" @@ -14,6 +14,17 @@ weakdeps = ["ChainRulesCore", "EnzymeCore"] ADTypesChainRulesCoreExt = "ChainRulesCore" ADTypesEnzymeCoreExt = "EnzymeCore" +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" @@ -46,14 +57,31 @@ version = "0.1.38" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" +git-tree-sha1 = "d80af0733c99ea80575f612813fa6aa71022d33a" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.4" +version = "4.1.0" weakdeps = ["StaticArrays"] [deps.Adapt.extensions] AdaptStaticArraysExt = "StaticArrays" +[[deps.AdaptivePredicates]] +git-tree-sha1 = "7e651ea8d262d2d74ce75fdf47c4d63c07dba7a6" +uuid = "35492f91-a3bd-45ad-95db-fcad7dcfedb7" +version = "1.2.0" + +[[deps.AliasTables]] +deps = ["PtrArrays", "Random"] +git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.1.3" + +[[deps.Animations]] +deps = ["Colors"] +git-tree-sha1 = "e81c509d2c8e49592413bfb0bb3b08150056c79d" +uuid = "27a7e980-b3e6-11e9-2bcd-0b925532e340" +version = "0.4.1" + [[deps.ArgCheck]] git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" @@ -65,9 +93,9 @@ version = "1.1.2" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" +git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.4.0" +version = "0.2.0" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] @@ -101,9 +129,9 @@ version = "7.16.0" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "0dd7edaff278e346eb0ca07a7e75c9438408a3ce" +git-tree-sha1 = "492681bc44fac86804706ddb37da10880a2bd528" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.10.3" +version = "1.10.4" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -125,6 +153,24 @@ version = "2.3.0" uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" version = "1.11.0" +[[deps.Automa]] +deps = ["PrecompileTools", "SIMD", "TranscodingStreams"] +git-tree-sha1 = "a8f503e8e1a5f583fbef15a8440c8c7e32185df2" +uuid = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b" +version = "1.1.0" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "01b8ccb13d68535d73d2b0c23e39bd23155fb712" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.1.0" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "16351be62963a67ac4083f748fdb3cca58bfd52f" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.7" + [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" @@ -158,12 +204,33 @@ git-tree-sha1 = "8873e196c2eb87962a2048b3b8e08946535864a1" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" version = "1.0.8+2" +[[deps.CEnum]] +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.5.0" + [[deps.CPUSummary]] deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" version = "0.2.6" +[[deps.CRC32c]] +uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" +version = "1.11.0" + +[[deps.CRlibm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e329286945d0cfc04456972ea732551869af1cfc" +uuid = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0" +version = "1.0.1+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.18.2+1" + [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "3e4b134270b372f2ed4d4d0e936aabaefc1802bc" @@ -210,6 +277,40 @@ git-tree-sha1 = "d0073f473757f0d39ac9707f1eb03b431573cbd8" uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2" version = "0.8.6" +[[deps.ColorBrewer]] +deps = ["Colors", "JSON", "Test"] +git-tree-sha1 = "61c5334f33d91e570e1d0c3eb5465835242582c4" +uuid = "a2cac450-b92f-5266-8821-25eda20663c8" +version = "0.4.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] +git-tree-sha1 = "13951eb68769ad1cd460cdb2e64e5e95f1bf123d" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.27.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.5" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] +git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.10.0" +weakdeps = ["SpecialFunctions"] + + [deps.ColorVectorSpace.extensions] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.11" + [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" @@ -307,16 +408,17 @@ version = "0.17.6" git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" version = "1.5.8" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [deps.ConstructionBase.extensions] ConstructionBaseIntervalSetsExt = "IntervalSets" ConstructionBaseLinearAlgebraExt = "LinearAlgebra" ConstructionBaseStaticArraysExt = "StaticArrays" - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +[[deps.Contour]] +git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.3" [[deps.CpuId]] deps = ["Markdown"] @@ -380,6 +482,18 @@ deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" version = "1.11.0" +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "fc173b380865f70627d7dd1190dc2fce6cc105af" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.14.10+0" + +[[deps.DelaunayTriangulation]] +deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "PrecompileTools", "Random"] +git-tree-sha1 = "89df54fbe66e5872d91d8c2cd3a375f660c3fd64" +uuid = "927a84f5-c5f4-47a5-9785-b46e178433df" +version = "1.6.1" + [[deps.DiffEqBase]] deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "TruncatedStacktraces"] git-tree-sha1 = "f8eefbb7e910f59087c4bb09ce670f235758ee4a" @@ -434,9 +548,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "16611777adf4a818f18c33210895947814180964" +git-tree-sha1 = "89d7cfcd1c4d9137497148e44e87ed4866ed6730" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.6.16" +version = "0.6.17" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -484,6 +598,22 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" version = "1.11.0" +[[deps.Distributions]] +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "d7477ecdafb813ddee2ae727afa94e9dcb5f3fb0" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.112" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + DistributionsTestExt = "Test" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + [[deps.DocStringExtensions]] deps = ["LibGit2"] git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" @@ -495,6 +625,12 @@ deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e3290f2d49e661fbd94046d7e3726ffcb2d41053" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.4+0" + [[deps.EnumX]] git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" @@ -509,6 +645,24 @@ weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] AdaptExt = "Adapt" +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+0" + +[[deps.ExactPredicates]] +deps = ["IntervalArithmetic", "Random", "StaticArrays"] +git-tree-sha1 = "b3f2ff58735b5f024c392fde763f29b057e4b025" +uuid = "429591f6-91af-11e9-00e2-59fbe8cec110" +version = "2.2.8" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.6.2+0" + [[deps.ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" @@ -525,6 +679,29 @@ git-tree-sha1 = "4c9ed87a6b3cd90acf24c556f2119533435ded38" uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" version = "0.10.13" +[[deps.Extents]] +git-tree-sha1 = "81023caa0021a41712685887db1fc03db26f41f5" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.4" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "8cc47f299902e13f90405ddb5bf87e5d474c0d38" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "6.1.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "4820348781ae578893311153d69049a93d05f39d" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.8.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4d81ed14783ec49ce9f2e168208a12ce1815aa25" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+1" + [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" @@ -543,9 +720,9 @@ uuid = "29a986be-02c6-4525-aec4-84b980013641" version = "2.0.4" [[deps.FastPower]] -git-tree-sha1 = "46aee43f62bc2bc06a74e2d668ffeea0a2689c93" +git-tree-sha1 = "58c3431137131577a7c379d00fea00be524338fb" uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" -version = "1.1.0" +version = "1.1.1" [deps.FastPower.extensions] FastPowerEnzymeExt = "Enzyme" @@ -569,6 +746,23 @@ git-tree-sha1 = "62ca0547a14c57e98154423419d8a342dca75ca9" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" version = "1.16.4" +[[deps.FilePaths]] +deps = ["FilePathsBase", "MacroTools", "Reexport", "Requires"] +git-tree-sha1 = "919d9412dbf53a2e6fe74af62a73ceed0bce0629" +uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824" +version = "0.8.3" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates"] +git-tree-sha1 = "7878ff7172a8e6beedd1dea14bd27c3c6340d361" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.22" +weakdeps = ["Mmap", "Test"] + + [deps.FilePathsBase.extensions] + FilePathsBaseMmapExt = "Mmap" + FilePathsBaseTestExt = "Test" + [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" version = "1.11.0" @@ -578,17 +772,13 @@ deps = ["LinearAlgebra"] git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" version = "1.13.0" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] FillArraysPDMatsExt = "PDMats" FillArraysSparseArraysExt = "SparseArrays" FillArraysStatisticsExt = "Statistics" - [deps.FillArrays.weakdeps] - PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - [[deps.FindFirstFunctions]] git-tree-sha1 = "670e1d9ceaa4a3161d32fe2d2fb2177f8d78b330" uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" @@ -612,6 +802,23 @@ version = "2.26.0" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.5" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "db16beca600632c95fc8aca29890d83788dd8b23" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.96+0" + +[[deps.Format]] +git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.7" + [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" @@ -622,6 +829,30 @@ weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] ForwardDiffStaticArraysExt = "StaticArrays" +[[deps.FreeType]] +deps = ["CEnum", "FreeType2_jll"] +git-tree-sha1 = "907369da0f8e80728ab49c1c7e09327bf0d6d999" +uuid = "b38be410-82b0-50bf-ab77-7b57e271db43" +version = "4.1.1" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "5c1d8ae0efc6c2e7b1fc502cbe25def8f661b7bc" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.13.2+0" + +[[deps.FreeTypeAbstraction]] +deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"] +git-tree-sha1 = "2493cdfd0740015955a8e46de4ef28f49460d8bc" +uuid = "663a7486-cb36-511b-a19d-713bb74d65c9" +version = "0.10.3" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1ed150b39aebcc805c26b93a8d0122c940f64ce2" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.14+0" + [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" @@ -644,34 +875,104 @@ deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" version = "1.11.0" +[[deps.GLFW]] +deps = ["GLFW_jll"] +git-tree-sha1 = "7ed24cfc4cb29fb10c0e8cca871ddff54c32a4c3" +uuid = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98" +version = "3.4.3" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "532f9126ad901533af1d4f5c198867227a7bb077" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.4.0+1" + +[[deps.GLMakie]] +deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "PrecompileTools", "Printf", "ShaderAbstractions", "StaticArrays"] +git-tree-sha1 = "f644c26d8b4d0d9d6ac6ff1f7fefe7b8f70c3e92" +uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" +version = "0.10.9" + [[deps.GPUArraysCore]] deps = ["Adapt"] git-tree-sha1 = "ec632f177c0d990e64d955ccc1b8c04c485a0950" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" version = "0.1.6" +[[deps.GeoFormatTypes]] +git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271" +uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f" +version = "0.4.2" + +[[deps.GeoInterface]] +deps = ["Extents", "GeoFormatTypes"] +git-tree-sha1 = "2f6fce56cdb8373637a6614e14a5768a88450de2" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.3.7" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "Extents", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "b62f2b2d76cee0d61a2ef2b3118cd2a3215d3134" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.11" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "674ff0db93fffcd11a3573986e550d66cd4fd71f" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.80.5+0" + [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" version = "1.3.1" +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" +git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.12.0" +version = "1.9.0" + +[[deps.GridLayoutBase]] +deps = ["GeometryBasics", "InteractiveUtils", "Observables"] +git-tree-sha1 = "fc713f007cff99ff9e50accba6373624ddd33588" +uuid = "3955a311-db13-416c-9275-1d80ed98e5e9" +version = "0.11.0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "401e4f3f30f43af2c8478fc008da50096ea5240f" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "8.3.1+0" [[deps.HiGHS]] deps = ["HiGHS_jll", "MathOptInterface", "PrecompileTools", "SparseArrays"] -git-tree-sha1 = "555967d9fbcc5adec5362d6fc953dd11eb910250" +git-tree-sha1 = "5fe8cdf06815d5b61f219d6871fc9a624111017d" uuid = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" -version = "1.10.0" +version = "1.10.2" [[deps.HiGHS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "1f240e0fb1c4cdf39bca5d3881d1758263931ccb" +git-tree-sha1 = "c12314e192631fc302078e27a06da5ab51770e3b" uuid = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea" -version = "1.7.2+0" +version = "1.8.0+0" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] @@ -679,6 +980,12 @@ git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" version = "0.1.17" +[[deps.HypergeometricFunctions]] +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "7c4195be1649ae622304031ed46a2f4df989f1eb" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.24" + [[deps.IJulia]] deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] git-tree-sha1 = "1702f79fa30f56b68d5b2fd6fb3a9a14ff6f9130" @@ -696,6 +1003,47 @@ git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" version = "0.1.1" +[[deps.ImageAxes]] +deps = ["AxisArrays", "ImageBase", "ImageCore", "Reexport", "SimpleTraits"] +git-tree-sha1 = "2e4520d67b0cef90865b3ef727594d2a58e0e1f8" +uuid = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" +version = "0.6.11" + +[[deps.ImageBase]] +deps = ["ImageCore", "Reexport"] +git-tree-sha1 = "eb49b82c172811fd2c86759fa0553a2221feb909" +uuid = "c817782e-172a-44cc-b673-b171935fbb9e" +version = "0.1.7" + +[[deps.ImageCore]] +deps = ["ColorVectorSpace", "Colors", "FixedPointNumbers", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "PrecompileTools", "Reexport"] +git-tree-sha1 = "b2a7eaa169c13f5bcae8131a83bc30eff8f71be0" +uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" +version = "0.10.2" + +[[deps.ImageIO]] +deps = ["FileIO", "IndirectArrays", "JpegTurbo", "LazyModules", "Netpbm", "OpenEXR", "PNGFiles", "QOI", "Sixel", "TiffImages", "UUIDs"] +git-tree-sha1 = "437abb322a41d527c197fa800455f79d414f0a3c" +uuid = "82e4d734-157c-48bb-816b-45c225c6df19" +version = "0.6.8" + +[[deps.ImageMetadata]] +deps = ["AxisArrays", "ImageAxes", "ImageBase", "ImageCore"] +git-tree-sha1 = "355e2b974f2e3212a75dfb60519de21361ad3cb7" +uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" +version = "0.9.9" + +[[deps.Imath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "0936ba688c6d201805a83da835b55c61a180db52" +uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1" +version = "3.1.11+0" + +[[deps.IndirectArrays]] +git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f" +uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" +version = "1.0.0" + [[deps.Infiltrator]] deps = ["InteractiveUtils", "Markdown", "REPL", "UUIDs"] git-tree-sha1 = "38298a8eabe09e49e6f60927c9e1ca3481688ba0" @@ -728,6 +1076,40 @@ deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" version = "1.11.0" +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "88a101217d7cb38a7b481ccd50d21876e1d1b0e0" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.15.1" +weakdeps = ["Unitful"] + + [deps.Interpolations.extensions] + InterpolationsUnitfulExt = "Unitful" + +[[deps.IntervalArithmetic]] +deps = ["CRlibm_jll", "LinearAlgebra", "MacroTools", "RoundingEmulator"] +git-tree-sha1 = "c59c57c36683aa17c563be6edaac888163f35285" +uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +version = "0.22.18" +weakdeps = ["DiffRules", "ForwardDiff", "IntervalSets", "RecipesBase"] + + [deps.IntervalArithmetic.extensions] + IntervalArithmeticDiffRulesExt = "DiffRules" + IntervalArithmeticForwardDiffExt = "ForwardDiff" + IntervalArithmeticIntervalSetsExt = "IntervalSets" + IntervalArithmeticRecipesBaseExt = "RecipesBase" + +[[deps.IntervalSets]] +git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.10" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" + [[deps.InverseFunctions]] git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" uuid = "3587e190-3f89-42d0-90ee-14403ec27112" @@ -748,6 +1130,12 @@ git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" version = "0.2.2" +[[deps.Isoband]] +deps = ["isoband_jll"] +git-tree-sha1 = "f9b6d97355599074dc867318950adaa6f9946137" +uuid = "f1662d9f-8043-43de-a69a-05efc1cc6ff4" +version = "0.1.1" + [[deps.IterTools]] git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" @@ -760,9 +1148,9 @@ version = "1.0.0" [[deps.JLD2]] deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"] -git-tree-sha1 = "a0746c21bdc986d0dc293efa6b1faee112c37c28" +git-tree-sha1 = "783c1be5213a09609b23237a0c9e5dfd258ae6f2" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.4.53" +version = "0.5.7" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -786,6 +1174,18 @@ weakdeps = ["ArrowTypes"] [deps.JSON3.extensions] JSON3ArrowExt = ["ArrowTypes"] +[[deps.JpegTurbo]] +deps = ["CEnum", "FileIO", "ImageCore", "JpegTurbo_jll", "TOML"] +git-tree-sha1 = "fa6d0bcff8583bac20f1ffa708c3913ca605c611" +uuid = "b835a17e-a41a-41e7-81f0-2f016b05efe0" +version = "0.1.5" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "25ee0be4d43d0269027024d75a24c24d6c6e590c" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.0.4+0" + [[deps.JuMP]] deps = ["LinearAlgebra", "MacroTools", "MathOptInterface", "MutableArithmetics", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays"] git-tree-sha1 = "c91f872c6150cf1471f9cb279f5e0dc09423bdcf" @@ -810,11 +1210,35 @@ git-tree-sha1 = "07649c499349dad9f08dde4243a4c597064663e9" uuid = "ef3ab10e-7fda-4108-b977-705223b18434" version = "0.6.0" +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "7d703202e65efa1369de1279c162b915e245eed1" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.9" + [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "71dd823bf0a5aaa8264e1143b96a0baa631f4ce0" +git-tree-sha1 = "4f20a2df85a9e5d55c9e84634bbf808ed038cabd" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.7" +version = "0.9.8" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "170b660facf5df5de098d866564877e119141cbd" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.2+0" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "18.1.7+0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "854a9c268c43b77b0a27f22d7fab8d33cdb3a731" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.2+1" [[deps.LaTeXStrings]] git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" @@ -850,6 +1274,11 @@ deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" version = "1.11.0" +[[deps.LazyModules]] +git-tree-sha1 = "a560dd966b386ac9ae60bdd3a3d3a326062d3c3e" +uuid = "8cdb02fc-e678-4876-92c5-9defec4f444e" +version = "0.3.1" + [[deps.LeftChildRightSiblingTrees]] deps = ["AbstractTrees"] git-tree-sha1 = "fb6803dafae4a5d62ea5cab204b1e657d9737e7f" @@ -858,9 +1287,9 @@ version = "0.2.0" [[deps.Legolas]] deps = ["Arrow", "ArrowTypes", "Tables", "UUIDs"] -git-tree-sha1 = "d02f53055c6e88df61de357cdaeef05a71784d84" +git-tree-sha1 = "fc184d95785850d7f900af3efab7bd5c3ea9eebf" uuid = "741b9549-f6ed-4911-9fbf-4a1c0c97f0cd" -version = "0.5.21" +version = "0.5.22" weakdeps = ["ConstructionBase"] [deps.Legolas.extensions] @@ -895,6 +1324,48 @@ version = "1.11.0+1" uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" version = "1.11.0" +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] +git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.11.0+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.6.0+0" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.50.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.17.0+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "0c4f9c4f1a50d8f35048fa0532dabbadf702f81e" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.40.1+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "5ee6203157c120d79034c748a2acba45b82b8807" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.40.1+0" + [[deps.LineSearch]] deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" @@ -974,9 +1445,9 @@ version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" +version = "1.1.0" [[deps.LoopVectorization]] deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] @@ -1018,11 +1489,28 @@ git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.13" +[[deps.Makie]] +deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] +git-tree-sha1 = "204f06860af9008fa08b3a4842f48116e1209a2c" +uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" +version = "0.21.9" + +[[deps.MakieCore]] +deps = ["ColorTypes", "GeometryBasics", "IntervalSets", "Observables"] +git-tree-sha1 = "b0e2e3473af351011e598f9219afb521121edd2b" +uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" +version = "0.8.6" + [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" version = "0.1.8" +[[deps.MappedArrays]] +git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.2" + [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" @@ -1036,9 +1524,15 @@ version = "1.1.0" [[deps.MathOptInterface]] deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test", "Unicode"] -git-tree-sha1 = "c7fff4fbc415a6833988efbda7621039af2a5f36" +git-tree-sha1 = "9a9905be768c496fb2f2c5fe34e2c9fe44b86e7a" uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" -version = "1.32.0" +version = "1.33.0" + +[[deps.MathTeXEngine]] +deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"] +git-tree-sha1 = "f45c8916e8385976e1ccd055c9874560c257ab13" +uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" +version = "0.6.2" [[deps.MaybeInplace]] deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] @@ -1061,11 +1555,17 @@ deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" version = "2.28.6+0" +[[deps.MeshIO]] +deps = ["ColorTypes", "FileIO", "GeometryBasics", "Printf"] +git-tree-sha1 = "dc182956229ff16d5a4d90a562035e633bd2561d" +uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" +version = "0.4.12" + [[deps.MetaGraphsNext]] deps = ["Graphs", "JLD2", "SimpleTraits"] -git-tree-sha1 = "a385fe5aa1384647e55c0c8773457b71e9b08518" +git-tree-sha1 = "d2ecf4a20f4ac694987dd08ac489b7f7ff805f35" uuid = "fa8bd995-216d-47f1-8a91-f3b68fbeb377" -version = "0.7.0" +version = "0.7.1" [[deps.Missings]] deps = ["DataAPI"] @@ -1083,6 +1583,18 @@ git-tree-sha1 = "2c140d60d7cb82badf06d8783800d0bcd1a7daa2" uuid = "78c3b35d-d492-501b-9361-3d52fe80e533" version = "0.8.1" +[[deps.ModernGL]] +deps = ["Libdl"] +git-tree-sha1 = "b76ea40b5c0f45790ae09492712dd326208c28b2" +uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301" +version = "1.1.7" + +[[deps.MosaicViews]] +deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] +git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" +uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" +version = "0.3.4" + [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2023.12.12" @@ -1110,6 +1622,12 @@ git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" version = "1.0.2" +[[deps.Netpbm]] +deps = ["FileIO", "ImageCore", "ImageMetadata"] +git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd" +uuid = "f09324ee-3d7c-5217-9330-fc30815ba969" +version = "1.1.1" + [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" @@ -1142,6 +1660,11 @@ version = "3.15.1" SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" +[[deps.Observables]] +git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.5" + [[deps.OffsetArrays]] git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" @@ -1151,22 +1674,52 @@ weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] OffsetArraysAdaptExt = "Adapt" +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" version = "0.3.27+1" +[[deps.OpenEXR]] +deps = ["Colors", "FileIO", "OpenEXR_jll"] +git-tree-sha1 = "327f53360fdb54df7ecd01e96ef1983536d1e633" +uuid = "52e1d378-f018-4a11-a4be-720524705ac7" +version = "0.3.2" + +[[deps.OpenEXR_jll]] +deps = ["Artifacts", "Imath_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "8292dd5c8a38257111ada2174000a33745b06d4e" +uuid = "18a262bb-aa17-5467-a713-aee519bc75cb" +version = "3.2.4+0" + [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" version = "0.8.1+2" +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.0.15+1" + [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.5+0" +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6703a85cb3781bd5909d48730a67205f3f31a575" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.3+0" + [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" @@ -1230,11 +1783,28 @@ git-tree-sha1 = "fd00935c531394ff30774cf8f7c89618597dd321" uuid = "b2d7f28f-acd6-4007-8b26-bc27716e5513" version = "0.5.6" +[[deps.PCRE2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.42.0+1" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.31" + +[[deps.PNGFiles]] +deps = ["Base64", "CEnum", "ImageCore", "IndirectArrays", "OffsetArrays", "libpng_jll"] +git-tree-sha1 = "67186a2bc9a90f9f85ff3cc8277868961fb57cbd" +uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" +version = "0.4.3" + [[deps.PackageCompiler]] deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "f26a9bf5c7fb4bf00d9499f664742675d5e78d3a" +git-tree-sha1 = "ec56e6fa288d89d3fb574d4cef4d1d537f099ad2" uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "2.1.20" +version = "2.1.21" [[deps.PackageExtensionCompat]] git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" @@ -1242,6 +1812,24 @@ uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" version = "1.0.2" weakdeps = ["Requires", "TOML"] +[[deps.Packing]] +deps = ["GeometryBasics"] +git-tree-sha1 = "ec3edfe723df33528e085e632414499f26650501" +uuid = "19eb6ba3-879d-56ad-ad62-d5c202156566" +version = "0.5.0" + +[[deps.PaddedViews]] +deps = ["OffsetArrays"] +git-tree-sha1 = "0fac6313486baae819364c52b4f483450a9d793f" +uuid = "5432bcbf-9aad-5242-b902-cca2824c8663" +version = "0.5.12" + +[[deps.Pango_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e127b609fb9ecba6f201ba7ab753d5a605d53801" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.54.1+0" + [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" @@ -1254,6 +1842,12 @@ git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" +[[deps.Pixman_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "35621f10a7531bc8fa58f74610b1bfb70a3cfc6b" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.43.4+0" + [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -1263,6 +1857,18 @@ weakdeps = ["REPL"] [deps.Pkg.extensions] REPLExt = "REPL" +[[deps.PkgVersion]] +deps = ["Pkg"] +git-tree-sha1 = "f9501cc0430a26bc3d156ae1b5b0c1b47af4d6da" +uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688" +version = "0.3.3" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] +git-tree-sha1 = "650a022b2ce86c7dcfbdecf00f78afeeb20e5655" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.4.2" + [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] git-tree-sha1 = "6d38fea02d983051776a856b7df75b30cf9a3c1f" @@ -1275,6 +1881,11 @@ git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" version = "0.2.2" +[[deps.PolygonOps]] +git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6" +uuid = "647866c9-e3ac-4575-94e7-e3d426903924" +version = "0.1.2" + [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" @@ -1326,6 +1937,35 @@ git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" version = "0.1.4" +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "8f6bc219586aef8baf0ff9a5fe16ee9c70cb65e4" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.10.2" + +[[deps.PtrArrays]] +git-tree-sha1 = "77a42d78b6a92df47ab37e177b2deac405e1c88f" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.2.1" + +[[deps.QOI]] +deps = ["ColorTypes", "FileIO", "FixedPointNumbers"] +git-tree-sha1 = "18e8f4d1426e965c7b532ddd260599e1510d26ce" +uuid = "4b34888f-f399-49d4-9bb3-47ed5cae4e65" +version = "1.0.0" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "cda3b045cf9ef07a08ad46731f5a3165e56cf3da" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.11.1" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" @@ -1336,6 +1976,21 @@ deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" version = "1.11.0" +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.5" +weakdeps = ["FixedPointNumbers"] + + [deps.Ratios.extensions] + RatiosFixedPointNumbersExt = "FixedPointNumbers" + [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -1344,9 +1999,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "b034171b93aebc81b3e1890a036d13a9c4a9e3e0" +git-tree-sha1 = "43cdc0987135597867a37fc3e8e0fc9fdef6ac66" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.27.0" +version = "3.27.1" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1398,17 +2053,31 @@ uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" version = "3.6.2" [[deps.Ribasim]] -deps = ["Accessors", "Arrow", "BasicModelInterface", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "DiffEqBase", "DiffEqCallbacks", "EnumX", "FiniteDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoggingExtras", "MetaGraphsNext", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqTsit5", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "SparseConnectivityTracer", "Statistics", "StructArrays", "Tables", "TerminalLoggers", "TranscodingStreams"] +deps = ["Accessors", "Arrow", "BasicModelInterface", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "DiffEqBase", "DiffEqCallbacks", "EnumX", "FiniteDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoggingExtras", "MetaGraphsNext", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqTsit5", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "SparseConnectivityTracer", "StructArrays", "Tables", "TerminalLoggers", "TranscodingStreams"] path = "core" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" version = "2024.11.0" +weakdeps = ["DataFrames", "Makie"] [deps.Ribasim.extensions] RibasimMakieExt = ["Makie", "DataFrames"] - [deps.Ribasim.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.8.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.5.1+0" + +[[deps.RoundingEmulator]] +git-tree-sha1 = "40b9edad2e5287e05bd413a38f61a8ff55b9557b" +uuid = "5eaf0fd0-dfba-4ccb-bf02-d820a40db705" +version = "0.2.1" [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] @@ -1420,6 +2089,12 @@ version = "0.5.13" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" +[[deps.SIMD]] +deps = ["PrecompileTools"] +git-tree-sha1 = "98ca7c29edd6fc79cd74c61accb7010a4e7aee33" +uuid = "fdea26ae-647d-5447-a871-4b548cad5224" +version = "3.6.0" + [[deps.SIMDTypes]] git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" @@ -1445,9 +2120,9 @@ version = "3.45.3+0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "26fea1911818cd480400f1a2b7f6b32c3cc3836a" +git-tree-sha1 = "86e1c491cddf233d77d8aadbe289005db44e8445" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.56.4" +version = "2.57.2" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -1499,9 +2174,9 @@ version = "1.2.1" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "ff11acffdb082493657550959d4feb4b6149e73a" +git-tree-sha1 = "305becf8af67eae1dbc912ee9097f00aeeabb8d5" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.5" +version = "1.4.6" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -1513,11 +2188,29 @@ git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" version = "1.1.1" +[[deps.ShaderAbstractions]] +deps = ["ColorTypes", "FixedPointNumbers", "GeometryBasics", "LinearAlgebra", "Observables", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "79123bc60c5507f035e6d1d9e563bb2971954ec8" +uuid = "65257c39-d410-5151-9873-9b3e5be5013e" +version = "0.4.1" + [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" version = "1.11.0" +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SignedDistanceFields]] +deps = ["Random", "Statistics", "Test"] +git-tree-sha1 = "d263a08ec505853a5ff1c1ebde2070419e3f28e9" +uuid = "73760f76-fbc4-59ce-8f25-708e95d2df96" +version = "0.4.0" + [[deps.SimpleNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "DiffResults", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] git-tree-sha1 = "44021f3efc023be3871195d8ad98b865001a2fa1" @@ -1547,6 +2240,12 @@ git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" version = "1.1.0" +[[deps.Sixel]] +deps = ["Dates", "FileIO", "ImageCore", "IndirectArrays", "OffsetArrays", "REPL", "libsixel_jll"] +git-tree-sha1 = "2da10356e31327c7096832eb9cd86307a50b1eb6" +uuid = "45858cf5-a6b0-47a3-bbea-62219f50df47" +version = "0.1.3" + [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" version = "1.11.0" @@ -1610,16 +2309,14 @@ version = "2.23.0" [[deps.SparseMatrixColorings]] deps = ["ADTypes", "DataStructures", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "ccc32032d8f6790ad198c99fb8ef20d8100a0de4" +git-tree-sha1 = "f37f046636f8dc353a39279abfefe296db212171" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.4.7" +version = "0.4.8" +weakdeps = ["Colors"] [deps.SparseMatrixColorings.extensions] SparseMatrixColoringsColorsExt = "Colors" - [deps.SparseMatrixColorings.weakdeps] - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - [[deps.Sparspak]] deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" @@ -1636,6 +2333,18 @@ weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" +[[deps.StableRNGs]] +deps = ["Random"] +git-tree-sha1 = "83e6cce8324d49dfaf9ef059227f91ed4441a8e5" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.2" + +[[deps.StackViews]] +deps = ["OffsetArrays"] +git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c" +uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" +version = "0.1.1" + [[deps.Static]] deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] git-tree-sha1 = "87d51a3ee9a4b0d2fe054bdd3fc2436258db2603" @@ -1655,9 +2364,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.8" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1679,6 +2388,29 @@ weakdeps = ["SparseArrays"] [deps.Statistics.extensions] SparseArraysExt = ["SparseArrays"] +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.7.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.34.3" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "b423576adc27097764a90e163157bcfc9acf0f46" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.3.2" +weakdeps = ["ChainRulesCore", "InverseFunctions"] + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + [[deps.StrideArraysCore]] deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] git-tree-sha1 = "f35f6ab602df8413a50c4a25ca14de821e8605fb" @@ -1714,6 +2446,10 @@ version = "1.11.0" uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" version = "1.11.0" +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" @@ -1753,6 +2489,12 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + [[deps.TerminalLoggers]] deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] git-tree-sha1 = "f133fab380933d042f6796eda4e130272ba520ca" @@ -1787,6 +2529,12 @@ git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" version = "0.5.2" +[[deps.TiffImages]] +deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "SIMD", "UUIDs"] +git-tree-sha1 = "38f139cc4abf345dd4f22286ec000728d5e8e097" +uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69" +version = "0.10.2" + [[deps.TimeZones]] deps = ["Dates", "Downloads", "InlineStrings", "Mocking", "Printf", "Scratch", "TZJData", "Unicode", "p7zip_jll"] git-tree-sha1 = "8323074bc977aa85cf5ad71099a83ac75b0ac107" @@ -1814,6 +2562,11 @@ git-tree-sha1 = "be986ad9dac14888ba338c2554dcfec6939e1393" uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" version = "0.2.1" +[[deps.TriplotBase]] +git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b" +uuid = "981d1d27-644d-49a2-9326-4793e63143c3" +version = "0.1.0" + [[deps.TruncatedStacktraces]] deps = ["InteractiveUtils", "MacroTools", "Preferences"] git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" @@ -1834,6 +2587,23 @@ version = "1.0.2" uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" version = "1.11.0" +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "d95fe458f26209c66a187b1114df96fd70839efd" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.21.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" + [[deps.VectorizationBase]] deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] git-tree-sha1 = "e7f5b81c65eb858bed630fe006837b935518aca5" @@ -1851,12 +2621,138 @@ git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" version = "0.2.0" +[[deps.Wayland_jll]] +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.21.0+1" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.31.0+0" + [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" version = "1.4.2" +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "c1a7aa6219628fcd757dede0ca95e245c5cd9511" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "1.0.0" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "6a451c6f33a176150f315726eba8b92fbfdb9ae7" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.13.4+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.41+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "afead5aba5aa507ad5a3bf01f58f82c8d1403495" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.8.6+0" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.11+0" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.4+0" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "d2d1a5c49fae4ba39983f63de6afcbea47194e85" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.6+0" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "47e45cd78224c53109495b3e324df0c37bb61fbe" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.11+0" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8fdda4c692503d44d04a0603d9ac0982054635f9" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.1+0" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.17.0+0" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.2+0" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.6+0" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.39.0+0" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.5.0+0" + [[deps.ZMQ]] deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] git-tree-sha1 = "18cfd00df3cbbebf8ea4ec7ea6bbceb3af716bd0" @@ -1880,17 +2776,65 @@ git-tree-sha1 = "555d1076590a6cc2fdee2ef1469451f872d8b41b" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" version = "1.5.6+1" +[[deps.isoband_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51b5eeb3f98367157a7a12a1fb0aa5328946c03c" +uuid = "9a68df92-36a6-505f-a73e-abb412b6bfb4" +version = "0.2.3+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1827acba325fdcdf1d2647fc8d5301dd9ba43a9d" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.9.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "e17c115d55c5fbb7e52ebedb427a0dca79d4484e" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.2+0" + [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" version = "5.11.0+0" +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a22cf860a7d27e4f3498a0fe0811a7957badb38" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.3+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "b70c870239dc3d7bc094eb2d6be9b73d27bef280" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.44+0" + +[[deps.libsixel_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Pkg", "libpng_jll"] +git-tree-sha1 = "7dfa0fd9c783d3d0cc43ea1af53d69ba45c447df" +uuid = "075b6546-f08a-558a-be8f-8157d0f608a5" +version = "1.10.3+1" + [[deps.libsodium_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "f76d682d87eefadd3f165d8d9fda436464213142" uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" version = "1.0.20+1" +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "490376214c4721cdaca654041f635213c6165cb3" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+2" + [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" @@ -1906,3 +2850,21 @@ version = "2021.12.0+0" deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" version = "17.4.0+2" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "35976a1216d6c066ea32cba2150c4fa682b276fc" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "10164.0.0+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "dcc541bb19ed5b0ede95581fb2e41ecf179527d2" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.6.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+1" diff --git a/Project.toml b/Project.toml index 4e594a1cf..48e5db1ac 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" BasicModelInterface = "59605e27-edc0-445a-b93d-c09a3a50b330" CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" +Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d" DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965" @@ -20,6 +21,7 @@ DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" FindFirstFunctions = "64ca27bc-2ba2-4a57-88aa-44e436879224" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" +GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" @@ -30,6 +32,7 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" Legolas = "741b9549-f6ed-4911-9fbf-4a1c0c97f0cd" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" diff --git a/docs/_quarto.yml b/docs/_quarto.yml index 0804b0490..98654dabd 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -98,6 +98,7 @@ website: - dev/bmi.qmd - dev/ci.qmd - dev/release.qmd + - dev/callstacks.qmd - section: QGIS contents: - dev/qgis.qmd diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd new file mode 100644 index 000000000..9300b3cb3 --- /dev/null +++ b/docs/dev/callstacks.qmd @@ -0,0 +1,216 @@ +# Call stacks + +```{julia} +# | code-fold: true +# adapted from https://gist.github.com/mkborregaard/81825c3d370bb4d8dbfe59c3b2ae4b33 +# by mkborregaard + +using JuliaInterpreter, OrderedCollections +using Graphs, MetaGraphsNext + +const callchains = OrderedSet{Vector{Method}}() +const modules = Set{Module}() + +function callchain(frame::JuliaInterpreter.Frame) + chain = Method[] + sc = JuliaInterpreter.scopeof(frame) + while sc isa Method + push!(chain, sc) + frame = frame.caller + frame === nothing && break + sc = JuliaInterpreter.scopeof(frame) + end + return chain +end + +function log_far!(@nospecialize(recurse), frame, istoplevel::Bool=false) + chain = callchain(frame) + chain[1].module ∈ modules && push!(callchains, chain) + return JuliaInterpreter.finish_and_return!(recurse, frame, istoplevel) +end + +function encode_vertices(callchains) + i = 0 + vertices = Dict{Array{Method},Int}() + for chain in callchains + for ind in length(chain):-1:1 + vert = chain[ind:end] + haskey(vertices, vert) || (vertices[vert] = (i += 1)) + end + end + vertices +end + +# per vertex: (module, name, file) +function getdata(vertices) + data = Vector{NTuple{3, Symbol}}(undef, length(vertices)) + for (k, v) in vertices + k1 = first(k) + file = Symbol(last(split(String(k1.file), "\\"))) + data[v] = (Symbol(k1.module), k1.name, file) + end + data +end + +@kwdef struct NodeMetadata + i::Int + mod::Symbol + name::Symbol + file::Symbol + loc::Vector{Float64} = fill(NaN, 2) + depth::Base.RefValue{Int} = Ref(0) + isleaf::Base.RefValue{Bool} = Ref(false) +end + +function Base.show(io::IO, nm::NodeMetadata) + (; mod, name) = nm + print(io, "$mod.$name") +end + +function construct_graph(callchains) + vertices = encode_vertices(callchains) + data = getdata(vertices) + + graph = MetaGraph( + DiGraph(); + label_type = Int, + vertex_data_type = NodeMetadata + ) + + for (i, dat) in enumerate(data) + mod, name, file = dat + graph[i] = NodeMetadata(; i, mod, name, file) + end + + for chain in callchains + for ind in length(chain)-1:-1:1 + src = vertices[chain[ind+1:end]] + dst = vertices[chain[ind:end]] + graph[src, dst] = nothing + end + end + + graph, vertices +end + +function tracecall(mods::Tuple, call, args) + empty!(callchains) + empty!(modules) + for m in mods + push!(modules, m) + end + frame = JuliaInterpreter.enter_call(call, args...) + log_far!(log_far!, frame, false) + construct_graph(callchains) +end + +############################################# + +using Ribasim +using SQLite +``` + +## Parameter initialization + +```{julia} +toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") +config = Ribasim.Config(toml_path) +db_path = Ribasim.database_path(config) +db = SQLite.DB(db_path) + +graph, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) +close(db) +``` + +```{julia} +for i in labels(graph) + graph[i].loc .= NaN +end + + +using GLMakie +using Colors + +f = Figure() +ax = Axis(f[1, 1]) + +maxdepth = 5 + +# Get node depths +depths = dijkstra_shortest_paths(graph, 1).dists +nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) + +for (i, depth) in enumerate(depths) + nm = graph[i] + nm.depth[] = depth + nm.loc[1] = depth + + push!(nodes_per_depth[Int(depth)], i) +end + +# Set node coordinates +for depth in 0:maxdepth + nodes = nodes_per_depth[depth] + n_nodes = length(nodes) + ys = n_nodes == 1 ? [0] : range(-1, 1, length = n_nodes) + for (i, y) in zip(nodes, ys) + graph[i].loc .= (depth, y) + end +end + +# Plot edges +for edge in edges(graph) + nm_src = graph[edge.src] + nm_dst = graph[edge.dst] + + (nm_dst.depth[] > maxdepth) && continue + + x = [nm_src.loc[1], nm_dst.loc[1]] + y = [nm_src.loc[2], nm_dst.loc[2]] + lines!(ax, x, y; color = :black) +end + +# Plot node labels +files = unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim) +colors = distinguishable_colors(length(files)+1)[2:end] +color_dict = OrderedDict(zip(files, colors)) + +get_color(file) = get(color_dict, file, :black) + +for node in labels(graph) + nm = graph[node] + (nm.depth[] > maxdepth) && continue + color = nm.mod == :Ribasim ? :green : :black + text!(ax, nm.loc..., + text = "$nm", + color = get_color(nm.file), + font = :bold, + strokecolor = :black, + strokewidth = 1, + label = String(nm.file) + ) +end + +Legend( + f[1,2], + [MarkerElement(color = c, marker = :rect) for c in values(color_dict)], + String.(files) +) + +f +``` + +```{julia} +# TODO: +# - Fix y coordinate of nodes that have no outneighbors +# - Remove nodes (and everything downstream) from non-Ribasim calls +# - Color boxes by file name and add legend +# - Add boxes around names +# - Let connection lines emerge from box boundaries + +for (k, v) in nodes_per_depth + for i in v + @assert graph[i].depth[] == k + end +end +``` diff --git a/docs/dev/callstacks.quarto_ipynb b/docs/dev/callstacks.quarto_ipynb new file mode 100644 index 000000000..6d1c85b34 --- /dev/null +++ b/docs/dev/callstacks.quarto_ipynb @@ -0,0 +1,151 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Call stacks\n" + ], + "id": "15ad546e" + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "# | code-fold: true\n", + "# adapted from https://gist.github.com/mkborregaard/81825c3d370bb4d8dbfe59c3b2ae4b33\n", + "# by mkborregaard\n", + "\n", + "using JuliaInterpreter, OrderedCollections\n", + "using Graphs, MetaGraphsNext\n", + "\n", + "const callchains = OrderedSet{Vector{Method}}()\n", + "const modules = Set{Module}()\n", + "\n", + "function callchain(frame::JuliaInterpreter.Frame)\n", + " chain = Method[]\n", + " sc = JuliaInterpreter.scopeof(frame)\n", + " while sc isa Method\n", + " push!(chain, sc)\n", + " frame = frame.caller\n", + " frame === nothing && break\n", + " sc = JuliaInterpreter.scopeof(frame)\n", + " end\n", + " return chain\n", + "end\n", + "\n", + "function log_far!(@nospecialize(recurse), frame, istoplevel::Bool=false)\n", + " chain = callchain(frame)\n", + " chain[1].module ∈ modules && push!(callchains, chain)\n", + " return JuliaInterpreter.finish_and_return!(recurse, frame, istoplevel)\n", + "end\n", + "\n", + "function encode_vertices(callchains)\n", + " i = 0\n", + " vertices = Dict{Array{Method},Int}()\n", + " for chain in callchains\n", + " for ind in length(chain):-1:1\n", + " vert = chain[ind:end]\n", + " haskey(vertices, vert) || (vertices[vert] = (i += 1))\n", + " end\n", + " end\n", + " vertices\n", + "end\n", + "\n", + "function getnames(vertices)\n", + " names = Vector{String}(undef, length(vertices))\n", + " for (k, v) in vertices\n", + " names[v] = \"$(k[1].module).$(k[1].name)\"\n", + " end\n", + " names\n", + "end\n", + "\n", + "function construct_graph(callchains)\n", + " vertices = encode_vertices(callchains)\n", + " names = getnames(vertices)\n", + "\n", + " graph = MetaGraph(\n", + " DiGraph(); \n", + " label_type = Int,\n", + " vertex_data_type = String\n", + " )\n", + "\n", + " for (i, name) in enumerate(names)\n", + " graph[i] = name\n", + " end\n", + "\n", + " for chain in callchains\n", + " for ind in length(chain)-1:-1:1\n", + " src = vertices[chain[ind+1:end]]\n", + " dst = vertices[chain[ind:end]]\n", + " graph[src, dst] = nothing\n", + " end\n", + " end\n", + "\n", + " graph\n", + "end\n", + "\n", + "function tracecall(mods::Tuple, call, arg)\n", + " empty!(callchains)\n", + " empty!(modules)\n", + " for m in mods\n", + " push!(modules, m)\n", + " end\n", + " frame = JuliaInterpreter.enter_call(call, arg)\n", + " log_far!(log_far!, frame, false)\n", + " construct_graph(callchains)\n", + "end\n", + "\n", + "#############################################\n", + "\n", + "using Ribasim" + ], + "id": "3b0556e6", + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Model initialization\n" + ], + "id": "4dedb203" + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "toml_path = normpath(@__DIR__, \"../../generated_testmodels/trivial/ribasim.toml\")\n", + "graph = tracecall((Ribasim,), toml_path)" + ], + "id": "a216be8f", + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": {}, + "source": [ + "using GLMakie\n", + "\n", + "f = Figure()\n", + "\n", + "f" + ], + "id": "f3ddc75c", + "execution_count": null, + "outputs": [] + } + ], + "metadata": { + "kernelspec": { + "name": "julia-1.11", + "language": "julia", + "display_name": "Julia 1.11.1", + "path": "C:\\Users\\konin_bt\\AppData\\Roaming\\jupyter\\kernels\\julia-1.11" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 8ab0a5afac80d6a8399632386db9e954cd4624ae Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Wed, 30 Oct 2024 16:25:38 +0100 Subject: [PATCH 02/12] Cleaner graph --- docs/dev/callstacks.qmd | 81 ++++++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 17 deletions(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 9300b3cb3..4bfd6b8ff 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -118,15 +118,12 @@ config = Ribasim.Config(toml_path) db_path = Ribasim.database_path(config) db = SQLite.DB(db_path) -graph, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) +graph_orig, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) close(db) ``` ```{julia} -for i in labels(graph) - graph[i].loc .= NaN -end - +graph = copy(graph_orig) using GLMakie using Colors @@ -134,7 +131,10 @@ using Colors f = Figure() ax = Axis(f[1, 1]) +# Options maxdepth = 5 +plot_non_Ribasim = false +squash_per_depth = true # Get node depths depths = dijkstra_shortest_paths(graph, 1).dists @@ -148,20 +148,73 @@ for (i, depth) in enumerate(depths) push!(nodes_per_depth[Int(depth)], i) end +# Squash per depth nodes with the same name into one +function squash!(graph, nodes_per_depth) + for depth in 1:maxdepth + names = Dict{String, Vector{Int}}() + nodes_at_depth = nodes_per_depth[depth] + for i in nodes_at_depth + nm = graph[i] + name = "$nm" + if name in keys(names) + push!(names[name], i) + else + names[name] = [i] + end + end + for nodes in values(names) + (length(nodes) == 1) && continue + survivor = first(nodes) + + for i in nodes[2:end] + for i_in in inneighbor_labels(graph, i) + graph[i_in, survivor] = nothing + delete!(graph, i_in, i) + end + + for i_out in outneighbor_labels(graph, i) + graph[survivor, i_out] = nothing + delete!(graph, i, i_out) + end + + delete!(graph, i) + deleteat!(nodes_at_depth, findfirst(==(i), nodes_at_depth)) + end + end + end +end + +squash_per_depth && squash!(graph, nodes_per_depth) + +# Sort nodes by file for each depth +for nodes in values(nodes_per_depth) + sort!(nodes, by = i -> graph[i].file) +end + # Set node coordinates for depth in 0:maxdepth nodes = nodes_per_depth[depth] - n_nodes = length(nodes) + n_nodes = if plot_non_Ribasim + length(nodes) + else + count(i -> graph[i].mod == :Ribasim, nodes) + end ys = n_nodes == 1 ? [0] : range(-1, 1, length = n_nodes) - for (i, y) in zip(nodes, ys) - graph[i].loc .= (depth, y) + idx = 1 + + for i in nodes + nm = graph[i] + if (nm.mod == :Ribasim || plot_non_Ribasim) + graph[i].loc .= (depth, ys[idx]) + idx += 1 + end end end # Plot edges for edge in edges(graph) - nm_src = graph[edge.src] - nm_dst = graph[edge.dst] + nm_src = graph[label_for(graph, edge.src)] + nm_dst = graph[label_for(graph, edge.dst)] (nm_dst.depth[] > maxdepth) && continue @@ -171,7 +224,7 @@ for edge in edges(graph) end # Plot node labels -files = unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim) +files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim), rev = true) colors = distinguishable_colors(length(files)+1)[2:end] color_dict = OrderedDict(zip(files, colors)) @@ -207,10 +260,4 @@ f # - Color boxes by file name and add legend # - Add boxes around names # - Let connection lines emerge from box boundaries - -for (k, v) in nodes_per_depth - for i in v - @assert graph[i].depth[] == k - end -end ``` From 92c6f11f5b661641715ae11b7065aba8b1a223b4 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Thu, 31 Oct 2024 07:59:22 +0100 Subject: [PATCH 03/12] Code reorganisation and water_balance! example --- docs/dev/callstacks.qmd | 203 +++++++++++++++++++++++----------------- 1 file changed, 115 insertions(+), 88 deletions(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 4bfd6b8ff..ec6d02068 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -106,51 +106,31 @@ end ############################################# -using Ribasim -using SQLite -``` - -## Parameter initialization - -```{julia} -toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") -config = Ribasim.Config(toml_path) -db_path = Ribasim.database_path(config) -db = SQLite.DB(db_path) - -graph_orig, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) -close(db) -``` - -```{julia} -graph = copy(graph_orig) - using GLMakie using Colors -f = Figure() -ax = Axis(f[1, 1]) +function get_node_depths(graph) + depths = dijkstra_shortest_paths(graph, 1).dists + nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) -# Options -maxdepth = 5 -plot_non_Ribasim = false -squash_per_depth = true + for (i, depth) in enumerate(depths) + nm = graph[i] + nm.depth[] = depth + nm.loc[1] = depth -# Get node depths -depths = dijkstra_shortest_paths(graph, 1).dists -nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) + push!(nodes_per_depth[Int(depth)], i) + end -for (i, depth) in enumerate(depths) - nm = graph[i] - nm.depth[] = depth - nm.loc[1] = depth + # Sort nodes by file for each depth + for nodes in values(nodes_per_depth) + sort!(nodes, by = i -> graph[i].file) + end - push!(nodes_per_depth[Int(depth)], i) + return nodes_per_depth end -# Squash per depth nodes with the same name into one -function squash!(graph, nodes_per_depth) - for depth in 1:maxdepth +function squash!(graph, nodes_per_depth, max_depth) + for depth in 1:max_depth names = Dict{String, Vector{Int}}() nodes_at_depth = nodes_per_depth[depth] for i in nodes_at_depth @@ -184,73 +164,120 @@ function squash!(graph, nodes_per_depth) end end -squash_per_depth && squash!(graph, nodes_per_depth) +function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) + for depth in 0:max_depth + nodes = nodes_per_depth[depth] + n_nodes = if plot_non_Ribasim + length(nodes) + else + count(i -> graph[i].mod == :Ribasim, nodes) + end + ys = n_nodes == 1 ? [0] : range(-1, 1, length = n_nodes) + idx = 1 -# Sort nodes by file for each depth -for nodes in values(nodes_per_depth) - sort!(nodes, by = i -> graph[i].file) + for i in nodes + nm = graph[i] + if (nm.mod == :Ribasim || plot_non_Ribasim) + graph[i].loc .= (depth, ys[idx]) + idx += 1 + end + end + end end -# Set node coordinates -for depth in 0:maxdepth - nodes = nodes_per_depth[depth] - n_nodes = if plot_non_Ribasim - length(nodes) - else - count(i -> graph[i].mod == :Ribasim, nodes) +function plot_edges!(ax, graph, max_depth) + for edge in edges(graph) + nm_src = graph[label_for(graph, edge.src)] + nm_dst = graph[label_for(graph, edge.dst)] + + (nm_dst.depth[] > max_depth) && continue + + x = [nm_src.loc[1], nm_dst.loc[1]] + y = [nm_src.loc[2], nm_dst.loc[2]] + lines!(ax, x, y; color = :black) end - ys = n_nodes == 1 ? [0] : range(-1, 1, length = n_nodes) - idx = 1 +end - for i in nodes - nm = graph[i] - if (nm.mod == :Ribasim || plot_non_Ribasim) - graph[i].loc .= (depth, ys[idx]) - idx += 1 - end +function plot_labels!(ax, graph, max_depth, color_dict) + for node in labels(graph) + nm = graph[node] + (nm.depth[] > max_depth) && continue + text!(ax, nm.loc..., + text = "$nm", + color = get(color_dict, nm.file, :black), + font = :bold, + strokecolor = :black, + strokewidth = 1, + label = String(nm.file) + ) end end -# Plot edges -for edge in edges(graph) - nm_src = graph[label_for(graph, edge.src)] - nm_dst = graph[label_for(graph, edge.dst)] +function plot_graph( + graph_orig::MetaGraph; + max_depth::Int = 5, + plot_non_Ribasim::Bool = false, + squash_per_depth::Bool = true, +) - (nm_dst.depth[] > maxdepth) && continue + f = Figure() + ax = Axis(f[1, 1]) - x = [nm_src.loc[1], nm_dst.loc[1]] - y = [nm_src.loc[2], nm_dst.loc[2]] - lines!(ax, x, y; color = :black) -end + graph = copy(graph_orig) + nodes_per_depth = get_node_depths(graph) + + # Squash per depth nodes with the same name into one + squash_per_depth && squash!(graph, nodes_per_depth, max_depth) + + set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) + plot_edges!(ax, graph, max_depth) -# Plot node labels -files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim), rev = true) -colors = distinguishable_colors(length(files)+1)[2:end] -color_dict = OrderedDict(zip(files, colors)) - -get_color(file) = get(color_dict, file, :black) - -for node in labels(graph) - nm = graph[node] - (nm.depth[] > maxdepth) && continue - color = nm.mod == :Ribasim ? :green : :black - text!(ax, nm.loc..., - text = "$nm", - color = get_color(nm.file), - font = :bold, - strokecolor = :black, - strokewidth = 1, - label = String(nm.file) + files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim), rev = true) + colors = distinguishable_colors(length(files)+1)[2:end] + color_dict = OrderedDict(zip(files, colors)) + + plot_labels!(ax, graph, max_depth, color_dict) + + Legend( + f[1,2], + [MarkerElement(color = c, marker = :rect) for c in values(color_dict)], + String.(files) ) + + f end -Legend( - f[1,2], - [MarkerElement(color = c, marker = :rect) for c in values(color_dict)], - String.(files) -) +############################################# + +using Ribasim +``` -f +## Parameter initialization + +```{julia} +# | code-fold: true +using SQLite +toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") +config = Ribasim.Config(toml_path) +db_path = Ribasim.database_path(config) +db = SQLite.DB(db_path) + +graph, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) +close(db) + +plot_graph(graph) +``` + +## Water balance + +```{julia} +# | code-fold: true +using OrdinaryDiffEqCore: get_du +model = Ribasim.Model(toml_path) +du = get_du(model.integrator) +(; u, p, t) = model.integrator +graph, verts = tracecall((Ribasim,), Ribasim.water_balance!, (du, u, p, t)) +plot_graph(graph) ``` ```{julia} From 051ca9dd01d151e8e682e89fc24681d84a677b17 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Thu, 31 Oct 2024 10:53:31 +0100 Subject: [PATCH 04/12] Cut generated functions and make formatting a bit nicer --- docs/dev/callstacks.qmd | 45 ++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index ec6d02068..452f1dd3c 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -109,11 +109,26 @@ end using GLMakie using Colors +function cut_generated_calls!(graph) + for i in collect(labels(graph)) + nm = graph[i] + (; name) = nm + if startswith(String(name), "#") + for i_in in inneighbor_labels(graph, i) + for i_out in outneighbor_labels(graph, i) + graph[i_in, i_out] = nothing + end + end + delete!(graph, i) + end + end +end + function get_node_depths(graph) depths = dijkstra_shortest_paths(graph, 1).dists nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) - for (i, depth) in enumerate(depths) + for (i, depth) in zip(labels(graph), depths) nm = graph[i] nm.depth[] = depth nm.loc[1] = depth @@ -123,7 +138,7 @@ function get_node_depths(graph) # Sort nodes by file for each depth for nodes in values(nodes_per_depth) - sort!(nodes, by = i -> graph[i].file) + sort!(nodes, by = i -> graph[i].file, rev = true) end return nodes_per_depth @@ -185,15 +200,20 @@ function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) end end -function plot_edges!(ax, graph, max_depth) +function plot_edges!(ax, graph, max_depth, n_points = 25) for edge in edges(graph) nm_src = graph[label_for(graph, edge.src)] nm_dst = graph[label_for(graph, edge.dst)] (nm_dst.depth[] > max_depth) && continue - x = [nm_src.loc[1], nm_dst.loc[1]] - y = [nm_src.loc[2], nm_dst.loc[2]] + A = (nm_src.loc[2] - nm_dst.loc[2]) / 2 + B = π / (nm_dst.loc[1] - nm_src.loc[1]) + C = (nm_src.loc[2] + nm_dst.loc[2]) / 2 + + x = range(nm_src.loc[1], nm_dst.loc[1], length = n_points) + y = @. A * cos(B * (x - nm_src.loc[1])) + C + lines!(ax, x, y; color = :black) end end @@ -201,15 +221,18 @@ end function plot_labels!(ax, graph, max_depth, color_dict) for node in labels(graph) nm = graph[node] + x, y = nm.loc (nm.depth[] > max_depth) && continue - text!(ax, nm.loc..., + text!(ax, x, y, text = "$nm", color = get(color_dict, nm.file, :black), font = :bold, strokecolor = :black, strokewidth = 1, - label = String(nm.file) + label = String(nm.file), + align = (:center, :bottom) ) + scatter!(ax, [x], [y], color = :black) end end @@ -224,6 +247,10 @@ function plot_graph( ax = Axis(f[1, 1]) graph = copy(graph_orig) + + # Cut out calls whose name starts with '#' + cut_generated_calls!(graph) + nodes_per_depth = get_node_depths(graph) # Squash per depth nodes with the same name into one @@ -232,8 +259,8 @@ function plot_graph( set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) plot_edges!(ax, graph, max_depth) - files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim), rev = true) - colors = distinguishable_colors(length(files)+1)[2:end] + files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim)) + colors = distinguishable_colors(length(files)+1)[end:-1:2] color_dict = OrderedDict(zip(files, colors)) plot_labels!(ax, graph, max_depth, color_dict) From bbae8bb0979e58bd80a916b0ffa35f66fd6f9fd6 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Thu, 31 Oct 2024 15:01:11 +0100 Subject: [PATCH 05/12] Add line numbers --- Manifest.toml | 150 +++++------------------------- Project.toml | 2 +- docs/.gitignore | 1 + docs/dev/callstacks.qmd | 44 ++++++--- docs/dev/callstacks.quarto_ipynb | 151 ------------------------------- 5 files changed, 56 insertions(+), 292 deletions(-) delete mode 100644 docs/dev/callstacks.quarto_ipynb diff --git a/Manifest.toml b/Manifest.toml index cf1b5e944..4ce131ea4 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "377f3d9ebaf0df50320aff7a99e1c7ee0d8cfb6d" +project_hash = "921c2f0c042509feb4a1950ec24084c1ad561dd0" [[deps.ADTypes]] git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081" @@ -225,6 +225,18 @@ git-tree-sha1 = "e329286945d0cfc04456972ea732551869af1cfc" uuid = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0" version = "1.0.1+0" +[[deps.Cairo]] +deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"] +git-tree-sha1 = "7b6ad8c35f4bc3bca8eb78127c8b99719506a5fb" +uuid = "159f3aea-2a34-519c-b102-8c37f9878175" +version = "1.1.0" + +[[deps.CairoMakie]] +deps = ["CRC32c", "Cairo", "Cairo_jll", "Colors", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"] +git-tree-sha1 = "fbfdb7cbe17bd14b60646c14c27a16e5038cde54" +uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" +version = "0.12.15" + [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] git-tree-sha1 = "009060c9a6168704143100f36ab08f06c2af4642" @@ -482,12 +494,6 @@ deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" version = "1.11.0" -[[deps.Dbus_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fc173b380865f70627d7dd1190dc2fce6cc105af" -uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.14.10+0" - [[deps.DelaunayTriangulation]] deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "PrecompileTools", "Random"] git-tree-sha1 = "89df54fbe66e5872d91d8c2cd3a375f660c3fd64" @@ -645,12 +651,6 @@ weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] AdaptExt = "Adapt" -[[deps.EpollShim_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643" -uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+0" - [[deps.ExactPredicates]] deps = ["IntervalArithmetic", "Random", "StaticArrays"] git-tree-sha1 = "b3f2ff58735b5f024c392fde763f29b057e4b025" @@ -875,24 +875,6 @@ deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" version = "1.11.0" -[[deps.GLFW]] -deps = ["GLFW_jll"] -git-tree-sha1 = "7ed24cfc4cb29fb10c0e8cca871ddff54c32a4c3" -uuid = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98" -version = "3.4.3" - -[[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "532f9126ad901533af1d4f5c198867227a7bb077" -uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+1" - -[[deps.GLMakie]] -deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "PrecompileTools", "Printf", "ShaderAbstractions", "StaticArrays"] -git-tree-sha1 = "f644c26d8b4d0d9d6ac6ff1f7fefe7b8f70c3e92" -uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.10.9" - [[deps.GPUArraysCore]] deps = ["Adapt"] git-tree-sha1 = "ec632f177c0d990e64d955ccc1b8c04c485a0950" @@ -933,6 +915,12 @@ git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" version = "1.3.1" +[[deps.Graphics]] +deps = ["Colors", "LinearAlgebra", "NaNMath"] +git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd" +uuid = "a2bd30eb-e257-5431-a919-1863eab51364" +version = "1.1.2" + [[deps.Graphite2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" @@ -1336,12 +1324,6 @@ git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" version = "1.11.0+0" -[[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" -uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.6.0+0" - [[deps.Libgpg_error_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "c6ce1e19f3aec9b59186bdf06cdf3c4fc5f5f3e6" @@ -1490,16 +1472,16 @@ uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" version = "0.5.13" [[deps.Makie]] -deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "InteractiveUtils", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] -git-tree-sha1 = "204f06860af9008fa08b3a4842f48116e1209a2c" +deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageBase", "ImageIO", "InteractiveUtils", "Interpolations", "IntervalSets", "InverseFunctions", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "MakieCore", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"] +git-tree-sha1 = "f7907907eb914138cc9e9ee66ab46f7a9efac8e8" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" -version = "0.21.9" +version = "0.21.15" [[deps.MakieCore]] deps = ["ColorTypes", "GeometryBasics", "IntervalSets", "Observables"] -git-tree-sha1 = "b0e2e3473af351011e598f9219afb521121edd2b" +git-tree-sha1 = "4604f03e5b057e8e62a95a44929cafc9585b0fe9" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.8.6" +version = "0.8.9" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -1555,12 +1537,6 @@ deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" version = "2.28.6+0" -[[deps.MeshIO]] -deps = ["ColorTypes", "FileIO", "GeometryBasics", "Printf"] -git-tree-sha1 = "dc182956229ff16d5a4d90a562035e633bd2561d" -uuid = "7269a6da-0436-5bbc-96c2-40638cbb6118" -version = "0.4.12" - [[deps.MetaGraphsNext]] deps = ["Graphs", "JLD2", "SimpleTraits"] git-tree-sha1 = "d2ecf4a20f4ac694987dd08ac489b7f7ff805f35" @@ -1583,12 +1559,6 @@ git-tree-sha1 = "2c140d60d7cb82badf06d8783800d0bcd1a7daa2" uuid = "78c3b35d-d492-501b-9361-3d52fe80e533" version = "0.8.1" -[[deps.ModernGL]] -deps = ["Libdl"] -git-tree-sha1 = "b76ea40b5c0f45790ae09492712dd326208c28b2" -uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301" -version = "1.1.7" - [[deps.MosaicViews]] deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" @@ -2621,18 +2591,6 @@ git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" version = "0.2.0" -[[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" -uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+1" - -[[deps.Wayland_protocols_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" -uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.31.0+0" - [[deps.WeakRefStrings]] deps = ["DataAPI", "InlineStrings", "Parsers"] git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" @@ -2669,12 +2627,6 @@ git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" version = "1.0.11+0" -[[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" -uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.0+4" - [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" @@ -2687,30 +2639,6 @@ git-tree-sha1 = "d2d1a5c49fae4ba39983f63de6afcbea47194e85" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" version = "1.3.6+0" -[[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" -uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "5.0.3+4" - -[[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" -uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.7.10+4" - -[[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] -git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" -uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.4+4" - -[[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" -uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.2+4" - [[deps.Xorg_libXrender_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] git-tree-sha1 = "47e45cd78224c53109495b3e324df0c37bb61fbe" @@ -2729,24 +2657,6 @@ git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" version = "1.17.0+0" -[[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" -uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.2+0" - -[[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" -uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.6+0" - -[[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" -uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.39.0+0" - [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" @@ -2799,12 +2709,6 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" version = "5.11.0+0" -[[deps.libdecor_jll]] -deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] -git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" -uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -version = "0.2.2+0" - [[deps.libfdk_aac_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "8a22cf860a7d27e4f3498a0fe0811a7957badb38" @@ -2862,9 +2766,3 @@ deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "dcc541bb19ed5b0ede95581fb2e41ecf179527d2" uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" version = "3.6.0+0" - -[[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" -uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+1" diff --git a/Project.toml b/Project.toml index 48e5db1ac..1c5d51394 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" BasicModelInterface = "59605e27-edc0-445a-b93d-c09a3a50b330" +CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" @@ -21,7 +22,6 @@ DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" FindFirstFunctions = "64ca27bc-2ba2-4a57-88aa-44e436879224" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" -GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" diff --git a/docs/.gitignore b/docs/.gitignore index f9379ecd7..31d2ae370 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -5,4 +5,5 @@ /tutorial/crystal-basin/ guide/data/ *.html +*.quarto_ipynb objects.json diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 452f1dd3c..cdcf0bf1c 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -43,11 +43,11 @@ end # per vertex: (module, name, file) function getdata(vertices) - data = Vector{NTuple{3, Symbol}}(undef, length(vertices)) + data = Vector{Tuple{Symbol, Symbol, Symbol, Int}}(undef, length(vertices)) for (k, v) in vertices k1 = first(k) file = Symbol(last(split(String(k1.file), "\\"))) - data[v] = (Symbol(k1.module), k1.name, file) + data[v] = (Symbol(k1.module), k1.name, file, k1.line) end data end @@ -57,14 +57,15 @@ end mod::Symbol name::Symbol file::Symbol + line::Int loc::Vector{Float64} = fill(NaN, 2) depth::Base.RefValue{Int} = Ref(0) isleaf::Base.RefValue{Bool} = Ref(false) end function Base.show(io::IO, nm::NodeMetadata) - (; mod, name) = nm - print(io, "$mod.$name") + (; mod, name, line) = nm + print(io, "$mod.$name (L$line)") end function construct_graph(callchains) @@ -78,8 +79,8 @@ function construct_graph(callchains) ) for (i, dat) in enumerate(data) - mod, name, file = dat - graph[i] = NodeMetadata(; i, mod, name, file) + mod, name, file, line = dat + graph[i] = NodeMetadata(; i, mod, name, file, line) end for chain in callchains @@ -106,7 +107,7 @@ end ############################################# -using GLMakie +using CairoMakie using Colors function cut_generated_calls!(graph) @@ -144,13 +145,17 @@ function get_node_depths(graph) return nodes_per_depth end -function squash!(graph, nodes_per_depth, max_depth) +function squash!(graph, nodes_per_depth, max_depth, squash_methods) for depth in 1:max_depth names = Dict{String, Vector{Int}}() nodes_at_depth = nodes_per_depth[depth] for i in nodes_at_depth nm = graph[i] - name = "$nm" + name = if nm.name in squash_methods + "$(nm.mod).$(nm.name)" + else + "$nm" + end if name in keys(names) push!(names[name], i) else @@ -228,7 +233,7 @@ function plot_labels!(ax, graph, max_depth, color_dict) color = get(color_dict, nm.file, :black), font = :bold, strokecolor = :black, - strokewidth = 1, + strokewidth = 0.5, label = String(nm.file), align = (:center, :bottom) ) @@ -238,12 +243,14 @@ end function plot_graph( graph_orig::MetaGraph; + size = (1000,1000), max_depth::Int = 5, plot_non_Ribasim::Bool = false, squash_per_depth::Bool = true, + squash_methods::Vector{Symbol} = Symbol[], ) - - f = Figure() + delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size + f = Figure(; size = size) ax = Axis(f[1, 1]) graph = copy(graph_orig) @@ -254,7 +261,7 @@ function plot_graph( nodes_per_depth = get_node_depths(graph) # Squash per depth nodes with the same name into one - squash_per_depth && squash!(graph, nodes_per_depth, max_depth) + squash_per_depth && squash!(graph, nodes_per_depth, max_depth, squash_methods) set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) plot_edges!(ax, graph, max_depth) @@ -292,7 +299,16 @@ db = SQLite.DB(db_path) graph, verts = tracecall((Ribasim,), Ribasim.Parameters, (db, config)) close(db) -plot_graph(graph) +plot_graph( + graph; + size = (1500, 1200), + squash_methods = [ + :n_neighbor_bounds_flow, + :n_neighbor_bounds_control, + :sort_by_function, + :neighbortypes + ] +) ``` ## Water balance diff --git a/docs/dev/callstacks.quarto_ipynb b/docs/dev/callstacks.quarto_ipynb deleted file mode 100644 index 6d1c85b34..000000000 --- a/docs/dev/callstacks.quarto_ipynb +++ /dev/null @@ -1,151 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Call stacks\n" - ], - "id": "15ad546e" - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "# | code-fold: true\n", - "# adapted from https://gist.github.com/mkborregaard/81825c3d370bb4d8dbfe59c3b2ae4b33\n", - "# by mkborregaard\n", - "\n", - "using JuliaInterpreter, OrderedCollections\n", - "using Graphs, MetaGraphsNext\n", - "\n", - "const callchains = OrderedSet{Vector{Method}}()\n", - "const modules = Set{Module}()\n", - "\n", - "function callchain(frame::JuliaInterpreter.Frame)\n", - " chain = Method[]\n", - " sc = JuliaInterpreter.scopeof(frame)\n", - " while sc isa Method\n", - " push!(chain, sc)\n", - " frame = frame.caller\n", - " frame === nothing && break\n", - " sc = JuliaInterpreter.scopeof(frame)\n", - " end\n", - " return chain\n", - "end\n", - "\n", - "function log_far!(@nospecialize(recurse), frame, istoplevel::Bool=false)\n", - " chain = callchain(frame)\n", - " chain[1].module ∈ modules && push!(callchains, chain)\n", - " return JuliaInterpreter.finish_and_return!(recurse, frame, istoplevel)\n", - "end\n", - "\n", - "function encode_vertices(callchains)\n", - " i = 0\n", - " vertices = Dict{Array{Method},Int}()\n", - " for chain in callchains\n", - " for ind in length(chain):-1:1\n", - " vert = chain[ind:end]\n", - " haskey(vertices, vert) || (vertices[vert] = (i += 1))\n", - " end\n", - " end\n", - " vertices\n", - "end\n", - "\n", - "function getnames(vertices)\n", - " names = Vector{String}(undef, length(vertices))\n", - " for (k, v) in vertices\n", - " names[v] = \"$(k[1].module).$(k[1].name)\"\n", - " end\n", - " names\n", - "end\n", - "\n", - "function construct_graph(callchains)\n", - " vertices = encode_vertices(callchains)\n", - " names = getnames(vertices)\n", - "\n", - " graph = MetaGraph(\n", - " DiGraph(); \n", - " label_type = Int,\n", - " vertex_data_type = String\n", - " )\n", - "\n", - " for (i, name) in enumerate(names)\n", - " graph[i] = name\n", - " end\n", - "\n", - " for chain in callchains\n", - " for ind in length(chain)-1:-1:1\n", - " src = vertices[chain[ind+1:end]]\n", - " dst = vertices[chain[ind:end]]\n", - " graph[src, dst] = nothing\n", - " end\n", - " end\n", - "\n", - " graph\n", - "end\n", - "\n", - "function tracecall(mods::Tuple, call, arg)\n", - " empty!(callchains)\n", - " empty!(modules)\n", - " for m in mods\n", - " push!(modules, m)\n", - " end\n", - " frame = JuliaInterpreter.enter_call(call, arg)\n", - " log_far!(log_far!, frame, false)\n", - " construct_graph(callchains)\n", - "end\n", - "\n", - "#############################################\n", - "\n", - "using Ribasim" - ], - "id": "3b0556e6", - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Model initialization\n" - ], - "id": "4dedb203" - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "toml_path = normpath(@__DIR__, \"../../generated_testmodels/trivial/ribasim.toml\")\n", - "graph = tracecall((Ribasim,), toml_path)" - ], - "id": "a216be8f", - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": {}, - "source": [ - "using GLMakie\n", - "\n", - "f = Figure()\n", - "\n", - "f" - ], - "id": "f3ddc75c", - "execution_count": null, - "outputs": [] - } - ], - "metadata": { - "kernelspec": { - "name": "julia-1.11", - "language": "julia", - "display_name": "Julia 1.11.1", - "path": "C:\\Users\\konin_bt\\AppData\\Roaming\\jupyter\\kernels\\julia-1.11" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From 3f4a9ecf45cbc951b9adc8d0bed4970e497f6f7a Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Thu, 31 Oct 2024 16:48:40 +0100 Subject: [PATCH 06/12] Vary line properties and add allocation examples --- Manifest.toml | 2 +- Project.toml | 1 + docs/dev/callstacks.qmd | 76 ++++++++++++++++++++++++++++------------- 3 files changed, 54 insertions(+), 25 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 4ce131ea4..5124ce6a6 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "921c2f0c042509feb4a1950ec24084c1ad561dd0" +project_hash = "ecb70ca5008f6b49d97f55488305bbc1ef31ed96" [[deps.ADTypes]] git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081" diff --git a/Project.toml b/Project.toml index 1c5d51394..ec73afc80 100644 --- a/Project.toml +++ b/Project.toml @@ -9,6 +9,7 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" BasicModelInterface = "59605e27-edc0-445a-b93d-c09a3a50b330" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" +ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d" diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index cdcf0bf1c..d7210984a 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -192,7 +192,7 @@ function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) else count(i -> graph[i].mod == :Ribasim, nodes) end - ys = n_nodes == 1 ? [0] : range(-1, 1, length = n_nodes) + ys = n_nodes == 1 ? [0.5] : range(0, 1, length = n_nodes) idx = 1 for i in nodes @@ -205,21 +205,28 @@ function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) end end -function plot_edges!(ax, graph, max_depth, n_points = 25) - for edge in edges(graph) - nm_src = graph[label_for(graph, edge.src)] - nm_dst = graph[label_for(graph, edge.dst)] +function plot_edges!(ax, graph, max_depth, nodes_per_depth; n_points = 25) + for depth in 0:(max_depth - 1) + nodes_at_depth = nodes_per_depth[depth] + n_nodes = length(nodes_at_depth) + for (idx, i) in enumerate(nodes_at_depth) + nm_src = graph[i] + for i_out in outneighbor_labels(graph, i) + nm_dst = graph[i_out] - (nm_dst.depth[] > max_depth) && continue + A = (nm_src.loc[2] - nm_dst.loc[2]) / 2 + B = π / (nm_dst.loc[1] - nm_src.loc[1]) + C = (nm_src.loc[2] + nm_dst.loc[2]) / 2 - A = (nm_src.loc[2] - nm_dst.loc[2]) / 2 - B = π / (nm_dst.loc[1] - nm_src.loc[1]) - C = (nm_src.loc[2] + nm_dst.loc[2]) / 2 + x = range(nm_src.loc[1], nm_dst.loc[1], length = n_points) + y = @. A * cos(B * (x - nm_src.loc[1])) + C - x = range(nm_src.loc[1], nm_dst.loc[1], length = n_points) - y = @. A * cos(B * (x - nm_src.loc[1])) + C - lines!(ax, x, y; color = :black) + color = RGB((0.8 * rand(3))...) + linestyle = (nm_src.file == nm_dst.file) ? :solid : :dash + lines!(ax, x, y; color, linestyle) + end + end end end @@ -250,7 +257,7 @@ function plot_graph( squash_methods::Vector{Symbol} = Symbol[], ) delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size - f = Figure(; size = size) + f = Figure(; size = size, xlabel = "depth") ax = Axis(f[1, 1]) graph = copy(graph_orig) @@ -259,12 +266,13 @@ function plot_graph( cut_generated_calls!(graph) nodes_per_depth = get_node_depths(graph) + max_depth = min(max_depth, maximum(keys(nodes_per_depth))) # Squash per depth nodes with the same name into one squash_per_depth && squash!(graph, nodes_per_depth, max_depth, squash_methods) set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) - plot_edges!(ax, graph, max_depth) + plot_edges!(ax, graph, max_depth, nodes_per_depth) files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim)) colors = distinguishable_colors(length(files)+1)[end:-1:2] @@ -272,10 +280,20 @@ function plot_graph( plot_labels!(ax, graph, max_depth, color_dict) + # Build legend + elements = LegendElement[MarkerElement(color = c, marker = :rect) for c in values(color_dict)] + descriptions = String.(files) + + push!(elements, LineElement(color = :black, linestyle = :dash)) + push!(descriptions, "between scripts") + + push!(elements, LineElement(color = :black, linestyle = :solid)) + push!(descriptions, "within a script") + Legend( f[1,2], - [MarkerElement(color = c, marker = :rect) for c in values(color_dict)], - String.(files) + elements, + descriptions ) f @@ -284,6 +302,9 @@ end ############################################# using Ribasim +using Random + +Random.seed!(1) ``` ## Parameter initialization @@ -301,7 +322,7 @@ close(db) plot_graph( graph; - size = (1500, 1200), + size = (1800, 1200), squash_methods = [ :n_neighbor_bounds_flow, :n_neighbor_bounds_control, @@ -320,14 +341,21 @@ model = Ribasim.Model(toml_path) du = get_du(model.integrator) (; u, p, t) = model.integrator graph, verts = tracecall((Ribasim,), Ribasim.water_balance!, (du, u, p, t)) -plot_graph(graph) +plot_graph(graph, size = (1600, 1000)) ``` +## Allocation initialization ```{julia} -# TODO: -# - Fix y coordinate of nodes that have no outneighbors -# - Remove nodes (and everything downstream) from non-Ribasim calls -# - Color boxes by file name and add legend -# - Add boxes around names -# - Let connection lines emerge from box boundaries +# | code-fold: true +toml_path = normpath(@__DIR__, "../../generated_testmodels/main_network_with_subnetworks/ribasim.toml") +model = Ribasim.Model(toml_path) +# graph, verts = tracecall((Ribasim,), Ribasim.initialize_allocation!, (model.integrator.p, model.config)) +# plot_graph(graph) +``` + +## Allocation run +```{julia} +# | code-fold: true +graph, verts = tracecall((Ribasim,), Ribasim.update_allocation!, (model.integrator,)) +plot_graph(graph, size = (1600, 1000)) ``` From 68a99b2c0f611516a31eda11dc3877908cc0704a Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Thu, 31 Oct 2024 20:00:47 +0100 Subject: [PATCH 07/12] Finalize --- Manifest.toml | 2 +- Project.toml | 1 - core/src/write.jl | 1 - docs/dev/callstacks.qmd | 33 +++++++++++++++++++++++++-------- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 5124ce6a6..4ce131ea4 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.11.1" manifest_format = "2.0" -project_hash = "ecb70ca5008f6b49d97f55488305bbc1ef31ed96" +project_hash = "921c2f0c042509feb4a1950ec24084c1ad561dd0" [[deps.ADTypes]] git-tree-sha1 = "eea5d80188827b35333801ef97a40c2ed653b081" diff --git a/Project.toml b/Project.toml index ec73afc80..1c5d51394 100644 --- a/Project.toml +++ b/Project.toml @@ -9,7 +9,6 @@ Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" BasicModelInterface = "59605e27-edc0-445a-b93d-c09a3a50b330" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" -ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d" diff --git a/core/src/write.jl b/core/src/write.jl index a8ddb5660..39a706d97 100644 --- a/core/src/write.jl +++ b/core/src/write.jl @@ -136,7 +136,6 @@ function basin_table( data = get_storages_and_levels(model) storage = vec(data.storage[:, begin:(end - 1)]) level = vec(data.level[:, begin:(end - 1)]) - Δstorage = vec(diff(data.storage; dims = 2)) nbasin = length(data.node_id) ntsteps = length(data.time) - 1 diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index d7210984a..1cdd58aae 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -257,8 +257,8 @@ function plot_graph( squash_methods::Vector{Symbol} = Symbol[], ) delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size - f = Figure(; size = size, xlabel = "depth") - ax = Axis(f[1, 1]) + f = Figure(; size = size) + ax = Axis(f[1, 1]; xlabel = "depth") graph = copy(graph_orig) @@ -304,9 +304,13 @@ end using Ribasim using Random -Random.seed!(1) +Random.seed!(1); ``` +The plots below show the call stack within the Julia core for several important entrypoints. The function names are colored by the script in which they are defined, and the lines between the function names have random colors to be able to differentiate between them. Solid lines refer to calls to functions defined in the same script, dashed ones to functions defined in a different script. + +Note that these graphs are obtained by dynamic analysis, i.e. by running parts of the code with specific inputs. This means that there can be unshown paths through the code that are not reached for these particular inputs. + ## Parameter initialization ```{julia} @@ -332,7 +336,7 @@ plot_graph( ) ``` -## Water balance +## `water_balance!` (The ODE system right hand side function) ```{julia} # | code-fold: true @@ -348,14 +352,27 @@ plot_graph(graph, size = (1600, 1000)) ```{julia} # | code-fold: true toml_path = normpath(@__DIR__, "../../generated_testmodels/main_network_with_subnetworks/ribasim.toml") -model = Ribasim.Model(toml_path) -# graph, verts = tracecall((Ribasim,), Ribasim.initialize_allocation!, (model.integrator.p, model.config)) -# plot_graph(graph) +config = Ribasim.Config(toml_path; allocation_use_allocation=false) +db_path = Ribasim.database_path(config) +db = SQLite.DB(db_path) +p = Ribasim.Parameters(db, config) +graph, verts = tracecall((Ribasim,), Ribasim.initialize_allocation!, (p, config)) +plot_graph(graph, size = (1700, 1000)) ``` ## Allocation run ```{julia} # | code-fold: true +model = Ribasim.Model(toml_path) graph, verts = tracecall((Ribasim,), Ribasim.update_allocation!, (model.integrator,)) -plot_graph(graph, size = (1600, 1000)) +plot_graph(graph, size = (1800, 1000)) +``` + +## Writing output +```{julia} +# | code-fold: true +toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") +model = Ribasim.Model(toml_path) +graph, verts = tracecall((Ribasim,), Ribasim.write_results, (model,)) +plot_graph(graph, size = (1500, 1000)) ``` From ebbbd380925b0020f8c92eadaf21a07d6b40ec16 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Fri, 1 Nov 2024 09:22:05 +0100 Subject: [PATCH 08/12] Add DiscreteControl and more formatting options --- core/src/model.jl | 2 +- docs/dev/callstacks.qmd | 61 ++++++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/core/src/model.jl b/core/src/model.jl index 92d7ac3a2..ccc9734bb 100644 --- a/core/src/model.jl +++ b/core/src/model.jl @@ -54,7 +54,7 @@ function Model(config::Config)::Model error("Invalid edge types found.") end - local parameters, state, n, tstops + local parameters, tstops try parameters = Parameters(db, config) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 1cdd58aae..7480d38d9 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -145,6 +145,15 @@ function get_node_depths(graph) return nodes_per_depth end +function prune_branch!(graph, start::Int; branch_base::Bool = true, to_delete::Vector{Int} = Int[]) + branch_base && empty!(to_delete) + for i in outneighbor_labels(graph, start) + prune_branch!(graph, i; branch_base = false, to_delete) + push!(to_delete, i) + end + branch_base && delete!.(Ref(graph), to_delete) +end + function squash!(graph, nodes_per_depth, max_depth, squash_methods) for depth in 1:max_depth names = Dict{String, Vector{Int}}() @@ -240,7 +249,7 @@ function plot_labels!(ax, graph, max_depth, color_dict) color = get(color_dict, nm.file, :black), font = :bold, strokecolor = :black, - strokewidth = 0.5, + strokewidth = 1.0, label = String(nm.file), align = (:center, :bottom) ) @@ -250,18 +259,26 @@ end function plot_graph( graph_orig::MetaGraph; - size = (1000,1000), + size = (1000, 1000), max_depth::Int = 5, plot_non_Ribasim::Bool = false, squash_per_depth::Bool = true, squash_methods::Vector{Symbol} = Symbol[], + prune_from::Vector{Symbol} = Symbol[], + xlims = nothing, ) - delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size - f = Figure(; size = size) - ax = Axis(f[1, 1]; xlabel = "depth") - graph = copy(graph_orig) + # Prune branches + for i in collect(labels(graph)) + if haskey(graph, i) + nm = graph[i] + if nm.name in prune_from + prune_branch!(graph, i) + end + end + end + # Cut out calls whose name starts with '#' cut_generated_calls!(graph) @@ -272,13 +289,18 @@ function plot_graph( squash_per_depth && squash!(graph, nodes_per_depth, max_depth, squash_methods) set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) - plot_edges!(ax, graph, max_depth, nodes_per_depth) files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim)) colors = distinguishable_colors(length(files)+1)[end:-1:2] color_dict = OrderedDict(zip(files, colors)) + delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size + f = Figure(; size = size) + ax = Axis(f[1, 1]; xlabel = "depth", xticks = 0:max_depth) + plot_edges!(ax, graph, max_depth, nodes_per_depth) plot_labels!(ax, graph, max_depth, color_dict) + hideydecorations!(ax) + !isnothing(xlims) && xlims!(ax, xlims...) # Build legend elements = LegendElement[MarkerElement(color = c, marker = :rect) for c in values(color_dict)] @@ -326,13 +348,14 @@ close(db) plot_graph( graph; - size = (1800, 1200), + size = (2000, 1200), squash_methods = [ :n_neighbor_bounds_flow, :n_neighbor_bounds_control, :sort_by_function, :neighbortypes - ] + ], + xlims = (-0.4, 5.6) ) ``` @@ -345,7 +368,7 @@ model = Ribasim.Model(toml_path) du = get_du(model.integrator) (; u, p, t) = model.integrator graph, verts = tracecall((Ribasim,), Ribasim.water_balance!, (du, u, p, t)) -plot_graph(graph, size = (1600, 1000)) +plot_graph(graph, size = (1700, 1000), xlims = (-0.4, 4.5)) ``` ## Allocation initialization @@ -357,7 +380,7 @@ db_path = Ribasim.database_path(config) db = SQLite.DB(db_path) p = Ribasim.Parameters(db, config) graph, verts = tracecall((Ribasim,), Ribasim.initialize_allocation!, (p, config)) -plot_graph(graph, size = (1700, 1000)) +plot_graph(graph, size = (1800, 1000), xlims = (-0.5, 5.5)) ``` ## Allocation run @@ -365,7 +388,19 @@ plot_graph(graph, size = (1700, 1000)) # | code-fold: true model = Ribasim.Model(toml_path) graph, verts = tracecall((Ribasim,), Ribasim.update_allocation!, (model.integrator,)) -plot_graph(graph, size = (1800, 1000)) +plot_graph(graph, size = (2000, 1000), xlims = (-0.4, 5.5)) +``` + +## Discrete control + +```{julia} +# | code-fold: true +toml_path = normpath(@__DIR__, "../../generated_testmodels/pump_discrete_control/ribasim.toml") +model = Ribasim.Model(toml_path) +(; u, t) = model.integrator +model.integrator.p.basin.storage0 .= [0.1, 100.0] +graph, verts = tracecall((Ribasim,), Ribasim.apply_discrete_control!, (u, t, model.integrator)) +plot_graph(graph; size = (1300, 500), prune_from = [:water_balance!], xlims = (-0.5, 3.5)) ``` ## Writing output @@ -374,5 +409,5 @@ plot_graph(graph, size = (1800, 1000)) toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") model = Ribasim.Model(toml_path) graph, verts = tracecall((Ribasim,), Ribasim.write_results, (model,)) -plot_graph(graph, size = (1500, 1000)) +plot_graph(graph, size = (1600, 1000), xlims = (-0.5, 4.5)) ``` From df89d5a456c696c0c82fd5af2e4e0a38f79de266 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 4 Nov 2024 12:57:18 +0100 Subject: [PATCH 09/12] Move Julia code to separate scripts --- docs/concept/equations.qmd | 2 +- docs/dev/callstacks.qmd | 320 +-------------------------------- docs/dev/scripts/plot_trace.jl | 215 ++++++++++++++++++++++ docs/dev/scripts/trace_call.jl | 95 ++++++++++ 4 files changed, 315 insertions(+), 317 deletions(-) create mode 100644 docs/dev/scripts/plot_trace.jl create mode 100644 docs/dev/scripts/trace_call.jl diff --git a/docs/concept/equations.qmd b/docs/concept/equations.qmd index d8c4497ba..3f08ba269 100644 --- a/docs/concept/equations.qmd +++ b/docs/concept/equations.qmd @@ -105,7 +105,7 @@ Hence the reference used for computing the relative error is the average of the The default tolerances are $0.001 \text{ m}^3$ for the balance error and $0.01$ for the relative error, which should not be exceeded for realistic models. -In extreme cases where the storage rate is many orders of magnitude smaller than the storage itself, these computations can have floating point truncation errors which can lead to large relative errors. This is however only when the storage is roughly $ \ge 10^{15}$ times bigger than the storage rate. +In extreme cases where the storage rate is many orders of magnitude smaller than the storage itself, these computations can have floating point truncation errors which can lead to large relative errors. This is however only when the storage is roughly $\geq 10^{15}$ times bigger than the storage rate. ### Example calculation diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 7480d38d9..7f561d1a5 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -2,326 +2,14 @@ ```{julia} # | code-fold: true -# adapted from https://gist.github.com/mkborregaard/81825c3d370bb4d8dbfe59c3b2ae4b33 -# by mkborregaard - -using JuliaInterpreter, OrderedCollections -using Graphs, MetaGraphsNext - -const callchains = OrderedSet{Vector{Method}}() -const modules = Set{Module}() - -function callchain(frame::JuliaInterpreter.Frame) - chain = Method[] - sc = JuliaInterpreter.scopeof(frame) - while sc isa Method - push!(chain, sc) - frame = frame.caller - frame === nothing && break - sc = JuliaInterpreter.scopeof(frame) - end - return chain -end - -function log_far!(@nospecialize(recurse), frame, istoplevel::Bool=false) - chain = callchain(frame) - chain[1].module ∈ modules && push!(callchains, chain) - return JuliaInterpreter.finish_and_return!(recurse, frame, istoplevel) -end - -function encode_vertices(callchains) - i = 0 - vertices = Dict{Array{Method},Int}() - for chain in callchains - for ind in length(chain):-1:1 - vert = chain[ind:end] - haskey(vertices, vert) || (vertices[vert] = (i += 1)) - end - end - vertices -end - -# per vertex: (module, name, file) -function getdata(vertices) - data = Vector{Tuple{Symbol, Symbol, Symbol, Int}}(undef, length(vertices)) - for (k, v) in vertices - k1 = first(k) - file = Symbol(last(split(String(k1.file), "\\"))) - data[v] = (Symbol(k1.module), k1.name, file, k1.line) - end - data -end - -@kwdef struct NodeMetadata - i::Int - mod::Symbol - name::Symbol - file::Symbol - line::Int - loc::Vector{Float64} = fill(NaN, 2) - depth::Base.RefValue{Int} = Ref(0) - isleaf::Base.RefValue{Bool} = Ref(false) -end - -function Base.show(io::IO, nm::NodeMetadata) - (; mod, name, line) = nm - print(io, "$mod.$name (L$line)") -end - -function construct_graph(callchains) - vertices = encode_vertices(callchains) - data = getdata(vertices) - - graph = MetaGraph( - DiGraph(); - label_type = Int, - vertex_data_type = NodeMetadata - ) - - for (i, dat) in enumerate(data) - mod, name, file, line = dat - graph[i] = NodeMetadata(; i, mod, name, file, line) - end - - for chain in callchains - for ind in length(chain)-1:-1:1 - src = vertices[chain[ind+1:end]] - dst = vertices[chain[ind:end]] - graph[src, dst] = nothing - end - end - - graph, vertices -end - -function tracecall(mods::Tuple, call, args) - empty!(callchains) - empty!(modules) - for m in mods - push!(modules, m) - end - frame = JuliaInterpreter.enter_call(call, args...) - log_far!(log_far!, frame, false) - construct_graph(callchains) -end - -############################################# using CairoMakie using Colors +using Graphs, MetaGraphsNext +using JuliaInterpreter, OrderedCollections -function cut_generated_calls!(graph) - for i in collect(labels(graph)) - nm = graph[i] - (; name) = nm - if startswith(String(name), "#") - for i_in in inneighbor_labels(graph, i) - for i_out in outneighbor_labels(graph, i) - graph[i_in, i_out] = nothing - end - end - delete!(graph, i) - end - end -end - -function get_node_depths(graph) - depths = dijkstra_shortest_paths(graph, 1).dists - nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) - - for (i, depth) in zip(labels(graph), depths) - nm = graph[i] - nm.depth[] = depth - nm.loc[1] = depth - - push!(nodes_per_depth[Int(depth)], i) - end - - # Sort nodes by file for each depth - for nodes in values(nodes_per_depth) - sort!(nodes, by = i -> graph[i].file, rev = true) - end - - return nodes_per_depth -end - -function prune_branch!(graph, start::Int; branch_base::Bool = true, to_delete::Vector{Int} = Int[]) - branch_base && empty!(to_delete) - for i in outneighbor_labels(graph, start) - prune_branch!(graph, i; branch_base = false, to_delete) - push!(to_delete, i) - end - branch_base && delete!.(Ref(graph), to_delete) -end - -function squash!(graph, nodes_per_depth, max_depth, squash_methods) - for depth in 1:max_depth - names = Dict{String, Vector{Int}}() - nodes_at_depth = nodes_per_depth[depth] - for i in nodes_at_depth - nm = graph[i] - name = if nm.name in squash_methods - "$(nm.mod).$(nm.name)" - else - "$nm" - end - if name in keys(names) - push!(names[name], i) - else - names[name] = [i] - end - end - for nodes in values(names) - (length(nodes) == 1) && continue - survivor = first(nodes) - - for i in nodes[2:end] - for i_in in inneighbor_labels(graph, i) - graph[i_in, survivor] = nothing - delete!(graph, i_in, i) - end - - for i_out in outneighbor_labels(graph, i) - graph[survivor, i_out] = nothing - delete!(graph, i, i_out) - end - - delete!(graph, i) - deleteat!(nodes_at_depth, findfirst(==(i), nodes_at_depth)) - end - end - end -end - -function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) - for depth in 0:max_depth - nodes = nodes_per_depth[depth] - n_nodes = if plot_non_Ribasim - length(nodes) - else - count(i -> graph[i].mod == :Ribasim, nodes) - end - ys = n_nodes == 1 ? [0.5] : range(0, 1, length = n_nodes) - idx = 1 - - for i in nodes - nm = graph[i] - if (nm.mod == :Ribasim || plot_non_Ribasim) - graph[i].loc .= (depth, ys[idx]) - idx += 1 - end - end - end -end - -function plot_edges!(ax, graph, max_depth, nodes_per_depth; n_points = 25) - for depth in 0:(max_depth - 1) - nodes_at_depth = nodes_per_depth[depth] - n_nodes = length(nodes_at_depth) - for (idx, i) in enumerate(nodes_at_depth) - nm_src = graph[i] - for i_out in outneighbor_labels(graph, i) - nm_dst = graph[i_out] - - A = (nm_src.loc[2] - nm_dst.loc[2]) / 2 - B = π / (nm_dst.loc[1] - nm_src.loc[1]) - C = (nm_src.loc[2] + nm_dst.loc[2]) / 2 - - x = range(nm_src.loc[1], nm_dst.loc[1], length = n_points) - y = @. A * cos(B * (x - nm_src.loc[1])) + C - - - color = RGB((0.8 * rand(3))...) - linestyle = (nm_src.file == nm_dst.file) ? :solid : :dash - lines!(ax, x, y; color, linestyle) - end - end - end -end - -function plot_labels!(ax, graph, max_depth, color_dict) - for node in labels(graph) - nm = graph[node] - x, y = nm.loc - (nm.depth[] > max_depth) && continue - text!(ax, x, y, - text = "$nm", - color = get(color_dict, nm.file, :black), - font = :bold, - strokecolor = :black, - strokewidth = 1.0, - label = String(nm.file), - align = (:center, :bottom) - ) - scatter!(ax, [x], [y], color = :black) - end -end - -function plot_graph( - graph_orig::MetaGraph; - size = (1000, 1000), - max_depth::Int = 5, - plot_non_Ribasim::Bool = false, - squash_per_depth::Bool = true, - squash_methods::Vector{Symbol} = Symbol[], - prune_from::Vector{Symbol} = Symbol[], - xlims = nothing, -) - graph = copy(graph_orig) - - # Prune branches - for i in collect(labels(graph)) - if haskey(graph, i) - nm = graph[i] - if nm.name in prune_from - prune_branch!(graph, i) - end - end - end - - # Cut out calls whose name starts with '#' - cut_generated_calls!(graph) - - nodes_per_depth = get_node_depths(graph) - max_depth = min(max_depth, maximum(keys(nodes_per_depth))) - - # Squash per depth nodes with the same name into one - squash_per_depth && squash!(graph, nodes_per_depth, max_depth, squash_methods) - - set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) - - files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim)) - colors = distinguishable_colors(length(files)+1)[end:-1:2] - color_dict = OrderedDict(zip(files, colors)) - - delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size - f = Figure(; size = size) - ax = Axis(f[1, 1]; xlabel = "depth", xticks = 0:max_depth) - plot_edges!(ax, graph, max_depth, nodes_per_depth) - plot_labels!(ax, graph, max_depth, color_dict) - hideydecorations!(ax) - !isnothing(xlims) && xlims!(ax, xlims...) - - # Build legend - elements = LegendElement[MarkerElement(color = c, marker = :rect) for c in values(color_dict)] - descriptions = String.(files) - - push!(elements, LineElement(color = :black, linestyle = :dash)) - push!(descriptions, "between scripts") - - push!(elements, LineElement(color = :black, linestyle = :solid)) - push!(descriptions, "within a script") - - Legend( - f[1,2], - elements, - descriptions - ) - - f -end - -############################################# +include("scripts/trace_call.jl") +include("scripts/plot_trace.jl") using Ribasim using Random diff --git a/docs/dev/scripts/plot_trace.jl b/docs/dev/scripts/plot_trace.jl new file mode 100644 index 000000000..085a04a71 --- /dev/null +++ b/docs/dev/scripts/plot_trace.jl @@ -0,0 +1,215 @@ +function cut_generated_calls!(graph) + for i in collect(labels(graph)) + nm = graph[i] + (; name) = nm + if startswith(String(name), "#") + for i_in in inneighbor_labels(graph, i) + for i_out in outneighbor_labels(graph, i) + graph[i_in, i_out] = nothing + end + end + delete!(graph, i) + end + end +end + +function get_node_depths(graph) + depths = dijkstra_shortest_paths(graph, 1).dists + nodes_per_depth = Dict(Int(depth) => Int[] for depth in unique(depths)) + + for (i, depth) in zip(labels(graph), depths) + nm = graph[i] + nm.depth[] = depth + nm.loc[1] = depth + + push!(nodes_per_depth[Int(depth)], i) + end + + # Sort nodes by file for each depth + for nodes in values(nodes_per_depth) + sort!(nodes; by = i -> graph[i].file, rev = true) + end + + return nodes_per_depth +end + +function prune_branch!( + graph, + start::Int; + branch_base::Bool = true, + to_delete::Vector{Int} = Int[], +) + branch_base && empty!(to_delete) + for i in outneighbor_labels(graph, start) + prune_branch!(graph, i; branch_base = false, to_delete) + push!(to_delete, i) + end + branch_base && delete!.(Ref(graph), to_delete) +end + +function squash!(graph, nodes_per_depth, max_depth, squash_methods) + for depth in 1:max_depth + names = Dict{String, Vector{Int}}() + nodes_at_depth = nodes_per_depth[depth] + for i in nodes_at_depth + nm = graph[i] + name = if nm.name in squash_methods + "$(nm.mod).$(nm.name)" + else + "$nm" + end + if name in keys(names) + push!(names[name], i) + else + names[name] = [i] + end + end + for nodes in values(names) + (length(nodes) == 1) && continue + survivor = first(nodes) + + for i in nodes[2:end] + for i_in in inneighbor_labels(graph, i) + graph[i_in, survivor] = nothing + delete!(graph, i_in, i) + end + + for i_out in outneighbor_labels(graph, i) + graph[survivor, i_out] = nothing + delete!(graph, i, i_out) + end + + delete!(graph, i) + deleteat!(nodes_at_depth, findfirst(==(i), nodes_at_depth)) + end + end + end +end + +function set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) + for depth in 0:max_depth + nodes = nodes_per_depth[depth] + n_nodes = if plot_non_Ribasim + length(nodes) + else + count(i -> graph[i].mod == :Ribasim, nodes) + end + ys = n_nodes == 1 ? [0.5] : range(0, 1; length = n_nodes) + idx = 1 + + for i in nodes + nm = graph[i] + if (nm.mod == :Ribasim || plot_non_Ribasim) + graph[i].loc .= (depth, ys[idx]) + idx += 1 + end + end + end +end + +function plot_edges!(ax, graph, max_depth, nodes_per_depth; n_points = 25) + for depth in 0:(max_depth - 1) + nodes_at_depth = nodes_per_depth[depth] + n_nodes = length(nodes_at_depth) + for (idx, i) in enumerate(nodes_at_depth) + nm_src = graph[i] + for i_out in outneighbor_labels(graph, i) + nm_dst = graph[i_out] + + A = (nm_src.loc[2] - nm_dst.loc[2]) / 2 + B = π / (nm_dst.loc[1] - nm_src.loc[1]) + C = (nm_src.loc[2] + nm_dst.loc[2]) / 2 + + x = range(nm_src.loc[1], nm_dst.loc[1]; length = n_points) + y = @. A * cos(B * (x - nm_src.loc[1])) + C + + color = RGB((0.8 * rand(3))...) + linestyle = (nm_src.file == nm_dst.file) ? :solid : :dash + lines!(ax, x, y; color, linestyle) + end + end + end +end + +function plot_labels!(ax, graph, max_depth, color_dict) + for node in labels(graph) + nm = graph[node] + x, y = nm.loc + (nm.depth[] > max_depth) && continue + text!( + ax, + x, + y; + text = "$nm", + color = get(color_dict, nm.file, :black), + font = :bold, + strokecolor = :black, + strokewidth = 1.0, + label = String(nm.file), + align = (:center, :bottom), + ) + scatter!(ax, [x], [y]; color = :black) + end +end + +function plot_graph( + graph_orig::MetaGraph; + size = (1000, 1000), + max_depth::Int = 5, + plot_non_Ribasim::Bool = false, + squash_per_depth::Bool = true, + squash_methods::Vector{Symbol} = Symbol[], + prune_from::Vector{Symbol} = Symbol[], + xlims = nothing, +) + graph = copy(graph_orig) + + # Prune branches + for i in collect(labels(graph)) + if haskey(graph, i) + nm = graph[i] + if nm.name in prune_from + prune_branch!(graph, i) + end + end + end + + # Cut out calls whose name starts with '#' + cut_generated_calls!(graph) + + nodes_per_depth = get_node_depths(graph) + max_depth = min(max_depth, maximum(keys(nodes_per_depth))) + + # Squash per depth nodes with the same name into one + squash_per_depth && squash!(graph, nodes_per_depth, max_depth, squash_methods) + + set_coordinates!(graph, nodes_per_depth, max_depth, plot_non_Ribasim) + + files = sort(unique(graph[i].file for i in labels(graph) if graph[i].mod == :Ribasim)) + colors = distinguishable_colors(length(files) + 1)[end:-1:2] + color_dict = OrderedDict(zip(files, colors)) + + delete!(theme(nothing), :resolution) # Needed because of a refactor in Makie going from resolution to size + f = Figure(; size = size) + ax = Axis(f[1, 1]; xlabel = "depth", xticks = 0:max_depth) + plot_edges!(ax, graph, max_depth, nodes_per_depth) + plot_labels!(ax, graph, max_depth, color_dict) + hideydecorations!(ax) + !isnothing(xlims) && xlims!(ax, xlims...) + + # Build legend + elements = LegendElement[ + MarkerElement(; color = c, marker = :rect) for c in values(color_dict) + ] + descriptions = String.(files) + + push!(elements, LineElement(; color = :black, linestyle = :dash)) + push!(descriptions, "between scripts") + + push!(elements, LineElement(; color = :black, linestyle = :solid)) + push!(descriptions, "within a script") + + Legend(f[1, 2], elements, descriptions) + + f +end diff --git a/docs/dev/scripts/trace_call.jl b/docs/dev/scripts/trace_call.jl new file mode 100644 index 000000000..5aa0f1e29 --- /dev/null +++ b/docs/dev/scripts/trace_call.jl @@ -0,0 +1,95 @@ +# adapted from https://gist.github.com/mkborregaard/81825c3d370bb4d8dbfe59c3b2ae4b33 +# by mkborregaard + +const callchains = OrderedSet{Vector{Method}}() +const modules = Set{Module}() + +function callchain(frame::JuliaInterpreter.Frame) + chain = Method[] + sc = JuliaInterpreter.scopeof(frame) + while sc isa Method + push!(chain, sc) + frame = frame.caller + frame === nothing && break + sc = JuliaInterpreter.scopeof(frame) + end + return chain +end + +function log_far!(@nospecialize(recurse), frame, istoplevel::Bool = false) + chain = callchain(frame) + chain[1].module ∈ modules && push!(callchains, chain) + return JuliaInterpreter.finish_and_return!(recurse, frame, istoplevel) +end + +function encode_vertices(callchains) + i = 0 + vertices = Dict{Array{Method}, Int}() + for chain in callchains + for ind in length(chain):-1:1 + vert = chain[ind:end] + haskey(vertices, vert) || (vertices[vert] = (i += 1)) + end + end + vertices +end + +# per vertex: (module, name, file) +function getdata(vertices) + data = Vector{Tuple{Symbol, Symbol, Symbol, Int}}(undef, length(vertices)) + for (k, v) in vertices + k1 = first(k) + file = Symbol(last(split(String(k1.file), "\\"))) + data[v] = (Symbol(k1.module), k1.name, file, k1.line) + end + data +end + +@kwdef struct NodeMetadata + i::Int + mod::Symbol + name::Symbol + file::Symbol + line::Int + loc::Vector{Float64} = fill(NaN, 2) + depth::Base.RefValue{Int} = Ref(0) + isleaf::Base.RefValue{Bool} = Ref(false) +end + +function Base.show(io::IO, nm::NodeMetadata) + (; mod, name, line) = nm + print(io, "$mod.$name (L$line)") +end + +function construct_graph(callchains) + vertices = encode_vertices(callchains) + data = getdata(vertices) + + graph = MetaGraph(DiGraph(); label_type = Int, vertex_data_type = NodeMetadata) + + for (i, dat) in enumerate(data) + mod, name, file, line = dat + graph[i] = NodeMetadata(; i, mod, name, file, line) + end + + for chain in callchains + for ind in (length(chain) - 1):-1:1 + src = vertices[chain[(ind + 1):end]] + dst = vertices[chain[ind:end]] + graph[src, dst] = nothing + end + end + + graph, vertices +end + +function tracecall(mods::Tuple, call, args) + empty!(callchains) + empty!(modules) + for m in mods + push!(modules, m) + end + frame = JuliaInterpreter.enter_call(call, args...) + log_far!(log_far!, frame, false) + construct_graph(callchains) +end From 40733fe749265cc1dc22d18eab3360a18cf13b4f Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 4 Nov 2024 13:37:06 +0100 Subject: [PATCH 10/12] Add descriptions to plots --- docs/dev/callstacks.qmd | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 7f561d1a5..fef2812cb 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -17,12 +17,14 @@ using Random Random.seed!(1); ``` -The plots below show the call stack within the Julia core for several important entrypoints. The function names are colored by the script in which they are defined, and the lines between the function names have random colors to be able to differentiate between them. Solid lines refer to calls to functions defined in the same script, dashed ones to functions defined in a different script. +The plots below show the call stack within the Julia core for several important entrypoints. The function names are colored by the script in which they are defined, and the lines between the function names have random colors to be able to differentiate between them. Solid lines refer to calls to functions defined in the same script, dashed ones to functions defined in a different script. The plots are of high resolution so zooming in to particular parts is encouraged. Note that these graphs are obtained by dynamic analysis, i.e. by running parts of the code with specific inputs. This means that there can be unshown paths through the code that are not reached for these particular inputs. ## Parameter initialization +Parameter initialization is the process of reading the parameter values from the input files and storing them in data structures for easy access in the core. Most notable here is the convergence of many paths to `load_structvector` and `parse_static_and_time`, as these are needed for parameter initialization for most node types. + ```{julia} # | code-fold: true using SQLite @@ -47,7 +49,9 @@ plot_graph( ) ``` -## `water_balance!` (The ODE system right hand side function) +## `water_balance!` + +`water_balance!` is the right hand side function of the system of ODEs that is solved by the Ribasim core (for more details see [here]("../concept/eqautions.qmd#Formal-model-description")). The various `formulate_flow!` methods are for flow rates as determined by different node types. ```{julia} # | code-fold: true @@ -60,6 +64,9 @@ plot_graph(graph, size = (1700, 1000), xlims = (-0.4, 4.5)) ``` ## Allocation initialization + +In this part of the code the data structures for allocation are set up. Most endpoints in `allocation_init.jl` set up data structures as defined in [JuMP.jl](https://jump.dev/JuMP.jl/stable/). + ```{julia} # | code-fold: true toml_path = normpath(@__DIR__, "../../generated_testmodels/main_network_with_subnetworks/ribasim.toml") @@ -72,6 +79,9 @@ plot_graph(graph, size = (1800, 1000), xlims = (-0.5, 5.5)) ``` ## Allocation run + +Running the allocation algorithm consists of running the optimization itself (which is handled in `JuMP.jl`), and all Ribasim functions around it are used for communicating data between the optimization problem and the physical layer, as well as gathering output data. + ```{julia} # | code-fold: true model = Ribasim.Model(toml_path) @@ -81,6 +91,8 @@ plot_graph(graph, size = (2000, 1000), xlims = (-0.4, 5.5)) ## Discrete control +Discrete control works by a [`FunctionCallingCallback`](https://docs.sciml.ai/DiffEqCallbacks/stable/output_saving/#DiffEqCallbacks.FunctionCallingCallback), changing parameters when a change in control state is detected (see also [here](../reference/node/discrete-control.qmd)). + ```{julia} # | code-fold: true toml_path = normpath(@__DIR__, "../../generated_testmodels/pump_discrete_control/ribasim.toml") @@ -92,6 +104,8 @@ plot_graph(graph; size = (1300, 500), prune_from = [:water_balance!], xlims = (- ``` ## Writing output + +Writing output (currently) happens only after the full simulation is finished. ```{julia} # | code-fold: true toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") From 7b378565cea589249260174c4cd3c93112056f5c Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 4 Nov 2024 13:51:20 +0100 Subject: [PATCH 11/12] Don't show module names in callgraphs by default --- docs/dev/callstacks.qmd | 6 +++--- docs/dev/scripts/trace_call.jl | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index fef2812cb..2cf18d81b 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -2,7 +2,6 @@ ```{julia} # | code-fold: true - using CairoMakie using Colors using Graphs, MetaGraphsNext @@ -80,7 +79,8 @@ plot_graph(graph, size = (1800, 1000), xlims = (-0.5, 5.5)) ## Allocation run -Running the allocation algorithm consists of running the optimization itself (which is handled in `JuMP.jl`), and all Ribasim functions around it are used for communicating data between the optimization problem and the physical layer, as well as gathering output data. +Running the allocation algorithm consists of running the optimization itself (which is handled in `JuMP.jl`), and all Ribasim functions around it are used for communicating data between the optimization problem and the physical layer, as well as gathering output data. Fore more information on the allocation algorithm see [here](../concept/allocation.qmd). + ```{julia} # | code-fold: true @@ -105,7 +105,7 @@ plot_graph(graph; size = (1300, 500), prune_from = [:water_balance!], xlims = (- ## Writing output -Writing output (currently) happens only after the full simulation is finished. +Writing output (currently) happens only after the full simulation is finished. For more information on the different output tables see [here](../reference/usage.qmd#results). ```{julia} # | code-fold: true toml_path = normpath(@__DIR__, "../../generated_testmodels/basic_transient/ribasim.toml") diff --git a/docs/dev/scripts/trace_call.jl b/docs/dev/scripts/trace_call.jl index 5aa0f1e29..aa9c648c6 100644 --- a/docs/dev/scripts/trace_call.jl +++ b/docs/dev/scripts/trace_call.jl @@ -54,11 +54,14 @@ end loc::Vector{Float64} = fill(NaN, 2) depth::Base.RefValue{Int} = Ref(0) isleaf::Base.RefValue{Bool} = Ref(false) + show_module::Bool = false end function Base.show(io::IO, nm::NodeMetadata) - (; mod, name, line) = nm - print(io, "$mod.$name (L$line)") + (; mod, name, line, show_module) = nm + out = "$name (L$line)" + show_module && (out = "$mod.$out") + print(io, out) end function construct_graph(callchains) From 640300b3e3847fd7ad7f7a30a2bc3e1a6acc70c7 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 4 Nov 2024 13:55:04 +0100 Subject: [PATCH 12/12] Fix link --- docs/dev/callstacks.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/callstacks.qmd b/docs/dev/callstacks.qmd index 2cf18d81b..ccad1c637 100644 --- a/docs/dev/callstacks.qmd +++ b/docs/dev/callstacks.qmd @@ -50,7 +50,7 @@ plot_graph( ## `water_balance!` -`water_balance!` is the right hand side function of the system of ODEs that is solved by the Ribasim core (for more details see [here]("../concept/eqautions.qmd#Formal-model-description")). The various `formulate_flow!` methods are for flow rates as determined by different node types. +`water_balance!` is the right hand side function of the system of ODEs that is solved by the Ribasim core (for more details see [here](../concept/equations.qmd#formal-model-description)). The various `formulate_flow!` methods are for flow rates as determined by different node types. ```{julia} # | code-fold: true