Skip to content
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

Open fails when given no feet #84

Open
neonWhiteout opened this issue Aug 31, 2023 · 3 comments
Open

Open fails when given no feet #84

neonWhiteout opened this issue Aug 31, 2023 · 3 comments

Comments

@neonWhiteout
Copy link
Collaborator

neonWhiteout commented Aug 31, 2023

julia> OpenStockAndFlowF{Symbol, Symbol, Int8}(StockAndFlowF())
ERROR: Empty list of legs but no apex given
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] Multicospan(legs::StaticArraysCore.SVector{0, Union{}})
   @ Catlab.CategoricalAlgebra.FreeDiagrams ~/.julia/packages/Catlab/rJ36m/src/categorical_algebra/FreeDiagrams.jl:175
 [3] (SMulticospan{0, Ob, Hom, <:StaticArraysCore.StaticArray{Tuple{0}, Hom, 1}} where {Ob, Hom})()
   @ Catlab.CategoricalAlgebra.FreeDiagrams ~/.julia/packages/Catlab/rJ36m/src/categorical_algebra/FreeDiagrams.jl:185
 [4] (StructuredMulticospan{Catlab.CategoricalAlgebra.StructuredCospans.DiscreteACSet{StockAndFlow0, StockAndFlowF}})(::StockAndFlowF)
   @ Catlab.CategoricalAlgebra.StructuredCospans ~/.julia/packages/Catlab/rJ36m/src/categorical_algebra/StructuredCospans.jl:267
 [5] top-level scope
   @ REPL[25]:1
@neonWhiteout
Copy link
Collaborator Author

(same error when doing Open(StockAndFlowF()) )

@neonWhiteout
Copy link
Collaborator Author

Trying to deal with cases where you're composing StockFlows with an empty list of feet.

Could provide feet with no stocks and flows to every sf, though that doesn't seem like a good solution.

@jpfairbanks
Copy link
Member

I think you specify the empty interfaces as the empty list [] as opposed to a missing argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants