-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linear allocation objective #2174
Conversation
I still have to fix some things, but its pretty neat that the "equal_fraction_allocation" test still passes at first try 👍 |
It's also immediately clear that the performance is much better with this objective function than with the quadratic one |
The remaining few failing tests are because of the changed outcomes of the allocation algorithm. |
Edit: I don't think this is a good idea after all because this favors allocating to smaller demands. Maybe it can be improved by tweaking the slopes of the different sections but a goal programming approach is probably cleaner. @jarsarasty I had the following brainwave: In stead of just penalizing any deviation from the target fraction of the demand, have the steepest decline in loss from 0 to the target fraction, and then a less steep decline until the full demand is allocated, and then increasing the loss again afterwards. This is nicely convex. The slopes of the first and last section can be the same as before, but the slope of the middle section is debatable. My first thought was to take half of the slope of the first section. And just have a single error variable |
Hi @SouthEndMusic , As discussed, the failed test is only happening on Linux. This test indicates that some values for saveat and dt are incorrect. Could you please confirm if there is indeed an error in those values or if the test should be declared as broken for now? |
Hi @jarsarasty, I ran the tests on CI again, and this time they don't fail on Linux, so that still suggests non-deterministic behavior (or maybe hardware-specific behavior). I understand the confusion, but these error messages
do not indicate failing tests; these are error messages which are deliberately triggered during testing. |
This is a follow-up of #2191. An issue with that is that it logged a warning about crashing simulations also when it succeeded. Also it didn't log the bottlenecks when you interrupt a (hanging) simulation. Now it does both, this is what is shown when interrupting a simulation, stacktrace is clipped off: ``` ┌ Info: Starting a Ribasim simulation. │ toml_path = c:\Users\visser_mn\Downloads\lhm-sel\lhm-sel.toml │ cli.ribasim_version = 2025.2.0 │ starttime = 2020-01-01T00:00:00 │ endtime = 2021-01-01T00:00:00 └ @ Ribasim C:\ProgramData\DevDrives\repo\ribasim\Ribasim\core\src\main.jl:40 ┌ Warning: Simulation crashed or interrupted. └ @ Ribasim C:\ProgramData\DevDrives\repo\ribasim\Ribasim\core\src\main.jl:51 ┌ Warning: Convergence bottlenecks in descending order of severity: │ Outlet #591225 = 48782.889544290454 │ Outlet #591226 = 48782.889544290454 │ ManningResistance #340784 = 0.04819449424793999 │ Pump #340303 = 0.045638255628477994 │ Pump #340194 = 0.04563825461806383 └ @ Ribasim C:\ProgramData\DevDrives\repo\ribasim\Ribasim\core\src\logging.jl:55 ERROR: InterruptException: Stacktrace: [1] bracketstrictlymontonic(v::Vector{Float64}, x::Float64, guess::Int64, o::Base.Order.ForwardOrdering) ``` This implements `Base.success(::Model)::Bool`. Before we checked the SciML retcode. I noticed that the retcode of an ongoing simulation that gets interrupted is also successfull. So now we check both the retcode and if it `is_finished`.
This seems to fix #2179, and is the initial way newlines are introduced: https://mermaid.js.org/syntax/flowchart.html If this doesn't work, `<br>` is another option.
Fixes #1609 - [x] Implement tests
# Dependencies <details open> <summary>Explicit dependencies</summary> |Dependency[^1]|Before|After|Change|Environments| |-|-|-|-|-| |[**pydantic**](https://prefix.dev/channels/conda-forge/packages/pydantic)|2.10.6|2.11.1|Minor Upgrade|*all*| |[**xarray**](https://prefix.dev/channels/conda-forge/packages/xarray)|2025.3.0|2025.3.1|Patch Upgrade|*all*| </details> <details> <summary>Implicit dependencies</summary> |Dependency[^1]|Before|After|Change|Environments| |-|-|-|-|-| |[libclang-cpp20.1](https://prefix.dev/channels/conda-forge/packages/libclang-cpp20.1)||20.1.2|Added|*all envs* on linux-64| |[typing-inspection](https://prefix.dev/channels/conda-forge/packages/typing-inspection)||0.4.0|Added|*all*| |libclang-cpp19.1|19.1.7||Removed|*all envs* on linux-64| |libllvm19|19.1.7||Removed|*all envs* on linux-64| |[harfbuzz](https://prefix.dev/channels/conda-forge/packages/harfbuzz)|10.4.0|11.0.0|Major Upgrade|*all envs* on {linux-64, win-64}| |[rich](https://prefix.dev/channels/conda-forge/packages/rich)|13.9.4|14.0.0|Major Upgrade|*all*| |[coverage](https://prefix.dev/channels/conda-forge/packages/coverage)|7.7.1|7.8.0|Minor Upgrade|*all*| |[expat](https://prefix.dev/channels/conda-forge/packages/expat)|2.6.4|2.7.0|Minor Upgrade|*all envs* on linux-64| |[griffe](https://prefix.dev/channels/conda-forge/packages/griffe)|1.6.2|1.7.2|Minor Upgrade|*all*| |[json5](https://prefix.dev/channels/conda-forge/packages/json5)|0.10.0|0.11.0|Minor Upgrade|*all*| |[libcurl](https://prefix.dev/channels/conda-forge/packages/libcurl)|8.12.1|8.13.0|Minor Upgrade|*all*| |[libexpat](https://prefix.dev/channels/conda-forge/packages/libexpat)|2.6.4|2.7.0|Minor Upgrade|*all*| |[narwhals](https://prefix.dev/channels/conda-forge/packages/narwhals)|1.32.0|1.33.0|Minor Upgrade|*all*| |[nss](https://prefix.dev/channels/conda-forge/packages/nss)|3.108|3.110|Minor Upgrade|*all envs* on {linux-64, osx-arm64}| |[pydantic-core](https://prefix.dev/channels/conda-forge/packages/pydantic-core)|2.27.2|2.33.0|Minor Upgrade|*all*| |[tblib](https://prefix.dev/channels/conda-forge/packages/tblib)|3.0.0|3.1.0|Minor Upgrade|*all*| |[tenacity](https://prefix.dev/channels/conda-forge/packages/tenacity)|9.0.0|9.1.2|Minor Upgrade|*all*| |[typing-extensions](https://prefix.dev/channels/conda-forge/packages/typing-extensions)|4.12.2|4.13.0|Minor Upgrade|*all*| |[typing_extensions](https://prefix.dev/channels/conda-forge/packages/typing_extensions)|4.12.2|4.13.0|Minor Upgrade|*all*| |[virtualenv](https://prefix.dev/channels/conda-forge/packages/virtualenv)|20.29.3|20.30.0|Minor Upgrade|*all*| |[fmt](https://prefix.dev/channels/conda-forge/packages/fmt)[^2]|11.1.4|11.0.2|Minor Downgrade|*all envs* on osx-arm64| |[aws-c-auth](https://prefix.dev/channels/conda-forge/packages/aws-c-auth)|0.8.6|0.8.7|Patch Upgrade|*all envs* on {linux-64, win-64}| |[aws-c-common](https://prefix.dev/channels/conda-forge/packages/aws-c-common)|0.12.0|0.12.1|Patch Upgrade|*all envs* on {linux-64, win-64}| |[aws-c-http](https://prefix.dev/channels/conda-forge/packages/aws-c-http)|0.9.4|0.9.5|Patch Upgrade|*all envs* on {linux-64, win-64}| |[aws-crt-cpp](https://prefix.dev/channels/conda-forge/packages/aws-crt-cpp)|0.31.0|0.31.1|Patch Upgrade|*all envs* on {linux-64, win-64}| |[bokeh](https://prefix.dev/channels/conda-forge/packages/bokeh)|3.7.0|3.7.2|Patch Upgrade|*all*| |[esbuild](https://prefix.dev/channels/conda-forge/packages/esbuild)|0.25.1|0.25.2|Patch Upgrade|*all*| |[fsspec](https://prefix.dev/channels/conda-forge/packages/fsspec)|2025.3.0|2025.3.2|Patch Upgrade|*all*| |[libclang13](https://prefix.dev/channels/conda-forge/packages/libclang13)|20.1.1|20.1.2|Patch Upgrade|*all envs* on {linux-64, osx-arm64}| |[libcxx](https://prefix.dev/channels/conda-forge/packages/libcxx)|20.1.1|20.1.2|Patch Upgrade|*all envs* on osx-arm64| |[libffi](https://prefix.dev/channels/conda-forge/packages/libffi)|3.4.2|3.4.6|Patch Upgrade|*all envs* on osx-arm64| |[libllvm20](https://prefix.dev/channels/conda-forge/packages/libllvm20)|20.1.1|20.1.2|Patch Upgrade|*all envs* on {linux-64, osx-arm64}| |[pyside6](https://prefix.dev/channels/conda-forge/packages/pyside6)|6.8.2|6.8.3|Patch Upgrade|*all envs* on {linux-64, win-64}| |[qt6-main](https://prefix.dev/channels/conda-forge/packages/qt6-main)|6.8.2|6.8.3|Patch Upgrade|*all envs* on {linux-64, win-64}| |[s2n](https://prefix.dev/channels/conda-forge/packages/s2n)|1.5.14|1.5.15|Patch Upgrade|*all envs* on linux-64| |[spdlog](https://prefix.dev/channels/conda-forge/packages/spdlog)|1.15.1|1.15.2|Patch Upgrade|*all envs* on {linux-64, win-64}| |[svt-av1](https://prefix.dev/channels/conda-forge/packages/svt-av1)|3.0.1|3.0.2|Patch Upgrade|*all*| |[uv](https://prefix.dev/channels/conda-forge/packages/uv)|0.6.10|0.6.12|Patch Upgrade|*all*| |[_libavif_api](https://prefix.dev/channels/conda-forge/packages/_libavif_api)|h57928b3_0|h57928b3_2|Only build string|*all envs* on win-64| |[aws-c-cal](https://prefix.dev/channels/conda-forge/packages/aws-c-cal)|h043a21b_0|h7d555fd_1|Only build string|*all envs* on linux-64| |[aws-c-cal](https://prefix.dev/channels/conda-forge/packages/aws-c-cal)|ha758494_0|h131b658_1|Only build string|*all envs* on win-64| |[aws-c-compression](https://prefix.dev/channels/conda-forge/packages/aws-c-compression)|h3870646_2|hcbd9e4e_3|Only build string|*all envs* on linux-64| |[aws-c-compression](https://prefix.dev/channels/conda-forge/packages/aws-c-compression)|ha758494_2|h131b658_3|Only build string|*all envs* on win-64| |[aws-c-event-stream](https://prefix.dev/channels/conda-forge/packages/aws-c-event-stream)|he38e90d_2|hddb29df_3|Only build string|*all envs* on win-64| |[aws-c-event-stream](https://prefix.dev/channels/conda-forge/packages/aws-c-event-stream)|h04a3f94_2|h286e7e7_3|Only build string|*all envs* on linux-64| |[aws-c-io](https://prefix.dev/channels/conda-forge/packages/aws-c-io)|h3dad3f2_6|ha855f32_8|Only build string|*all envs* on linux-64| |[aws-c-io](https://prefix.dev/channels/conda-forge/packages/aws-c-io)|ha1a8d55_6|h7371350_8|Only build string|*all envs* on win-64| |[aws-c-mqtt](https://prefix.dev/channels/conda-forge/packages/aws-c-mqtt)|h108da3e_2|hffac463_3|Only build string|*all envs* on linux-64| |[aws-c-mqtt](https://prefix.dev/channels/conda-forge/packages/aws-c-mqtt)|h92a58f8_2|hc44c84b_3|Only build string|*all envs* on win-64| |[aws-c-s3](https://prefix.dev/channels/conda-forge/packages/aws-c-s3)|h1a6e373_2|hf31aad2_3|Only build string|*all envs* on win-64| |[aws-c-s3](https://prefix.dev/channels/conda-forge/packages/aws-c-s3)|h822ba82_2|h4c9fe3b_3|Only build string|*all envs* on linux-64| |[aws-c-sdkutils](https://prefix.dev/channels/conda-forge/packages/aws-c-sdkutils)|h3870646_2|hcbd9e4e_3|Only build string|*all envs* on linux-64| |[aws-c-sdkutils](https://prefix.dev/channels/conda-forge/packages/aws-c-sdkutils)|ha758494_2|h131b658_3|Only build string|*all envs* on win-64| |[aws-checksums](https://prefix.dev/channels/conda-forge/packages/aws-checksums)|h3870646_2|hcbd9e4e_3|Only build string|*all envs* on linux-64| |[aws-checksums](https://prefix.dev/channels/conda-forge/packages/aws-checksums)|ha758494_2|h131b658_3|Only build string|*all envs* on win-64| |[aws-sdk-cpp](https://prefix.dev/channels/conda-forge/packages/aws-sdk-cpp)|h2bfe9dd_3|hddf75dc_4|Only build string|*all envs* on win-64| |[aws-sdk-cpp](https://prefix.dev/channels/conda-forge/packages/aws-sdk-cpp)|h37a5c72_3|h1fa5cb7_4|Only build string|*all envs* on linux-64| |[libarrow](https://prefix.dev/channels/conda-forge/packages/libarrow)|h2335092_20_cpu|hf0b9ce2_21_cpu|Only build string|*all envs* on win-64| |[libarrow](https://prefix.dev/channels/conda-forge/packages/libarrow)|h30f107e_20_cpu|h0036504_21_cpu|Only build string|*all envs* on linux-64| |[libarrow-acero](https://prefix.dev/channels/conda-forge/packages/libarrow-acero)|hcb10f89_20_cpu|hcb10f89_21_cpu|Only build string|*all envs* on linux-64| |[libarrow-acero](https://prefix.dev/channels/conda-forge/packages/libarrow-acero)|h7d8d6a5_20_cpu|h7d8d6a5_21_cpu|Only build string|*all envs* on win-64| |[libarrow-dataset](https://prefix.dev/channels/conda-forge/packages/libarrow-dataset)|hcb10f89_20_cpu|hcb10f89_21_cpu|Only build string|*all envs* on linux-64| |[libarrow-dataset](https://prefix.dev/channels/conda-forge/packages/libarrow-dataset)|h7d8d6a5_20_cpu|h7d8d6a5_21_cpu|Only build string|*all envs* on win-64| |[libarrow-substrait](https://prefix.dev/channels/conda-forge/packages/libarrow-substrait)|hb76e781_20_cpu|hb76e781_21_cpu|Only build string|*all envs* on win-64| |[libarrow-substrait](https://prefix.dev/channels/conda-forge/packages/libarrow-substrait)|h1bed206_20_cpu|h1bed206_21_cpu|Only build string|*all envs* on linux-64| |[libavif16](https://prefix.dev/channels/conda-forge/packages/libavif16)|h63b8bd6_0|hbb36593_2|Only build string|*all envs* on linux-64| |[libavif16](https://prefix.dev/channels/conda-forge/packages/libavif16)|h62bbbde_0|hb57027a_2|Only build string|*all envs* on win-64| |[libavif16](https://prefix.dev/channels/conda-forge/packages/libavif16)|hba52f4c_0|h3861c80_2|Only build string|*all envs* on osx-arm64| |[libffi](https://prefix.dev/channels/conda-forge/packages/libffi)|h537db12_0|h537db12_1|Only build string|*all envs* on win-64| |[libffi](https://prefix.dev/channels/conda-forge/packages/libffi)|h2dba641_0|h2dba641_1|Only build string|*all envs* on linux-64| |[libparquet](https://prefix.dev/channels/conda-forge/packages/libparquet)|ha850022_20_cpu|ha850022_21_cpu|Only build string|*all envs* on win-64| |[libparquet](https://prefix.dev/channels/conda-forge/packages/libparquet)|h081d1f1_20_cpu|h081d1f1_21_cpu|Only build string|*all envs* on linux-64| |[libpq](https://prefix.dev/channels/conda-forge/packages/libpq)|h9087029_0|h9087029_1|Only build string|*all envs* on win-64| |[libpq](https://prefix.dev/channels/conda-forge/packages/libpq)|h6896619_0|h6896619_1|Only build string|*all envs* on osx-arm64| |[libpq](https://prefix.dev/channels/conda-forge/packages/libpq)|h27ae623_0|h27ae623_1|Only build string|*all envs* on linux-64| |[postgresql](https://prefix.dev/channels/conda-forge/packages/postgresql)|hb80eeff_0|hb80eeff_1|Only build string|*all envs* on osx-arm64| |[postgresql](https://prefix.dev/channels/conda-forge/packages/postgresql)|h9e3fa73_0|h9e3fa73_1|Only build string|*all envs* on linux-64| |[postgresql](https://prefix.dev/channels/conda-forge/packages/postgresql)|h9a933bb_0|h9a933bb_1|Only build string|*all envs* on win-64| |[python_abi](https://prefix.dev/channels/conda-forge/packages/python_abi)|5_cp312|6_cp312|Only build string|default on *all platforms*| |[python_abi](https://prefix.dev/channels/conda-forge/packages/python_abi)|5_cp311|6_cp311|Only build string|py311 on *all platforms*| |[qt-main](https://prefix.dev/channels/conda-forge/packages/qt-main)|hc3cb62f_2|h993ce98_3|Only build string|*all envs* on linux-64| |[qt-main](https://prefix.dev/channels/conda-forge/packages/qt-main)|h9151539_2|h9151539_3|Only build string|*all envs* on win-64| |[qt-main](https://prefix.dev/channels/conda-forge/packages/qt-main)|h67564f6_2|h67564f6_3|Only build string|*all envs* on osx-arm64| |[spdlog](https://prefix.dev/channels/conda-forge/packages/spdlog)|h008cadb_1|hed1c2b2_0|Only build string|*all envs* on osx-arm64| |[tiledb](https://prefix.dev/channels/conda-forge/packages/tiledb)|h0578d8b_3|heaaebde_5|Only build string|*all envs* on win-64| |[tiledb](https://prefix.dev/channels/conda-forge/packages/tiledb)|h9edfc3c_3|haba8ea6_5|Only build string|*all envs* on linux-64| |[ucx](https://prefix.dev/channels/conda-forge/packages/ucx)|hfd9a62f_2|hfd9a62f_3|Only build string|*all envs* on linux-64| |[vc](https://prefix.dev/channels/conda-forge/packages/vc)|hbf610ac_25|h2b53caa_26|Only build string|*all envs* on win-64| |[vc14_runtime](https://prefix.dev/channels/conda-forge/packages/vc14_runtime)|hfd919c2_25|hfd919c2_26|Only build string|*all envs* on win-64| |[vs2015_runtime](https://prefix.dev/channels/conda-forge/packages/vs2015_runtime)|h7142326_25|h7142326_26|Only build string|*all envs* on win-64| </details> [^1]: **Bold** means explicit dependency. [^2]: Dependency got downgraded. --------- Co-authored-by: visr <[email protected]> Co-authored-by: Martijn Visser <[email protected]>
Update the Julia Manifest.toml to get the latest dependencies. __Changed packages__ ``` Installing known registries into `~/.julia` Added `General` registry to ~/.julia/registries Updating registry at `~/.julia/registries/General.toml` Cloning git-repo `https://github.com/visr/SparseConnectivityTracer.jl` Updating git-repo `https://github.com/visr/SparseConnectivityTracer.jl` Updating `~/work/Ribasim/Ribasim/Project.toml` [2b5f629d] ↑ DiffEqBase v6.167.1 ⇒ v6.167.2 [a0c0ee7d] ↑ DifferentiationInterface v0.6.49 ⇒ v0.6.50 [86223c79] ↑ Graphs v1.12.0 ⇒ v1.12.1 [7073ff75] ↑ IJulia v1.26.0 ⇒ v1.27.0 [5903a43b] ↑ Infiltrator v1.8.6 ⇒ v1.8.7 [0f8b85d8] ↑ JSON3 v1.14.1 ⇒ v1.14.2 [7ed4a6bd] ↑ LinearSolve v3.7.0 ⇒ v3.7.2 [fa8bd995] ↑ MetaGraphsNext v0.7.2 ⇒ v0.7.3 [6ad6398a] ↑ OrdinaryDiffEqBDF v1.3.0 ⇒ v1.4.0 [bbf590c4] ↑ OrdinaryDiffEqCore v1.20.0 ⇒ v1.21.0 [127b3ac7] ↑ OrdinaryDiffEqNonlinearSolve v1.5.0 ⇒ v1.6.0 [43230ef6] ↑ OrdinaryDiffEqRosenbrock v1.8.0 ⇒ v1.9.0 [0bca4576] ↑ SciMLBase v2.79.0 ⇒ v2.82.0 Updating `~/work/Ribasim/Ribasim/Manifest.toml` [5ba52731] ↑ CodecLz4 v0.4.5 ⇒ v0.4.6 [3da002f7] ↑ ColorTypes v0.12.0 ⇒ v0.12.1 [2b5f629d] ↑ DiffEqBase v6.167.1 ⇒ v6.167.2 [a0c0ee7d] ↑ DifferentiationInterface v0.6.49 ⇒ v0.6.50 [ffbed154] ↑ DocStringExtensions v0.9.3 ⇒ v0.9.4 [a4df4552] ↑ FastPower v1.1.1 ⇒ v1.1.2 [5c1252a2] ↑ GeometryBasics v0.5.6 ⇒ v0.5.7 [86223c79] ↑ Graphs v1.12.0 ⇒ v1.12.1 [7073ff75] ↑ IJulia v1.26.0 ⇒ v1.27.0 [5903a43b] ↑ Infiltrator v1.8.6 ⇒ v1.8.7 [d1acc4aa] ↑ IntervalArithmetic v0.22.26 ⇒ v0.22.27 [0f8b85d8] ↑ JSON3 v1.14.1 ⇒ v1.14.2 [7ed4a6bd] ↑ LinearSolve v3.7.0 ⇒ v3.7.2 [fa8bd995] ↑ MetaGraphsNext v0.7.2 ⇒ v0.7.3 [d41bc354] ↑ NLSolversBase v7.9.0 ⇒ v7.9.1 [6ad6398a] ↑ OrdinaryDiffEqBDF v1.3.0 ⇒ v1.4.0 [bbf590c4] ↑ OrdinaryDiffEqCore v1.20.0 ⇒ v1.21.0 [4302a76b] ↑ OrdinaryDiffEqDifferentiation v1.4.0 ⇒ v1.5.0 [127b3ac7] ↑ OrdinaryDiffEqNonlinearSolve v1.5.0 ⇒ v1.6.0 [43230ef6] ↑ OrdinaryDiffEqRosenbrock v1.8.0 ⇒ v1.9.0 [90014a1f] ↑ PDMats v0.11.32 ⇒ v0.11.33 [65ce6f38] - PackageExtensionCompat v1.0.2 [d236fae5] ↑ PreallocationTools v0.4.25 ⇒ v0.4.26 [0bca4576] ↑ SciMLBase v2.79.0 ⇒ v2.82.0 [47a9eef4] - SparseDiffTools v2.24.0 [4c63d2b9] ↑ StatsFuns v1.3.2 ⇒ v1.4.0 [19fa3120] - VertexSafeGraphs v0.2.0 [d7e528f0] ↑ FreeType2_jll v2.13.3+1 ⇒ v2.13.4+0 [4b2f31a3] ↑ Libmount_jll v2.40.3+0 ⇒ v2.41.0+0 [38a345b3] ↑ Libuuid_jll v2.40.3+0 ⇒ v2.41.0+0 Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/b19db3927f0db4151cb86d073689f2428e524576/build.log` Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/be30be76e25b0aff2c9a85930ed3ac34c5f10c83/build.log` Info We haven't cleaned this depot up for a bit, running Pkg.gc()... Active manifest files: 1 found Active artifact files: 70 found Active scratchspaces: 2 found Deleted no artifacts, repos, packages or scratchspaces ``` __Packages still outdated after update__ ``` Status `~/work/Ribasim/Ribasim/Project.toml` ``` <details> <summary> All package versions </summary> ``` ADTypes ────────────────────────── v1.14.0 AbstractFFTs ───────────────────── v1.5.0 AbstractTrees ──────────────────── v0.4.5 Accessors ──────────────────────── v0.1.42 Adapt ──────────────────────────── v4.3.0 AdaptivePredicates ─────────────── v1.2.0 AliasTables ────────────────────── v1.1.3 Animations ─────────────────────── v0.4.2 ArgCheck ───────────────────────── v2.5.0 ArnoldiMethod ──────────────────── v0.4.0 ArrayInterface ─────────────────── v7.18.0 ArrayLayouts ───────────────────── v1.11.1 Arrow ──────────────────────────── v2.8.0 ArrowTypes ─────────────────────── v2.3.0 Automa ─────────────────────────── v1.1.0 AxisAlgorithms ─────────────────── v1.1.0 AxisArrays ─────────────────────── v0.4.7 BasicModelInterface ────────────── v0.1.1 BenchmarkTools ─────────────────── v1.6.0 BitIntegers ────────────────────── v0.3.5 BitTwiddlingConvenienceFunctions ─ v0.1.6 BracketingNonlinearSolve ───────── v1.1.2 Bzip2_jll ──────────────────────── v1.0.9+0 CEnum ──────────────────────────── v0.5.0 CPUSummary ─────────────────────── v0.2.6 CRlibm_jll ─────────────────────── v1.0.1+0 Cairo ──────────────────────────── v1.1.1 CairoMakie ─────────────────────── v0.13.2 Cairo_jll ──────────────────────── v1.18.4+0 ChainRulesCore ─────────────────── v1.25.1 CloseOpenIntervals ─────────────── v0.1.13 CodeTracking ───────────────────── v1.3.6 CodecBzip2 ─────────────────────── v0.8.5 CodecLz4 ───────────────────────── v0.4.6 CodecZlib ──────────────────────── v0.7.8 CodecZstd ──────────────────────── v0.8.6 ColorBrewer ────────────────────── v0.4.1 ColorSchemes ───────────────────── v3.29.0 ColorTypes ─────────────────────── v0.12.1 ColorVectorSpace ───────────────── v0.11.0 Colors ─────────────────────────── v0.13.0 CommonSolve ────────────────────── v0.2.4 CommonSubexpressions ───────────── v0.3.1 CommonWorldInvalidations ───────── v1.0.0 Compat ─────────────────────────── v4.16.0 CompositionsBase ───────────────── v0.1.2 ConcreteStructs ────────────────── v0.2.3 ConcurrentUtilities ────────────── v2.5.0 Conda ──────────────────────────── v1.10.2 Configurations ─────────────────── v0.17.6 ConstructionBase ───────────────── v1.5.8 Contour ────────────────────────── v0.6.3 CpuId ──────────────────────────── v0.3.1 Crayons ────────────────────────── v4.1.1 DBInterface ────────────────────── v2.6.1 DataAPI ────────────────────────── v1.16.0 DataFrames ─────────────────────── v1.7.0 DataInterpolations ─────────────── v8.0.0 DataStructures ─────────────────── v0.18.22 DataValueInterfaces ────────────── v1.0.0 DelaunayTriangulation ──────────── v1.6.4 DiffEqBase ─────────────────────── v6.167.2 DiffEqCallbacks ────────────────── v4.3.0 DiffResults ────────────────────── v1.1.0 DiffRules ──────────────────────── v1.15.1 DifferentiationInterface ───────── v0.6.50 DisplayAs ──────────────────────── v0.1.6 Distributions ──────────────────── v0.25.118 DocStringExtensions ────────────── v0.9.4 EarCut_jll ─────────────────────── v2.2.4+0 EnumX ──────────────────────────── v1.0.5 EnzymeCore ─────────────────────── v0.8.8 ExactPredicates ────────────────── v2.2.8 Expat_jll ──────────────────────── v2.6.5+0 ExprTools ──────────────────────── v0.1.10 ExproniconLite ─────────────────── v0.10.14 Extents ────────────────────────── v0.1.5 FFMPEG_jll ─────────────────────── v6.1.2+0 FFTW ───────────────────────────── v1.8.1 FFTW_jll ───────────────────────── v3.3.10+3 FastBroadcast ──────────────────── v0.3.5 FastClosures ───────────────────── v0.3.2 FastPower ──────────────────────── v1.1.2 FileIO ─────────────────────────── v1.17.0 FilePaths ──────────────────────── v0.8.3 FilePathsBase ──────────────────── v0.9.24 FillArrays ─────────────────────── v1.13.0 FindFirstFunctions ─────────────── v1.4.1 FiniteDiff ─────────────────────── v2.27.0 FixedPointNumbers ──────────────── v0.8.5 Fontconfig_jll ─────────────────── v2.15.0+0 Format ─────────────────────────── v1.3.7 ForwardDiff ────────────────────── v0.10.38 FreeType ───────────────────────── v4.1.1 FreeType2_jll ──────────────────── v2.13.4+0 FreeTypeAbstraction ────────────── v0.10.6 FriBidi_jll ────────────────────── v1.0.16+0 FunctionWrappers ───────────────── v1.1.3 FunctionWrappersWrappers ───────── v0.1.3 Functors ───────────────────────── v0.5.2 GPUArraysCore ──────────────────── v0.2.0 GeoFormatTypes ─────────────────── v0.4.4 GeoInterface ───────────────────── v1.4.1 GeometryBasics ─────────────────── v0.5.7 Gettext_jll ────────────────────── v0.21.0+0 Giflib_jll ─────────────────────── v5.2.3+0 Glib_jll ───────────────────────── v2.82.4+0 Glob ───────────────────────────── v1.3.1 Graphics ───────────────────────── v1.1.3 Graphite2_jll ──────────────────── v1.3.14+1 Graphs ─────────────────────────── v1.12.1 GridLayoutBase ─────────────────── v0.11.1 Grisu ──────────────────────────── v1.0.2 HarfBuzz_jll ───────────────────── v8.5.0+0 HiGHS ──────────────────────────── v1.15.0 HiGHS_jll ──────────────────────── v1.10.0+0 HypergeometricFunctions ────────── v0.3.28 IJulia ─────────────────────────── v1.27.0 IOCapture ──────────────────────── v0.2.5 IfElse ─────────────────────────── v0.1.1 ImageAxes ──────────────────────── v0.6.12 ImageBase ──────────────────────── v0.1.7 ImageCore ──────────────────────── v0.10.5 ImageIO ────────────────────────── v0.6.9 ImageMetadata ──────────────────── v0.9.10 Imath_jll ──────────────────────── v3.1.11+0 IndirectArrays ─────────────────── v1.0.0 Infiltrator ────────────────────── v1.8.7 Inflate ────────────────────────── v0.1.5 InlineStrings ──────────────────── v1.4.3 IntelOpenMP_jll ────────────────── v2025.0.4+0 Interpolations ─────────────────── v0.15.1 IntervalArithmetic ─────────────── v0.22.27 IntervalSets ───────────────────── v0.7.10 InverseFunctions ───────────────── v0.1.17 InvertedIndices ────────────────── v1.3.1 IrrationalConstants ────────────── v0.2.4 Isoband ────────────────────────── v0.1.1 IterTools ──────────────────────── v1.10.0 IteratorInterfaceExtensions ────── v1.0.0 JLD2 ───────────────────────────── v0.5.12 JLLWrappers ────────────────────── v1.7.0 JSON ───────────────────────────── v0.21.4 JSON3 ──────────────────────────── v1.14.2 Jieko ──────────────────────────── v0.2.1 JpegTurbo ──────────────────────── v0.1.6 JpegTurbo_jll ──────────────────── v3.1.1+0 JuMP ───────────────────────────── v1.25.0 JuliaInterpreter ───────────────── v0.9.42 KernelDensity ──────────────────── v0.6.9 Krylov ─────────────────────────── v0.9.10 LAME_jll ───────────────────────── v3.100.2+0 LERC_jll ───────────────────────── v4.0.1+0 LLVMOpenMP_jll ─────────────────── v18.1.7+0 LZO_jll ────────────────────────── v2.10.3+0 LaTeXStrings ───────────────────── v1.4.0 LayoutPointers ─────────────────── v0.1.17 LazyArrays ─────────────────────── v2.6.1 LazyModules ────────────────────── v0.3.1 LeftChildRightSiblingTrees ─────── v0.2.0 Legolas ────────────────────────── v0.5.23 Libffi_jll ─────────────────────── v3.2.2+2 Libgcrypt_jll ──────────────────── v1.11.0+0 Libglvnd_jll ───────────────────── v1.7.0+0 Libgpg_error_jll ───────────────── v1.51.1+0 Libiconv_jll ───────────────────── v1.18.0+0 Libmount_jll ───────────────────── v2.41.0+0 Libtiff_jll ────────────────────── v4.7.1+0 Libuuid_jll ────────────────────── v2.41.0+0 LineSearch ─────────────────────── v0.1.4 LineSearches ───────────────────── v7.3.0 LinearSolve ────────────────────── v3.7.2 LogExpFunctions ────────────────── v0.3.29 LoggingExtras ──────────────────── v1.1.0 LoweredCodeUtils ───────────────── v3.1.0 Lz4_jll ────────────────────────── v1.10.1+0 MKL_jll ────────────────────────── v2025.0.1+1 MacroTools ─────────────────────── v0.5.15 Makie ──────────────────────────── v0.22.2 MakieCore ──────────────────────── v0.9.1 ManualMemory ───────────────────── v0.1.8 MappedArrays ───────────────────── v0.4.2 MarkdownTables ─────────────────── v1.1.0 MathOptInterface ───────────────── v1.38.0 MathTeXEngine ──────────────────── v0.6.2 MaybeInplace ───────────────────── v0.1.4 MbedTLS ────────────────────────── v1.1.9 MetaGraphsNext ─────────────────── v0.7.3 Missings ───────────────────────── v1.2.0 Mocking ────────────────────────── v0.8.1 MosaicViews ────────────────────── v0.3.4 Moshi ──────────────────────────── v0.3.5 MuladdMacro ────────────────────── v0.2.4 MutableArithmetics ─────────────── v1.6.4 NLSolversBase ──────────────────── v7.9.1 NaNMath ────────────────────────── v1.1.2 Netpbm ─────────────────────────── v1.1.1 NonlinearSolve ─────────────────── v4.5.0 NonlinearSolveBase ─────────────── v1.5.1 NonlinearSolveFirstOrder ───────── v1.3.0 NonlinearSolveQuasiNewton ──────── v1.2.0 NonlinearSolveSpectralMethods ──── v1.1.0 Observables ────────────────────── v0.5.5 OffsetArrays ───────────────────── v1.16.0 Ogg_jll ────────────────────────── v1.3.5+1 OpenBLASConsistentFPCSR_jll ────── v0.3.29+0 OpenEXR ────────────────────────── v0.3.3 OpenEXR_jll ────────────────────── v3.2.4+0 OpenSSL_jll ────────────────────── v3.0.16+0 OpenSpecFun_jll ────────────────── v0.5.6+0 Opus_jll ───────────────────────── v1.3.3+0 OrderedCollections ─────────────── v1.8.0 OrdinaryDiffEqBDF ──────────────── v1.4.0 OrdinaryDiffEqCore ─────────────── v1.21.0 OrdinaryDiffEqDifferentiation ──── v1.5.0 OrdinaryDiffEqLowOrderRK ───────── v1.2.0 OrdinaryDiffEqNonlinearSolve ───── v1.6.0 OrdinaryDiffEqRosenbrock ───────── v1.9.0 OrdinaryDiffEqSDIRK ────────────── v1.3.0 OrdinaryDiffEqTsit5 ────────────── v1.1.0 OteraEngine ────────────────────── v1.1.1 PDMats ─────────────────────────── v0.11.33 PNGFiles ───────────────────────── v0.4.4 PackageCompiler ────────────────── v2.2.0 Packing ────────────────────────── v0.5.1 PaddedViews ────────────────────── v0.5.12 Pango_jll ──────────────────────── v1.56.1+0 Parameters ─────────────────────── v0.12.3 Parsers ────────────────────────── v2.8.1 Pixman_jll ─────────────────────── v0.44.2+0 PkgVersion ─────────────────────── v0.3.3 PlotUtils ──────────────────────── v1.4.3 Polyester ──────────────────────── v0.7.16 PolyesterWeave ─────────────────── v0.2.2 PolygonOps ─────────────────────── v0.1.2 PooledArrays ───────────────────── v1.4.3 PreallocationTools ─────────────── v0.4.26 PrecompileTools ────────────────── v1.2.1 Preferences ────────────────────── v1.4.3 PrettyTables ───────────────────── v2.4.0 ProgressLogging ────────────────── v0.1.4 ProgressMeter ──────────────────── v1.10.2 PtrArrays ──────────────────────── v1.3.0 QOI ────────────────────────────── v1.0.1 QuadGK ─────────────────────────── v2.11.2 RangeArrays ────────────────────── v0.3.2 Ratios ─────────────────────────── v0.4.5 RecipesBase ────────────────────── v1.3.4 RecursiveArrayTools ────────────── v3.31.2 Reexport ───────────────────────── v1.2.2 RelocatableFolders ─────────────── v1.0.1 Requires ───────────────────────── v1.3.1 Revise ─────────────────────────── v3.7.3 Rmath ──────────────────────────── v0.8.0 Rmath_jll ──────────────────────── v0.5.1+0 RoundingEmulator ───────────────── v0.2.1 RuntimeGeneratedFunctions ──────── v0.5.13 SIMD ───────────────────────────── v3.7.1 SIMDTypes ──────────────────────── v0.1.0 SQLite ─────────────────────────── v1.6.1 SQLite_jll ─────────────────────── v3.48.0+0 SciMLBase ──────────────────────── v2.82.0 SciMLJacobianOperators ─────────── v0.1.1 SciMLOperators ─────────────────── v0.3.13 SciMLStructures ────────────────── v1.7.0 Scratch ────────────────────────── v1.2.1 SentinelArrays ─────────────────── v1.4.8 Setfield ───────────────────────── v1.1.2 ShaderAbstractions ─────────────── v0.5.0 Showoff ────────────────────────── v1.0.3 SignedDistanceFields ───────────── v0.4.0 SimpleNonlinearSolve ───────────── v2.2.0 SimpleTraits ───────────────────── v0.9.4 SimpleUnPack ───────────────────── v1.1.0 Sixel ──────────────────────────── v0.1.3 SoftGlobalScope ────────────────── v1.1.0 SortingAlgorithms ──────────────── v1.2.1 SparseMatrixColorings ──────────── v0.4.14 SpecialFunctions ───────────────── v2.5.0 StableRNGs ─────────────────────── v1.0.2 StackViews ─────────────────────── v0.1.1 Static ─────────────────────────── v1.2.0 StaticArrayInterface ───────────── v1.8.0 StaticArrays ───────────────────── v1.9.13 StaticArraysCore ───────────────── v1.4.3 Statistics ─────────────────────── v1.11.1 StatsAPI ───────────────────────── v1.7.0 StatsBase ──────────────────────── v0.34.4 StatsFuns ──────────────────────── v1.4.0 StrideArraysCore ───────────────── v0.5.7 StringManipulation ─────────────── v0.4.1 StringViews ────────────────────── v1.3.4 StructArrays ───────────────────── v0.7.0 StructTypes ────────────────────── v1.11.0 SymbolicIndexingInterface ──────── v0.3.38 TZJData ────────────────────────── v1.5.0+2025b TableTraits ────────────────────── v1.0.1 Tables ─────────────────────────── v1.12.0 TensorCore ─────────────────────── v0.1.1 TerminalLoggers ────────────────── v0.1.7 TestEnv ────────────────────────── v1.102.0 TestItemRunner ─────────────────── v1.1.0 TestItems ──────────────────────── v1.0.0 ThreadingUtilities ─────────────── v0.5.2 TiffImages ─────────────────────── v0.11.3 TimeZones ──────────────────────── v1.21.3 TimerOutputs ───────────────────── v0.5.28 TranscodingStreams ─────────────── v0.11.3 TriplotBase ────────────────────── v0.1.0 TruncatedStacktraces ───────────── v1.4.0 UnPack ─────────────────────────── v1.0.2 UnicodeFun ─────────────────────── v0.4.1 Unitful ────────────────────────── v1.22.0 VersionParsing ─────────────────── v1.3.0 WeakRefStrings ─────────────────── v1.4.2 WebP ───────────────────────────── v0.1.3 WoodburyMatrices ───────────────── v1.0.0 XML2_jll ───────────────────────── v2.13.6+1 XSLT_jll ───────────────────────── v1.1.42+0 XZ_jll ─────────────────────────── v5.6.4+1 Xorg_libX11_jll ────────────────── v1.8.6+3 Xorg_libXau_jll ────────────────── v1.0.12+0 Xorg_libXdmcp_jll ──────────────── v1.1.5+0 Xorg_libXext_jll ───────────────── v1.3.6+3 Xorg_libXrender_jll ────────────── v0.9.11+1 Xorg_libpthread_stubs_jll ──────── v0.1.2+0 Xorg_libxcb_jll ────────────────── v1.17.0+3 Xorg_xtrans_jll ────────────────── v1.5.1+0 ZMQ ────────────────────────────── v1.4.0 ZeroMQ_jll ─────────────────────── v4.3.6+0 Zstd_jll ───────────────────────── v1.5.7+1 isoband_jll ────────────────────── v0.2.3+0 libaom_jll ─────────────────────── v3.11.0+0 libass_jll ─────────────────────── v0.15.2+0 libfdk_aac_jll ─────────────────── v2.0.3+0 libpng_jll ─────────────────────── v1.6.47+0 libsixel_jll ───────────────────── v1.10.5+0 libsodium_jll ──────────────────── v1.0.21+0 libvorbis_jll ──────────────────── v1.3.7+2 libwebp_jll ────────────────────── v1.5.0+0 oneTBB_jll ─────────────────────── v2022.0.0+0 x264_jll ───────────────────────── v10164.0.1+0 x265_jll ───────────────────────── v3.6.0+0 --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Martijn Visser <[email protected]>
Fixes #2207. This logs the computation time: ``` ┌ Info: Starting a Ribasim simulation. │ toml_path = "models\\hws\\hws_2025_3_0\\hws.toml" │ cli.ribasim_version = "2025.2.0" │ starttime = 2023-01-20T00:00:00 └ endtime = 2024-04-27T00:00:00 Simulating 100%|███████████████████████████████████████████████████████████████████████████████| Time: 0:00:50 [ Info: Computation time: 49 seconds, 955 milliseconds ``` The time is also at the end of the progress bar, but this bar is not logged to `ribasim.log` so there was no record of it there. There is also a new column `computation_time` in `solver_stats.arrow`, with the time in milliseconds for that period. I went for millisecond since the order of seconds per day is only really applicable for very large models. ```python In [1]: import pandas as pd In [2]: df = pd.read_feather("solver_stats.arrow") In [3]: df Out[3]: time computation_time rhs_calls linear_solves accepted_timesteps rejected_timesteps 0 2023-01-20 2244.7489 7712 7709 2850 458 1 2023-01-21 632.4497 2513 2513 737 128 2 2023-01-22 164.0670 662 662 195 36 3 2023-01-23 387.5130 1428 1428 402 80 4 2023-01-24 190.5293 751 751 214 37 .. ... ... ... ... ... ... 458 2024-04-22 132.2348 542 542 67 6 459 2024-04-23 181.5635 703 703 64 10 460 2024-04-24 67.9207 292 292 32 2 461 2024-04-25 117.8029 451 451 30 8 462 2024-04-26 5.1752 16 16 7 0 [463 rows x 6 columns] In [4]: df["computation_time"].sum() / 1000 Out[4]: np.float64(50.0540202) ```
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.8.3 to 0.8.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/prefix-dev/setup-pixi/releases">prefix-dev/setup-pixi's releases</a>.</em></p> <blockquote> <h2>v0.8.4</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>🐛 Bug fixes</h3> <ul> <li>fix: Behavior if pixi is on path with spaces by <a href="https://github.com/pavelzw"><code>@pavelzw</code></a> in <a href="https://redirect.github.com/prefix-dev/setup-pixi/pull/185">prefix-dev/setup-pixi#185</a></li> </ul> <h3>📝 Documentation</h3> <ul> <li>Mention run-install in documentation by <a href="https://github.com/pavelzw"><code>@pavelzw</code></a> in <a href="https://redirect.github.com/prefix-dev/setup-pixi/pull/179">prefix-dev/setup-pixi#179</a></li> <li>Adjust pull request template by <a href="https://github.com/pavelzw"><code>@pavelzw</code></a> in <a href="https://redirect.github.com/prefix-dev/setup-pixi/pull/182">prefix-dev/setup-pixi#182</a></li> </ul> <h3>⬆️ Dependency updates</h3> <ul> <li>Bump the gh-actions group with 3 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/prefix-dev/setup-pixi/pull/180">prefix-dev/setup-pixi#180</a></li> <li>Bump the nodejs group with 10 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/prefix-dev/setup-pixi/pull/181">prefix-dev/setup-pixi#181</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/prefix-dev/setup-pixi/compare/v0.8.3...v0.8.4">https://github.com/prefix-dev/setup-pixi/compare/v0.8.3...v0.8.4</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/prefix-dev/setup-pixi/commit/8eaba7c61d661f73d558b0b477156b7b62667fa4"><code>8eaba7c</code></a> fix: Behavior if pixi is on path with spaces (<a href="https://redirect.github.com/prefix-dev/setup-pixi/issues/185">#185</a>)</li> <li><a href="https://github.com/prefix-dev/setup-pixi/commit/0aa0cc06bf8abcbe730be7f38cadc475040cc10c"><code>0aa0cc0</code></a> Bump the nodejs group with 10 updates (<a href="https://redirect.github.com/prefix-dev/setup-pixi/issues/181">#181</a>)</li> <li><a href="https://github.com/prefix-dev/setup-pixi/commit/0eb8fc3d668dbf882642a3c2596869573b835fc2"><code>0eb8fc3</code></a> Bump the gh-actions group with 3 updates (<a href="https://redirect.github.com/prefix-dev/setup-pixi/issues/180">#180</a>)</li> <li><a href="https://github.com/prefix-dev/setup-pixi/commit/9c0726f35464fde5475daa8ca54df81df759cefa"><code>9c0726f</code></a> Adjust pull request template (<a href="https://redirect.github.com/prefix-dev/setup-pixi/issues/182">#182</a>)</li> <li><a href="https://github.com/prefix-dev/setup-pixi/commit/2970de4ad95fecdf1c3173999267d5b28c01853e"><code>2970de4</code></a> Mention run-install in documentation (<a href="https://redirect.github.com/prefix-dev/setup-pixi/issues/179">#179</a>)</li> <li>See full diff in <a href="https://github.com/prefix-dev/setup-pixi/compare/v0.8.3...v0.8.4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
We temporarily moved to a branch in #2201, but now that's released, go back to the release.
And adds "show topology" button on the layer context menu. Fixes #2178 Fixes #2171 This creates a new Results group in QGIS for each loaded model, and adds a BasinNode and FlowLink layer to it. These are duplicates of the Node and Link layer for the result data (and thus only keeping `node_type=Basin`, and `link_type=flow`). Result arrow files (basin, flow and concentration) are read with pandas and indexed on time (concentration is widened first) and saved on the widget. Fields on the BasinNode and FlowLink are created to store the result variables. A specific time slice, by default the last, or by a signal from the temporal manager is then used to update these fields. The temporal manager is initialized based on the start/endtime and timestep from .toml file. In effect you now have Node and Link tables with all result variables for a given timestep, meaning you're free to add symbology/labels as you would for any (static) layer. The layer context menu is expanded to show a "Show topology" checkmark, which sets a layer variable, which in turn is used by the layer symbology to either show `@geometry` or `make_line(start_point(@geometry), end_point( @geometry))`. --- For @Huite and @JoerivanEngelen, updating the (memory) layers on the fly, and not using QGIS to read arrow files is essential for performance. Further performance was gained by not iterating over the layer features and updating them, but by setting them directly based on the fid (order). Note that the memory copy does not use the same fids as our geopackage layers, and you can't control them. The last factor of performance was disabling the automatic undo functionality (or rather creating 1 undo, instead of one for each feature) when updating the layer. --------- Co-authored-by: Martijn Visser <[email protected]>
Fixes #1877 This was not documented anyway, was quite buggy, and users can save their changes themselves when they want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made a few suggestions for implementation. A short meeting may help clarify some of my questions.
@@ -190,15 +181,15 @@ end | |||
)] = 4.5 * Δt_allocation | |||
Ribasim.update_allocation!(model.integrator) | |||
|
|||
@test subnetwork_allocateds[ | |||
@test_broken subnetwork_allocateds[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the linear objective, the assigned flows can change while still minimizing the deviation from the target values. It may be worth to check if some of the reference values for the tests need to be updated, or if there is another issue that should be resolved.
Update the Julia Manifest.toml to get the latest dependencies. __Changed packages__ ``` Installing known registries into `~/.julia` Added `General` registry to ~/.julia/registries Updating registry at `~/.julia/registries/General.toml` Cloning git-repo `https://github.com/visr/SparseConnectivityTracer.jl` Updating git-repo `https://github.com/visr/SparseConnectivityTracer.jl` Updating `~/work/Ribasim/Ribasim/Project.toml` [bbf590c4] ↑ OrdinaryDiffEqCore v1.21.0 ⇒ v1.22.0 [09ab397b] ↑ StructArrays v0.7.0 ⇒ v0.7.1 Updating `~/work/Ribasim/Ribasim/Manifest.toml` [b8f27783] ↑ MathOptInterface v1.38.0 ⇒ v1.38.1 [bbf590c4] ↑ OrdinaryDiffEqCore v1.21.0 ⇒ v1.22.0 [09ab397b] ↑ StructArrays v0.7.0 ⇒ v0.7.1 Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/b19db3927f0db4151cb86d073689f2428e524576/build.log` Building IJulia → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/be30be76e25b0aff2c9a85930ed3ac34c5f10c83/build.log` Info We haven't cleaned this depot up for a bit, running Pkg.gc()... Active manifest files: 1 found Active artifact files: 70 found Active scratchspaces: 2 found Deleted no artifacts, repos, packages or scratchspaces ``` __Packages still outdated after update__ ``` Status `~/work/Ribasim/Ribasim/Project.toml` ``` <details> <summary> All package versions </summary> ``` ADTypes ────────────────────────── v1.14.0 AbstractFFTs ───────────────────── v1.5.0 AbstractTrees ──────────────────── v0.4.5 Accessors ──────────────────────── v0.1.42 Adapt ──────────────────────────── v4.3.0 AdaptivePredicates ─────────────── v1.2.0 AliasTables ────────────────────── v1.1.3 Animations ─────────────────────── v0.4.2 ArgCheck ───────────────────────── v2.5.0 ArnoldiMethod ──────────────────── v0.4.0 ArrayInterface ─────────────────── v7.18.0 ArrayLayouts ───────────────────── v1.11.1 Arrow ──────────────────────────── v2.8.0 ArrowTypes ─────────────────────── v2.3.0 Automa ─────────────────────────── v1.1.0 AxisAlgorithms ─────────────────── v1.1.0 AxisArrays ─────────────────────── v0.4.7 BasicModelInterface ────────────── v0.1.1 BenchmarkTools ─────────────────── v1.6.0 BitIntegers ────────────────────── v0.3.5 BitTwiddlingConvenienceFunctions ─ v0.1.6 BracketingNonlinearSolve ───────── v1.1.2 Bzip2_jll ──────────────────────── v1.0.9+0 CEnum ──────────────────────────── v0.5.0 CPUSummary ─────────────────────── v0.2.6 CRlibm_jll ─────────────────────── v1.0.1+0 Cairo ──────────────────────────── v1.1.1 CairoMakie ─────────────────────── v0.13.2 Cairo_jll ──────────────────────── v1.18.4+0 ChainRulesCore ─────────────────── v1.25.1 CloseOpenIntervals ─────────────── v0.1.13 CodeTracking ───────────────────── v1.3.9 CodecBzip2 ─────────────────────── v0.8.5 CodecLz4 ───────────────────────── v0.4.6 CodecZlib ──────────────────────── v0.7.8 CodecZstd ──────────────────────── v0.8.6 ColorBrewer ────────────────────── v0.4.1 ColorSchemes ───────────────────── v3.29.0 ColorTypes ─────────────────────── v0.12.1 ColorVectorSpace ───────────────── v0.11.0 Colors ─────────────────────────── v0.13.0 CommonSolve ────────────────────── v0.2.4 CommonSubexpressions ───────────── v0.3.1 CommonWorldInvalidations ───────── v1.0.0 Compat ─────────────────────────── v4.16.0 CompositionsBase ───────────────── v0.1.2 ConcreteStructs ────────────────── v0.2.3 ConcurrentUtilities ────────────── v2.5.0 Conda ──────────────────────────── v1.10.2 Configurations ─────────────────── v0.17.6 ConstructionBase ───────────────── v1.5.8 Contour ────────────────────────── v0.6.3 CpuId ──────────────────────────── v0.3.1 Crayons ────────────────────────── v4.1.1 DBInterface ────────────────────── v2.6.1 DataAPI ────────────────────────── v1.16.0 DataFrames ─────────────────────── v1.7.0 DataInterpolations ─────────────── v8.0.0 DataStructures ─────────────────── v0.18.22 DataValueInterfaces ────────────── v1.0.0 DelaunayTriangulation ──────────── v1.6.4 DiffEqBase ─────────────────────── v6.167.2 DiffEqCallbacks ────────────────── v4.3.0 DiffResults ────────────────────── v1.1.0 DiffRules ──────────────────────── v1.15.1 DifferentiationInterface ───────── v0.6.50 DisplayAs ──────────────────────── v0.1.6 Distributions ──────────────────── v0.25.118 DocStringExtensions ────────────── v0.9.4 EarCut_jll ─────────────────────── v2.2.4+0 EnumX ──────────────────────────── v1.0.5 EnzymeCore ─────────────────────── v0.8.8 ExactPredicates ────────────────── v2.2.8 Expat_jll ──────────────────────── v2.6.5+0 ExprTools ──────────────────────── v0.1.10 ExproniconLite ─────────────────── v0.10.14 Extents ────────────────────────── v0.1.5 FFMPEG_jll ─────────────────────── v6.1.2+0 FFTW ───────────────────────────── v1.8.1 FFTW_jll ───────────────────────── v3.3.11+0 FastBroadcast ──────────────────── v0.3.5 FastClosures ───────────────────── v0.3.2 FastPower ──────────────────────── v1.1.2 FileIO ─────────────────────────── v1.17.0 FilePaths ──────────────────────── v0.8.3 FilePathsBase ──────────────────── v0.9.24 FillArrays ─────────────────────── v1.13.0 FindFirstFunctions ─────────────── v1.4.1 FiniteDiff ─────────────────────── v2.27.0 FixedPointNumbers ──────────────── v0.8.5 Fontconfig_jll ─────────────────── v2.16.0+0 Format ─────────────────────────── v1.3.7 ForwardDiff ────────────────────── v0.10.38 FreeType ───────────────────────── v4.1.1 FreeType2_jll ──────────────────── v2.13.4+0 FreeTypeAbstraction ────────────── v0.10.6 FriBidi_jll ────────────────────── v1.0.17+0 FunctionWrappers ───────────────── v1.1.3 FunctionWrappersWrappers ───────── v0.1.3 Functors ───────────────────────── v0.5.2 GPUArraysCore ──────────────────── v0.2.0 GeoFormatTypes ─────────────────── v0.4.4 GeoInterface ───────────────────── v1.4.1 GeometryBasics ─────────────────── v0.5.7 Gettext_jll ────────────────────── v0.21.0+0 Giflib_jll ─────────────────────── v5.2.3+0 Glib_jll ───────────────────────── v2.82.4+0 Glob ───────────────────────────── v1.3.1 Graphics ───────────────────────── v1.1.3 Graphite2_jll ──────────────────── v1.3.15+0 Graphs ─────────────────────────── v1.12.1 GridLayoutBase ─────────────────── v0.11.1 Grisu ──────────────────────────── v1.0.2 HarfBuzz_jll ───────────────────── v8.5.0+0 HiGHS ──────────────────────────── v1.15.0 HiGHS_jll ──────────────────────── v1.10.0+0 HypergeometricFunctions ────────── v0.3.28 IJulia ─────────────────────────── v1.27.0 IOCapture ──────────────────────── v0.2.5 IfElse ─────────────────────────── v0.1.1 ImageAxes ──────────────────────── v0.6.12 ImageBase ──────────────────────── v0.1.7 ImageCore ──────────────────────── v0.10.5 ImageIO ────────────────────────── v0.6.9 ImageMetadata ──────────────────── v0.9.10 Imath_jll ──────────────────────── v3.1.11+0 IndirectArrays ─────────────────── v1.0.0 Infiltrator ────────────────────── v1.8.7 Inflate ────────────────────────── v0.1.5 InlineStrings ──────────────────── v1.4.3 IntelOpenMP_jll ────────────────── v2025.0.4+0 Interpolations ─────────────────── v0.15.1 IntervalArithmetic ─────────────── v0.22.28 IntervalSets ───────────────────── v0.7.10 InverseFunctions ───────────────── v0.1.17 InvertedIndices ────────────────── v1.3.1 IrrationalConstants ────────────── v0.2.4 Isoband ────────────────────────── v0.1.1 IterTools ──────────────────────── v1.10.0 IteratorInterfaceExtensions ────── v1.0.0 JLD2 ───────────────────────────── v0.5.12 JLLWrappers ────────────────────── v1.7.0 JSON ───────────────────────────── v0.21.4 JSON3 ──────────────────────────── v1.14.2 Jieko ──────────────────────────── v0.2.1 JpegTurbo ──────────────────────── v0.1.6 JpegTurbo_jll ──────────────────── v3.1.1+0 JuMP ───────────────────────────── v1.25.0 JuliaInterpreter ───────────────── v0.9.42 KernelDensity ──────────────────── v0.6.9 Krylov ─────────────────────────── v0.9.10 LAME_jll ───────────────────────── v3.100.2+0 LERC_jll ───────────────────────── v4.0.1+0 LLVMOpenMP_jll ─────────────────── v18.1.7+0 LZO_jll ────────────────────────── v2.10.3+0 LaTeXStrings ───────────────────── v1.4.0 LayoutPointers ─────────────────── v0.1.17 LazyArrays ─────────────────────── v2.6.1 LazyModules ────────────────────── v0.3.1 LeftChildRightSiblingTrees ─────── v0.2.0 Legolas ────────────────────────── v0.5.23 Libffi_jll ─────────────────────── v3.2.2+2 Libgcrypt_jll ──────────────────── v1.11.1+0 Libglvnd_jll ───────────────────── v1.7.0+0 Libgpg_error_jll ───────────────── v1.51.1+0 Libiconv_jll ───────────────────── v1.18.0+0 Libmount_jll ───────────────────── v2.41.0+0 Libtiff_jll ────────────────────── v4.7.1+0 Libuuid_jll ────────────────────── v2.41.0+0 LineSearch ─────────────────────── v0.1.4 LineSearches ───────────────────── v7.3.0 LinearSolve ────────────────────── v3.7.2 LogExpFunctions ────────────────── v0.3.29 LoggingExtras ──────────────────── v1.1.0 LoweredCodeUtils ───────────────── v3.1.0 Lz4_jll ────────────────────────── v1.10.1+0 MKL_jll ────────────────────────── v2025.0.1+1 MacroTools ─────────────────────── v0.5.15 Makie ──────────────────────────── v0.22.2 MakieCore ──────────────────────── v0.9.1 ManualMemory ───────────────────── v0.1.8 MappedArrays ───────────────────── v0.4.2 MarkdownTables ─────────────────── v1.1.0 MathOptInterface ───────────────── v1.38.1 MathTeXEngine ──────────────────── v0.6.2 MaybeInplace ───────────────────── v0.1.4 MbedTLS ────────────────────────── v1.1.9 MetaGraphsNext ─────────────────── v0.7.3 Missings ───────────────────────── v1.2.0 Mocking ────────────────────────── v0.8.1 MosaicViews ────────────────────── v0.3.4 Moshi ──────────────────────────── v0.3.5 MuladdMacro ────────────────────── v0.2.4 MutableArithmetics ─────────────── v1.6.4 NLSolversBase ──────────────────── v7.9.1 NaNMath ────────────────────────── v1.1.3 Netpbm ─────────────────────────── v1.1.1 NonlinearSolve ─────────────────── v4.5.0 NonlinearSolveBase ─────────────── v1.5.1 NonlinearSolveFirstOrder ───────── v1.3.0 NonlinearSolveQuasiNewton ──────── v1.2.0 NonlinearSolveSpectralMethods ──── v1.1.0 Observables ────────────────────── v0.5.5 OffsetArrays ───────────────────── v1.16.0 Ogg_jll ────────────────────────── v1.3.5+1 OpenBLASConsistentFPCSR_jll ────── v0.3.29+0 OpenEXR ────────────────────────── v0.3.3 OpenEXR_jll ────────────────────── v3.2.4+0 OpenSSL_jll ────────────────────── v3.0.16+0 OpenSpecFun_jll ────────────────── v0.5.6+0 Opus_jll ───────────────────────── v1.3.3+0 OrderedCollections ─────────────── v1.8.0 OrdinaryDiffEqBDF ──────────────── v1.4.0 OrdinaryDiffEqCore ─────────────── v1.22.0 OrdinaryDiffEqDifferentiation ──── v1.6.0 OrdinaryDiffEqLowOrderRK ───────── v1.2.0 OrdinaryDiffEqNonlinearSolve ───── v1.6.0 OrdinaryDiffEqRosenbrock ───────── v1.9.0 OrdinaryDiffEqSDIRK ────────────── v1.3.0 OrdinaryDiffEqTsit5 ────────────── v1.1.0 OteraEngine ────────────────────── v1.1.1 PDMats ─────────────────────────── v0.11.33 PNGFiles ───────────────────────── v0.4.4 PackageCompiler ────────────────── v2.2.0 Packing ────────────────────────── v0.5.1 PaddedViews ────────────────────── v0.5.12 Pango_jll ──────────────────────── v1.56.1+0 Parameters ─────────────────────── v0.12.3 Parsers ────────────────────────── v2.8.1 Pixman_jll ─────────────────────── v0.44.2+0 PkgVersion ─────────────────────── v0.3.3 PlotUtils ──────────────────────── v1.4.3 Polyester ──────────────────────── v0.7.16 PolyesterWeave ─────────────────── v0.2.2 PolygonOps ─────────────────────── v0.1.2 PooledArrays ───────────────────── v1.4.3 PreallocationTools ─────────────── v0.4.26 PrecompileTools ────────────────── v1.2.1 Preferences ────────────────────── v1.4.3 PrettyTables ───────────────────── v2.4.0 ProgressLogging ────────────────── v0.1.4 ProgressMeter ──────────────────── v1.10.4 PtrArrays ──────────────────────── v1.3.0 QOI ────────────────────────────── v1.0.1 QuadGK ─────────────────────────── v2.11.2 RangeArrays ────────────────────── v0.3.2 Ratios ─────────────────────────── v0.4.5 RecipesBase ────────────────────── v1.3.4 RecursiveArrayTools ────────────── v3.31.2 Reexport ───────────────────────── v1.2.2 RelocatableFolders ─────────────── v1.0.1 Requires ───────────────────────── v1.3.1 Revise ─────────────────────────── v3.7.3 Rmath ──────────────────────────── v0.8.0 Rmath_jll ──────────────────────── v0.5.1+0 RoundingEmulator ───────────────── v0.2.1 RuntimeGeneratedFunctions ──────── v0.5.13 SIMD ───────────────────────────── v3.7.1 SIMDTypes ──────────────────────── v0.1.0 SQLite ─────────────────────────── v1.6.1 SQLite_jll ─────────────────────── v3.48.0+0 SciMLBase ──────────────────────── v2.82.0 SciMLJacobianOperators ─────────── v0.1.1 SciMLOperators ─────────────────── v0.3.13 SciMLStructures ────────────────── v1.7.0 Scratch ────────────────────────── v1.2.1 SentinelArrays ─────────────────── v1.4.8 Setfield ───────────────────────── v1.1.2 ShaderAbstractions ─────────────── v0.5.0 Showoff ────────────────────────── v1.0.3 SignedDistanceFields ───────────── v0.4.0 SimpleNonlinearSolve ───────────── v2.2.0 SimpleTraits ───────────────────── v0.9.4 SimpleUnPack ───────────────────── v1.1.0 Sixel ──────────────────────────── v0.1.3 SoftGlobalScope ────────────────── v1.1.0 SortingAlgorithms ──────────────── v1.2.1 SparseMatrixColorings ──────────── v0.4.16 SpecialFunctions ───────────────── v2.5.0 StableRNGs ─────────────────────── v1.0.2 StackViews ─────────────────────── v0.1.1 Static ─────────────────────────── v1.2.0 StaticArrayInterface ───────────── v1.8.0 StaticArrays ───────────────────── v1.9.13 StaticArraysCore ───────────────── v1.4.3 Statistics ─────────────────────── v1.11.1 StatsAPI ───────────────────────── v1.7.0 StatsBase ──────────────────────── v0.34.4 StatsFuns ──────────────────────── v1.4.0 StrideArraysCore ───────────────── v0.5.7 StringManipulation ─────────────── v0.4.1 StringViews ────────────────────── v1.3.4 StructArrays ───────────────────── v0.7.1 StructTypes ────────────────────── v1.11.0 SymbolicIndexingInterface ──────── v0.3.38 TZJData ────────────────────────── v1.5.0+2025b TableTraits ────────────────────── v1.0.1 Tables ─────────────────────────── v1.12.0 TensorCore ─────────────────────── v0.1.1 TerminalLoggers ────────────────── v0.1.7 TestEnv ────────────────────────── v1.102.0 TestItemRunner ─────────────────── v1.1.0 TestItems ──────────────────────── v1.0.0 ThreadingUtilities ─────────────── v0.5.2 TiffImages ─────────────────────── v0.11.3 TimeZones ──────────────────────── v1.21.3 TimerOutputs ───────────────────── v0.5.28 TranscodingStreams ─────────────── v0.11.3 TriplotBase ────────────────────── v0.1.0 TruncatedStacktraces ───────────── v1.4.0 UnPack ─────────────────────────── v1.0.2 UnicodeFun ─────────────────────── v0.4.1 Unitful ────────────────────────── v1.22.0 VersionParsing ─────────────────── v1.3.0 WeakRefStrings ─────────────────── v1.4.2 WebP ───────────────────────────── v0.1.3 WoodburyMatrices ───────────────── v1.0.0 XML2_jll ───────────────────────── v2.13.6+1 XSLT_jll ───────────────────────── v1.1.43+0 XZ_jll ─────────────────────────── v5.8.1+0 Xorg_libX11_jll ────────────────── v1.8.6+3 Xorg_libXau_jll ────────────────── v1.0.12+0 Xorg_libXdmcp_jll ──────────────── v1.1.5+0 Xorg_libXext_jll ───────────────── v1.3.6+3 Xorg_libXrender_jll ────────────── v0.9.11+1 Xorg_libpthread_stubs_jll ──────── v0.1.2+0 Xorg_libxcb_jll ────────────────── v1.17.0+3 Xorg_xtrans_jll ────────────────── v1.6.0+0 ZMQ ────────────────────────────── v1.4.0 ZeroMQ_jll ─────────────────────── v4.3.6+0 Zstd_jll ───────────────────────── v1.5.7+1 isoband_jll ────────────────────── v0.2.3+0 libaom_jll ─────────────────────── v3.11.0+0 libass_jll ─────────────────────── v0.15.2+0 libfdk_aac_jll ─────────────────── v2.0.3+0 libpng_jll ─────────────────────── v1.6.47+0 libsixel_jll ───────────────────── v1.10.5+0 libsodium_jll ──────────────────── v1.0.21+0 libvorbis_jll ──────────────────── v1.3.7+2 libwebp_jll ────────────────────── v1.5.0+0 oneTBB_jll ─────────────────────── v2022.0.0+0 x264_jll ───────────────────────── v10164.0.1+0 x265_jll ───────────────────────── v3.6.0+0 Co-authored-by: GitHub <[email protected]>
Will be hooked up after #2215. Also adds concentration to Bommelerwaard, we run it in all other test models, this is good to test the combined output. --------- Co-authored-by: Maarten Pronk <[email protected]>
Also split the output into each separate arrow file, instead of merging into two Node/Link virtual layers. Currently we merge all priorities by summing the flows/demands. --------- Co-authored-by: Martijn Visser <[email protected]>
This moves the check for byte columns to the OGR fallback codepath that introduces them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the comments.
Fixes #1494.
The objective function I have implemented now is of the form
as described in the issue. I have reformulated the associated constraints as
to avoid division problems when$d_i = 0$ . The 'target fraction' $f$ is given by the minimum of 1 and the total capacity divided by the total demand.
As mentioned by @jarsarasty, it could be that we have to add another optimization in goal programming fashion to allocate the capacity that is left after this first optimization. That is because the a priori computed fraction$f$ as described above is only ideal if there are no constraints between sources and demands.