From a4c948d27ce850e162faeb41e5cd1de8e6024e6d Mon Sep 17 00:00:00 2001 From: Thomas Purdy Date: Wed, 23 Aug 2023 16:45:56 -0600 Subject: [PATCH 1/2] =?UTF-8?q?Added=20AlgebraicRewriting=20=E2=89=A5=200.?= =?UTF-8?q?2.1=20as=20requirement,=20Catlab=20=E2=89=A5=200.15.5=20as=20re?= =?UTF-8?q?quirement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 422956b8..1ebcb1bf 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ authors = ["Xiaoyan Li "] version = "0.1.0" [deps] +AlgebraicRewriting = "725a01d3-f174-5bbd-84e1-b9417bad95d9" Catlab = "134e5e36-593f-5add-ad60-77f754baafbe" Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" CompTime = "0fb5dd42-039a-4ca4-a1d7-89a96eae6d39" @@ -23,7 +24,8 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -Catlab = "0.15" +AlgebraicRewriting = "≥ 0.2.1" +Catlab = "≥ 0.15.5" Combinatorics = "1.0.2" CompTime = "0.1" GraphViz = "0.2" From 70fa705308bfb0edd74b83ebc9dd39803a549101 Mon Sep 17 00:00:00 2001 From: Thomas Purdy <61016353+neonWhiteout@users.noreply.github.com> Date: Wed, 23 Aug 2023 23:35:22 -0600 Subject: [PATCH 2/2] flattenTupleNames(::Vector) Added a flattenTupleNames(sn::Vector) method, which calls flattenTupleNames for each element and returns a vector. Pullback required it. --- src/SystemStructure.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SystemStructure.jl b/src/SystemStructure.jl index 9a6f7e09..417599fb 100644 --- a/src/SystemStructure.jl +++ b/src/SystemStructure.jl @@ -6,6 +6,7 @@ flattenTupleNames(sn::Tuple)=Symbol(foldr(string,map(x->string(x), sn))) flattenTupleNames(sn::Symbol)=sn flattenTupleNames(sn::SubArray{Symbol})=sn flattenTupleNames(sn::SubArray)=map(y->Symbol(foldr(string,map(x->string(x), y))),sn) +flattenTupleNames(sn::Vector)=[flattenTupleNames(x) for x in sn] function extracStocksStructureAndFlatten(p::AbstractStockAndFlowStructure)