From b0934ff1d965ea4f4e58a7d6ddce5158a6721c9c Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Wed, 1 May 2024 16:25:04 +0200 Subject: [PATCH] Update allocation code in docs --- docs/core/allocation.qmd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/core/allocation.qmd b/docs/core/allocation.qmd index 573251fdd..06fcda119 100644 --- a/docs/core/allocation.qmd +++ b/docs/core/allocation.qmd @@ -251,11 +251,9 @@ using SQLite using ComponentArrays: ComponentVector toml_path = normpath(@__DIR__, "../../generated_testmodels/allocation_example/ribasim.toml") -p = Ribasim.Model(toml_path).integrator.p -u = ComponentVector(; storage = zeros(length(p.basin.node_id))) +(; p, u, t) = Ribasim.Model(toml_path).integrator allocation_model = p.allocation.allocation_models[1] -t = 0.0 priority_idx = 1 Ribasim.set_flow!(p.graph, NodeID(:FlowBoundary, 1), NodeID(:Basin, 2), 1.0)