From 64fa58c01c818ab672fda3020c87e8ce760d8ab3 Mon Sep 17 00:00:00 2001 From: termi-official Date: Fri, 20 Jan 2023 22:59:18 +0100 Subject: [PATCH] Give entity lists for p and u0 a type. --- src/CellMLToolkit.jl | 4 ++-- src/components.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CellMLToolkit.jl b/src/CellMLToolkit.jl index 227bd0e..b55547d 100644 --- a/src/CellMLToolkit.jl +++ b/src/CellMLToolkit.jl @@ -45,8 +45,8 @@ import ModelingToolkit.ODEProblem ODEProblem constructs an ODEProblem from a CellModel """ function ODEProblem(ml::CellModel, tspan; - jac = false, level = 1, p = last.(list_params(ml)), - u0 = last.(list_states(ml))) + jac = false, level = 1, p = list_params(ml), + u0 = list_states(ml)) ODEProblem(ml.sys, u0, tspan, p; jac = jac) end diff --git a/src/components.jl b/src/components.jl index 41d99e2..f518af5 100644 --- a/src/components.jl +++ b/src/components.jl @@ -317,7 +317,7 @@ function find_list_value(doc::Document, names) varkeys = Set(keys(vars)) groups = find_equivalence_groups(doc) - vals = [] + vals = Pair{Num, Float64}[] for x in names u = split_sym(x)